linux-philosophy
Unix/Linux design principles for CLI tools and system architecture.
When & Why to Use This Skill
This Claude skill provides a comprehensive framework based on Unix/Linux design principles to guide the development of efficient CLI tools and robust system architectures. It emphasizes modularity, composability through text streams, and clear error handling to ensure software is scalable, maintainable, and follows industry-standard best practices for developer-friendly tooling.
Use Cases
- Designing Command-Line Interfaces (CLI): Ensuring tools follow the 'do one thing well' principle and support standard I/O for seamless pipeline integration.
- System Architecture Planning: Applying modular design and loose coupling to complex software systems to improve long-term maintainability and scalability.
- Code Review and Refactoring: Using the provided checklist to evaluate existing scripts or programs for adherence to core Unix philosophies like explicit behavior and small, sharp tools.
- Error Handling Strategy: Implementing meaningful exit codes and diagnostic messaging to stderr to facilitate better debugging and automated workflow orchestration.
| name | linux-philosophy |
|---|---|
| description | Unix/Linux design principles for CLI tools and system architecture. |
Unix/Linux Philosophy
Core Principles
- Do one thing well - Each program/function should have a single purpose
- Compose with others - Design for pipelines and composition
- Text streams - Use text as universal interface
- Small, sharp tools - Prefer focused tools over monolithic solutions
- Fail fast, fail loudly - Exit on error with clear messages
Design Guidelines
- Prefer explicit over implicit behavior
- Make default behavior safe; require flags for dangerous operations
- Support stdin/stdout for composition
- Use exit codes meaningfully (0=success, non-zero=error)
- Write to stderr for diagnostics, stdout for output
Checklist
- Single responsibility per module/function
- Composable via standard I/O
- Clear error messages to stderr
- Meaningful exit codes
- No hidden side effects