agentleFS
kiliczshkiliczsh/claude-cmd/CLAUDE.md

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
  1. Very specific:

    No test framework configured yet (npm test exits with error)

    line 19

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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 executable
  • npm run dev - Watch TypeScript files for changes during development
  • npm run clean - Remove the dist directory
  • npm run link - Link the CLI globally for development testing
  • npm run prelink - Build before linking (runs automatically)

Command Processing

  • npm run parse-commands - Parse command markdown files to commands.json
  • ts-node scripts/parse-commands.ts - Direct script execution for command parsing

Testing

  • No test framework configured yet (npm test exits 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 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 has its own manager class:

  • CommandManager - Command installation, search, deletion
  • ClaudeMdManager - CLAUDE.md file management
  • PermissionsManager - Security and permissions
  • MCPManager - Model Context Protocol servers
  • WorkflowManager - Command workflows
  • SettingsManager - Configuration management
  • ProjectManager - Project initialization
  • HelpManager - Documentation and help

Configuration System

Hierarchical Configuration:

  1. Global: ~/.claude/settings.json
  2. Project: ./.claude/settings.json
  3. Local overrides: ./.claude/settings.local.json

Directory Structure:

  • ~/.claude/ - Global Claude configuration
  • ~/.claude/commands/ - Installed commands
  • ./.claude/ - Project-specific configuration
  • commands/ - 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-commands script
  • Organized by category (agent, analyze, code, context, docs, git, etc.)

Key Patterns

API Design:

  • Uses environment variable CLAUDE_CMD_URL for command source override
  • Supports both URL and local file paths
  • 5-minute caching for remote command data

Navigation:

  • Uses @inquirer/prompts for 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: @/types maps to ./src/types
  • Source maps and declarations enabled

Key Files to Understand

  • src/index.ts - Entry point and CLI argument parsing
  • src/cli.ts - Main interactive interface
  • src/commands/command-manager.ts - Core command management logic
  • src/core/filesystem.ts - File system operations
  • src/core/api.ts - API and data fetching
  • commands/commands.json - Command definitions (generated)
  • scripts/parse-commands.ts - Command parsing logic

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.