Tooluck logoTooluck
SKILL.md

fork-discipline

Agent skill fromjezweb/claude-skills

Audit and enforce the core/client boundary in multi-client projects. Detects where shared platform code is tangled with client-specific code, finds hardcoded client checks, config files that replace instead of merge, scattered client code, migration conflicts, and missing extension points. Produces a boundary map, violation report, and refactoring plan. Optionally generates FORK.md documentation and restructuring scripts. Triggers: 'fork discipline', 'check the boundary', 'is this core or client', 'platform audit', 'client separation', 'fork test', 'refactor for multi-client', 'clean up the fork'.

How to install fork-discipline

install fork-discipline
# install the claude-skills pack with the skills CLI
npx skills add jezweb/claude-skills

# or add only this skill to Claude Code: copy the folder

plugins/dev-tools/skills/fork-discipline/

# into

~/.claude/skills/fork-discipline/ (all projects)

.claude/skills/fork-discipline/ (one project)

plugins/dev-tools/skills/fork-discipline/SKILL.md

MITFull file
1# Fork Discipline
2
3Audit the core/client boundary in multi-client codebases. Every multi-client project should have a clean separation between shared platform code (core) and per-deployment code (client). This skill finds where that boundary is blurred and shows you how to fix it.
4
5## The Principle
6
7```
8project/
9 src/ ← CORE: shared platform code. Never modified per client.
10 config/ ← DEFAULTS: base config, feature flags, sensible defaults.
11 clients/
12 client-name/ ← CLIENT: everything that varies per deployment.
13 config ← overrides merged over defaults
14 content ← seed data, KB articles, templates
15 schema ← domain tables, migrations (numbered 0100+)
16 custom/ ← bespoke features (routes, pages, tools)
17```
18
19**The fork test**: Before modifying any file, ask "is this core or client?" If you can't tell, the boundary isn't clean enough.
20
21## When to Use
22
23- Before adding a second or third client to an existing project
24- After a project has grown organically and the boundaries are fuzzy
25- When you notice `if (client === 'acme')` checks creeping into shared code
26- Before a major refactor to understand what's actually shared vs specific
27- When onboarding a new developer who needs to understand the architecture
28- Periodic health check on multi-client projects
29
30## Modes
31
32| Mode | Trigger | What it produces |
33|------|---------|-----------------|
34…

Excerpt shown under the repository's MIT license.

More skills in claude-skills

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates