claude-cmd
CLAUDE.md313 starsChanged 17 months agoMITView on GitHub
This is a TypeScript CLI tool for managing Claude commands, configurations, and workflows. The architecture follows a modular manager pattern: Main Entry Points: - src/index.ts - CLI entry point with command-line argument parsing - src/cli.ts - Interactive CLI interface (ClaudeCommandCLI class) Core Services: - FileSystemManager (src/core/filesystem.ts) - Handles all file operations, directory management - ClaudeCommandAPI (src/core/api.ts) - API abstraction for command fetching with caching - Command managers in src/commands/ - Specialized managers for different features Manager Pattern: Each feature area…
The file
We split this CLAUDE.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
No test framework configured yet (npm test exits with error)
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Development Commands
Build & Development
npm run build- Compile TypeScript to dist/ and make executablenpm run dev- Watch TypeScript files for changes during developmentnpm run clean- Remove the dist directorynpm run link- Link the CLI globally for development testingnpm run prelink- Build before linking (runs automatically)
Command Processing
npm run parse-commands- Parse command markdown files to commands.jsonts-node scripts/parse-commands.ts- Direct script execution for command parsing
Testing
- No test framework configured yet (
npm testexits with error)
Architecture Overview
This is a TypeScript CLI tool for managing Claude commands, configurations, and workflows. The architecture follows a modular manager pattern:
Core Components
Main Entry Points:
src/index.ts- CLI entry point with command-line argument parsingsrc/cli.ts- Interactive CLI interface (ClaudeCommandCLIclass)
Core Services:
FileSystemManager(src/core/filesystem.ts) - Handles all file operations, directory managementClaudeCommandAPI(src/core/api.ts) - API abstraction for command fetching with caching- Command managers in
src/commands/- Specialized managers for different features
Manager Pattern: Each feature area has its own manager class:
CommandManager- Command installation, search, deletionClaudeMdManager- CLAUDE.md file managementPermissionsManager- Security and permissionsMCPManager- Model Context Protocol serversWorkflowManager- Command workflowsSettingsManager- Configuration managementProjectManager- Project initializationHelpManager- Documentation and help
Configuration System
Hierarchical Configuration:
- Global:
~/.claude/settings.json - Project:
./.claude/settings.json - Local overrides:
./.claude/settings.local.json
Directory Structure:
~/.claude/- Global Claude configuration~/.claude/commands/- Installed commands./.claude/- Project-specific configurationcommands/- Command templates (markdown files)dist/- Compiled output
Command System
Command Sources:
- Remote repository: GitHub raw URLs (default)
- Local repository:
commands/commands.json(via --local flag) - 184+ commands available in remote repository
Command Format:
- Commands stored as markdown files
- Parsed to JSON format via
parse-commandsscript - Organized by category (agent, analyze, code, context, docs, git, etc.)
Key Patterns
API Design:
- Uses environment variable
CLAUDE_CMD_URLfor command source override - Supports both URL and local file paths
- 5-minute caching for remote command data
Navigation:
- Uses
@inquirer/promptsfor interactive CLI - Global navigation utilities in
utils/navigation.ts - Breadcrumb navigation for submenus
Error Handling:
- Colorized output via
utils/colors.ts - Graceful error handling with user-friendly messages
TypeScript Configuration
- Target: ES2022
- Module: CommonJS
- Strict mode enabled
- Path aliases:
@/typesmaps to./src/types - Source maps and declarations enabled
Key Files to Understand
src/index.ts- Entry point and CLI argument parsingsrc/cli.ts- Main interactive interfacesrc/commands/command-manager.ts- Core command management logicsrc/core/filesystem.ts- File system operationssrc/core/api.ts- API and data fetchingcommands/commands.json- Command definitions (generated)scripts/parse-commands.ts- Command parsing logic
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

