claude-rules

Manages centralized Claude Code configurations and skills across projects via symlinks.

Updated Jun 2, 2026
One-click install
npx skills add https://github.com/lfuuu/claude-rules --skill claude-rules-lfuuu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claude-rules
Source: https://github.com/lfuuu/claude-rules/tree/main/global-skills/claude-rules
Command: npx skills add https://github.com/lfuuu/claude-rules --skill claude-rules-lfuuu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Maintaining CLAUDE.md files, skills, agents, and hooks separately in every project leads to duplication and drift. This Skill centralizes all Claude Code configuration in one claude-rules repository and distributes it to projects through symlinks, giving a single source of truth with git versioning. ## Core Features & Use Cases - Project onboarding runbook: Creates a project directory with CLAUDE.md and skills, registers it in the PROJECTS array of setup-symlinks.sh, and restores all symlinks with one idempotent script. - Thin role wrappers over cores: Guides creation of project role skills (backend, frontend, reviewer, teamlead, and more) that import invariant *-core skills by reference and add only domain-specific rules, with a decision tree for when a new core is justified. - Disconnect and recovery workflows: Provides runbooks for removing a project's symlinks and registry entry, and for restoring broken links on a new machine. - Use Case: When starting a new project, ask to connect it to claude-rules; the Skill scaffolds the config directory, wires role wrappers to the correct cores, updates the symlink registry, and verifies every link reports OK. ## Quick Start Ask the agent to connect your project to claude-rules and set up its CLAUDE.md and role skills through symlinks.

Frequently Asked Questions about claude-rules

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect a new project to claude-rules?

Create a directory under claude-rules/projects/<project>/ with a CLAUDE.md and optional skills folder, add a registry entry to the PROJECTS array in setup-symlinks.sh, then run ./setup-symlinks.sh and verify all links report OK.

How do I create a project role skill without duplicating shared rules?

Create a thin wrapper SKILL.md that imports the matching *-core skill by reference link and adds only domain-specific content such as the domain model, local NEVER rules, and usage examples. Target 50-180 lines depending on project complexity.

When should I extract a new core skill in claude-rules?

Extract a new core only when a rule has three or more importers, or two importers with an invariant of 100+ lines. Single-project rules stay inline, and premature extraction is explicitly discouraged by the decision tree.

Can I edit a symlinked CLAUDE.md directly inside a project?

No. Symlinks are read-only views; edits must be made to the original file in claude-rules/projects/<project>/. Changes made through the symlink are lost when setup-symlinks.sh runs or on a new machine.

How do I restore broken symlinks on a new machine?

Run ./setup-symlinks.sh from the claude-rules repository root. The script is idempotent: it skips existing links, recreates missing ones, replaces plain files with symlinks, and prints a verification report.