A comprehensive configuration management and agent orchestration system for Claude Code environments. This repository provides a unified framework for synchronizing rules, agents, skills, and commands across multiple AI CLI targets.
This system enables centralized management of Claude Code configurations with support for multiple target environments including Droid CLI, Qwen CLI, OpenAI Codex CLI, OpenCode, and Amp CLI. It provides automated synchronization, backup management, and governance capabilities.
The system operates across two complementary levels:
- User-Level (
~/.claude/): Global configuration and personal automation tools that apply to all projects - Project-Level (
.claude/within projects): Project-specific management tools (config-sync) scoped to individual projects
When Claude Code runs in the ~/.claude/ directory, it merges both levels for development purposes. In normal projects, only user-level components are available.
Agents, skills, and commands are discovered automatically via their frontmatter - no manual registration required:
- Commands (
commands/*.md): User-visible slash commands - Agents (
agents/*/AGENT.md): Execution units with system prompts - Skills (
skills/*/SKILL.md): Reusable capability modules - Rules (
rules/*.md): Development standards (auto-loaded by CLAUDE.md)
- Multi-target support: Synchronize configurations across different AI CLI environments
- Automated backup: Built-in backup and retention policies
- Phase-based execution: Structured workflow with collect β analyze β plan β prepare β adapt β execute β verify β cleanup β report
- Target adapters: Specialized adapters for each CLI environment
- Project-level component: Located at
~/.claude/.claude/for project-specific management
Specialized agents for different workflows:
User-Level Agents (available globally):
agent:llm-governance: LLM prompt optimization and governanceagent:workflow-helper: Draft commit messages and shell script reviewagent:code-architecture-reviewer: Architecture review and complianceagent:code-refactor-master: Code refactoring and restructuringagent:plan-reviewer: Development plan review and validationagent:ts-code-error-resolver: TypeScript error resolutionagent:web-research-specialist: Research and information gatheringagent:refactor-planner: Complex refactoring planning
Project-Level Agents (project-specific management):
agent:config-sync: Configuration synchronization and management
Domain-specific skills providing focused expertise:
- Language skills: Python, Go, Shell scripting standards
- Architecture skills: Patterns, development standards, security
- Workflow skills: Discipline, automation selection, environment validation
- Governance skills: LLM governance, output style management
- Quality skills: Testing strategy, error patterns, quality standards
Comprehensive rule set covering:
- Development standards and best practices
- Security standards and guardrails
- Communication protocols and output styles
- LLM prompt writing guidelines
- Language-specific guidelines (Python, Shell, Go)
- Cross-language architecture principles
Global configuration available across all projects:
~/.claude/
βββ CLAUDE.md # Rule-loading conditions
βββ AGENTS.md # Agent discovery documentation
βββ rules/ # Development standards (auto-loaded)
βββ skills/ # User-level skill definitions
βββ agents/ # User-level agent definitions
βββ commands/ # User-level command definitions
βββ output-styles/ # Named output style manifests
βββ docs/ # Documentation
βββ settings.json # Global configuration
βββ README.md # This file
Project-specific Claude Code management tools:
.claude/
βββ CLAUDE.md # Project-level rule overrides (inherits user-level)
βββ skills/ # Project-specific skills
βββ agents/ # Project-specific agents
βββ commands/ # Project-level commands
βββ config-sync/ # Config-sync subsystem
β βββ sync-cli.sh # Unified orchestrator
β βββ settings.json # Sync configuration
β βββ adapters/ # Target-specific adapters
β βββ lib/ # Shared libraries and phases
β βββ scripts/ # Utility scripts
- Claude Code CLI
- Shell environment (bash/zsh)
- Optional: Python with
tomlmodule (for Qwen CLI support)
-
Synchronize all configurations (project-level command):
/config-sync/sync-cli --action=sync
-
Analyze specific target (project-level command):
/config-sync/sync-cli --action=analyze --target=opencode
-
Synchronize specific components (project-level command):
/config-sync/sync-cli --action=sync --target=amp --components=commands,settings
-
Generate documentation:
-
Review shell script:
/review-shell-syntax path/to/script.sh
-
Draft commit message:
/draft-commit-message
Edit settings.json to configure:
- Environment variables
- Permission settings
- Status line configuration
- Timeout settings
Each target CLI requires specific configuration:
- Droid CLI: Full YAML frontmatter support
- Qwen CLI: Python TOML module required
- OpenAI Codex CLI: Minimal configuration
- OpenCode: JSON command format
- Amp CLI: Global memory support
Configure backup retention in .claude/config-sync/settings.json (project-level):
{
"backup": {
"retention": {
"maxRuns": 5,
"enabled": true,
"dryRun": false
}
}
}| Target | Platform | Command Format | Special Requirements |
|---|---|---|---|
| Droid CLI | Factory AI | YAML frontmatter | Full YAML support |
| Qwen CLI | QwenLM | TOML commands | Python toml module |
| OpenAI Codex CLI | OpenAI | Markdown | Minimal config |
| OpenCode | OpenCode | JSON | JSON command format |
| Amp CLI | Amp | YAML | AGENTS.md memory support |
User-Level Agents (global availability):
- Create agent directory under
~/.claude/agents/ - Define
AGENT.mdwith proper frontmatter (name,description,metadata) - Specify required and optional skills in the agent documentation
- Agent is automatically discovered via frontmatter
Project-Level Agents (project-specific):
- Create agent directory under
.claude/agents/ - Define
AGENT.mdwith proper frontmatter - Specify required and optional skills
- Agent is automatically discovered via frontmatter
User-Level Skills (global availability):
- Create skill directory under
~/.claude/skills/ - Define
SKILL.mdwith skill specification - Include required tools and dependencies
- Test with
skill:environment-validation
Project-Level Skills (project-specific):
- Create skill directory under
.claude/skills/ - Define
SKILL.mdwith skill specification - Include required tools and dependencies
- Add target adapter in
.claude/config-sync/adapters/ - Update target resolver in
.claude/config-sync/lib/common.sh - Test with
/config-sync/sync-cli --action=analyze
This project follows the LLM Prompt Philosophy outlined in docs/llm-philosophy.md:
- Direct and unambiguous: High-density imperative language
- Deterministic structures: Predictable formatting and organization
- Separation of concerns: Machine-readable rules separate from human explanations
- Multi-AI compatibility: Conservative structures work across different AI systems
The system is designed according to docs/taxonomy-rfc.md:
- Frontmatter-based discovery: No manual registration required
- User-level inheritance: Project-level configurations inherit user-level defaults
- Clean separation: User-level (global) vs project-level (scoped) components
- Rule auto-loading: Context-based rule application via CLAUDE.md