6.8 KiB
Babashka.fs Skill - Index
Welcome to the comprehensive babashka.fs skill! This skill provides everything you need to master file system operations in Clojure and Babashka.
📚 Documentation Files
1. SKILL.md - Main Documentation
Size: ~23KB | Reading time: 30-45 minutes
The comprehensive guide covering:
- Overview and setup
- Core concepts (Path objects, cross-platform support)
- Path operations (creating, manipulating, components)
- File and directory checks
- Creating files and directories
- Reading and writing files
- Copying, moving, and deleting
- Listing and traversing directories
- Searching and filtering (glob and match)
- File metadata and attributes
- Archive operations (zip/unzip)
- System paths and utilities
- Advanced patterns and best practices
- Common use cases and recipes
- Error handling and edge cases
- Performance tips
- Testing and mocking
- Platform-specific considerations
Start here if you want a complete understanding of the library.
2. README.md - Getting Started
Size: ~5KB | Reading time: 5-10 minutes
Quick overview including:
- What is babashka.fs?
- Quick start examples
- How to use this skill
- Key features overview
- Common use cases
- Integration examples
- Learning path
Start here if you want a quick introduction.
3. QUICK_REFERENCE.md - Cheat Sheet
Size: ~7KB | Quick lookup
Concise reference with:
- Function signatures organized by category
- Common glob patterns
- Frequent usage patterns
- Tips and anti-patterns
- Error handling patterns
Use this when you need to quickly look up a function or pattern.
4. examples.clj - Runnable Examples
Size: ~6KB | Executable script
13 practical examples demonstrating:
- Basic file operations
- Directory listing and filtering
- Creating directory structures
- Copy and move operations
- Path manipulation
- File metadata
- Finding executables in PATH
- Glob pattern matching
- Recursive directory walking
- File filtering pipelines
- XDG base directories
- Temporary file management
- Temp directory context
Run this to see the library in action:
bb examples.clj
5. metadata.edn - Skill Metadata
Size: ~5KB | Machine-readable
Structured information about:
- Skill properties and versioning
- Library information
- Use cases and features
- Learning path
- Platform support
- API coverage
🎯 Quick Navigation
By Experience Level
Beginner
- Read README.md for overview
- Run examples.clj to see it work
- Browse QUICK_REFERENCE.md for common functions
- Read "Core Concepts" in SKILL.md
Intermediate
- Review "Path Operations" in SKILL.md
- Study "Searching and Filtering" section
- Learn "Advanced Patterns and Best Practices"
- Try implementing the recipes
Advanced
- Deep dive into "Common Use Cases and Recipes"
- Study error handling and performance sections
- Review platform-specific considerations
- Implement your own patterns
By Task
Need to find files?
- SKILL.md → "Searching and Filtering: Glob and Match"
- QUICK_REFERENCE.md → "Searching" and "Common Glob Patterns"
- examples.clj → Example 8 (Glob patterns)
Need to copy/move files?
- SKILL.md → "Copying, Moving, and Deleting"
- QUICK_REFERENCE.md → "Copying/Moving/Deleting"
- examples.clj → Example 4 (Copy and move)
Need to work with paths?
- SKILL.md → "Path Operations"
- QUICK_REFERENCE.md → "Path Operations"
- examples.clj → Example 5 (Path manipulation)
Need temporary files?
- SKILL.md → "Creating Files and Directories" + "Working with Temporary Files"
- QUICK_REFERENCE.md → "Temporary Files"
- examples.clj → Examples 12-13 (Temp files)
Need to process directories?
- SKILL.md → "Listing and Traversing Directories"
- examples.clj → Examples 9-10 (Walking and filtering)
🚀 Suggested Learning Path
Day 1: Foundations (1-2 hours)
- ✅ Read README.md overview
- ✅ Run examples.clj and study output
- ✅ Read "Core Concepts" in SKILL.md
- ✅ Review "Path Operations" in SKILL.md
- ✅ Bookmark QUICK_REFERENCE.md for lookups
Day 2: Core Skills (2-3 hours)
- ✅ Study "File and Directory Checks"
- ✅ Learn "Creating Files and Directories"
- ✅ Practice "Reading and Writing Files"
- ✅ Master "Copying, Moving, and Deleting"
- ✅ Write your own simple script
Day 3: Advanced Features (2-3 hours)
- ✅ Deep dive into "Searching and Filtering"
- ✅ Learn glob patterns thoroughly
- ✅ Study "File Metadata and Attributes"
- ✅ Practice with real-world scenarios
- ✅ Review "Advanced Patterns"
Day 4: Production Skills (1-2 hours)
- ✅ Study "Common Use Cases and Recipes"
- ✅ Learn "Error Handling and Edge Cases"
- ✅ Review "Performance Tips"
- ✅ Understand "Platform-Specific Considerations"
- ✅ Implement a complete project
📊 Skill Coverage
This skill covers 100% of the babashka.fs public API including:
- ✅ 40+ file system functions
- ✅ Path creation and manipulation
- ✅ File operations (create, read, write, delete)
- ✅ Directory operations (list, walk, create)
- ✅ Pattern matching (glob, regex)
- ✅ Metadata access (size, times, permissions)
- ✅ Archive operations (zip, unzip)
- ✅ System paths (home, temp, PATH)
- ✅ XDG directories (Linux/Unix)
- ✅ Temporary file management
- ✅ Cross-platform support
🎓 What You'll Learn
After completing this skill, you'll be able to:
- ✅ Perform all common file system operations in Clojure
- ✅ Write cross-platform file manipulation code
- ✅ Use glob patterns effectively for finding files
- ✅ Handle file metadata and permissions
- ✅ Manage temporary files safely
- ✅ Build robust file processing scripts
- ✅ Implement file-based automation tasks
- ✅ Handle errors gracefully
- ✅ Optimize file operations for performance
- ✅ Follow best practices for production code
🔗 External Resources
📝 Version Information
- Skill Version: 1.0.0
- Library Version: 0.5.27
- Created: 2025-11-09
- Language: Clojure
- Platform: Cross-platform (Linux, macOS, Windows)
- License: EPL-1.0
🎯 Next Steps
- Choose your starting point based on experience level
- Follow the suggested learning path
- Run the examples to see code in action
- Use QUICK_REFERENCE.md for fast lookups
- Implement your own projects
- Share your learnings!
Ready to start? Begin with README.md for a gentle introduction, or dive straight into SKILL.md for comprehensive coverage!