Agent skill
sync-rules
Synchronize shared rules into agent context files and headers.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/sync-rules
SKILL.md
Sync Rules Skill
Synchronize shared rules from shared-rules/ to all agent context files.
Overview
This skill propagates rules from the central shared-rules/ directory to:
CLAUDE.md(this file)- Project-level context files
- Agent-specific overrides
Usage
/sync-rules
Prerequisites
- Python environment available to run
scripts/sync-rules.py.
How It Works
-
Read shared rules:
shared-rules/ ├── core-rules.md ├── coding-standards.md ├── guardrails.md ├── cli-reference.md ├── lessons-learned.md └── agent-overrides/ └── claude.md -
Assemble CLAUDE.md:
- Start with claude-specific header
- Append shared rules in order
- Add lessons learned at end
-
Update timestamp:
markdown<!-- AUTO-GENERATED from shared-rules/ --> <!-- Last synced: 2026-01-22 12:00:00 -->
Execution
python scripts/sync-rules.py
Or manually:
- Read all files from
shared-rules/ - Concatenate in order
- Write to
CLAUDE.md
File Order
agent-overrides/claude.md- Claude-specific rules (header)core-rules.md- Core workflow rulescoding-standards.md- Coding guidelinesguardrails.md- Safety guardrailscli-reference.md- CLI tool referencelessons-learned.md- Lessons from past issues
Validation
After sync, verify:
- CLAUDE.md updated
- Timestamp current
- No merge conflicts
- Rules are complete
Outputs
- Updated
CLAUDE.mdand any derived context files.
Error Handling
- If sync fails, stop and fix the script or inputs before continuing.
- If timestamps are stale, rerun the sync to avoid mismatched rules.
Examples
/sync-rules
Related Skills
/add-lesson- Add a lesson before syncing rules
When to Sync
Run sync after:
- Adding a new lesson learned
- Updating shared rules
- Before starting a new workflow
- After pulling changes from git
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?