fork-discipline

fork-discipline is a skill for Claude Code from jezweb/claude-skills. It costs 124 tokens per session (2,934 once invoked), scanned A, original, MIT.

A codebase review for projects that serve multiple customers or deployments. It checks the boundary between shared platform code and customer-specific code.

In plain words
What is it for?
Use it before adding another customer, during refactoring, or when auditing where shared code, defaults, customer overrides, content, schemas, and custom features belong.
Why use it?
It finds customer checks, copied code, replacement configuration, and missing extension points that make updates harder and can cause one customer’s changes to affect others.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is const clientRoutes = await import(`../../clients/${clientName}/custom/routes`).

Part of the dev-tools plugin — 16 skills, 14 commands shipped together

Good fit Use it before adding another customer, during refactoring, or when auditing where shared code, defaults, customer overrides, content, schemas, and custom features belong.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/jezweb/claude-skills
agentmods
npx agentmods add skills/jezweb/claude-skills/fork-discipline

Made for: Claude Code.

Or install dev-tools, the plugin that ships this one along with the rest of its 16 skills, 14 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fork-discipline

README.md
[![agentmods](https://agentmods.dev/badge/skills/jezweb/claude-skills/fork-discipline/github.svg)](https://agentmods.dev/skills/jezweb/claude-skills/fork-discipline)
Your own site
<a href="https://agentmods.dev/skills/jezweb/claude-skills/fork-discipline"><img src="https://agentmods.dev/badge/skills/jezweb/claude-skills/fork-discipline/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fork-discipline

Your own site · 80×15
<a href="https://agentmods.dev/skills/jezweb/claude-skills/fork-discipline"><img src="https://agentmods.dev/badge/skills/jezweb/claude-skills/fork-discipline.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 124 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,934 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 14 May 2026
  • Snyk pass 14 May 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00124 $0.02934
Opus 5 $0.00062 $0.01467
Sonnet 5 $0.00025 $0.00587
Haiku 4.5 $0.00012 $0.00293

Measured 11d ago against content hash 2efd10048eb7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

fork-discipline scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/dev-tools/skills/fork-discipline/SKILL.md · 390 lines

How it starts

The opening of the file, as written. The whole thing — 390 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Fork Discipline

Audit 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.

The Principle

project/
  src/            ← CORE: shared platform code. Never modified per client.
  config/         ← DEFAULTS: base config, feature flags, sensible defaults.
  clients/
    client-name/  ← CLIENT: everything that varies per deployment.
      config      ← overrides merged over defaults
      content     ← seed data, KB articles, templates
      schema      ← domain tables, migrations (numbered 0100+)
      custom/     ← bespoke features (routes, pages, tools)

The fork test: Before modifying any file, ask "is this core or client?" If you can't tell, the boundary isn't clean enough.

When to Use

  • Before adding a second or third client to an existing project
  • After a project has grown organically and the boundaries are fuzzy
  • When you notice if (client === 'acme') checks creeping into shared code
  • Before a major refactor to understand what's actually shared vs specific
  • When onboarding a new developer who needs to understand the architecture
  • Periodic health check on multi-client projects

Modes

Mode Trigger What it produces
audit "fork discipline", "check the boundary" Boundary map + violation report
document "write FORK.md", "document the boundary" FORK.md file for the project
refactor "clean up the fork", "enforce the boundary" Refactoring plan + migration scripts

Default: audit


Audit Mode

Step 1: Detect Project Type

Determine if this is a multi-client project and what pattern it uses:

Signal Pattern
clients/ or tenants/ directory Explicit multi-client
Multiple config files with client names Config-driven multi-client
packages/ with shared + per-client packages Monorepo multi-client
Environment variables like CLIENT_NAME or TENANT_ID Runtime multi-client
Only one deployment, no client dirs Single-client (may be heading multi-client)

Read the full file on GitHub · 390 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 390 lines · 124 tokens per session scan A 2efd10048eb7

Subscribe to this mod's changes

fork-discipline is a skill published in the GitHub repository jezweb/claude-skills (1,000 stars, last pushed 2mo ago), licensed MIT. It adds 124 tokens to every session and 2,934 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

review-implementing

Process and implement code review feedback systematically. Use when user provides reviewer comments, PR feedback, code review notes, or asks to implement suggestions from reviews.

mhattingpete/claude-skills-marketplace · 35 tokens

code-auditor

Performs comprehensive codebase analysis covering architecture, code quality, security, performance, testing, and maintainability. Use when user wants to audit code quality, identify technical debt, find security issues, assess test coverage, or get a codebase health check.

mhattingpete/claude-skills-marketplace · 56 tokens

review-loop

Run the adversarial verification loop — implement, then hand the change to a fresh checker that did not write it, fix what it finds, and re-dispatch until APPROVE. Use before claiming any behavioural change is done, and on requests like "review loop", "adversarial review", "independent review", "get this verified"…

sangrokjung/claude-forge · 100 tokens

tech-debt-audit

Thorough, file-cited technical debt audit across 9 dimensions using AST-grep (tree-sitter), grep, LSP, and language-native tooling. Produces TECHDEBTAUDIT.md with severity, effort estimates, and prioritized fixes. Use when asked for codebase health check, tech debt audit, architecture review, code quality assessment…

code-yeongyu/oh-my-openagent · 127 tokens

boundaries

Analyze Phoenix context boundaries and module coupling via mix xref. Use when checking cross-context calls, validating dependencies, before splitting modules, or reviewing architecture.

oliver-kriska/claude-elixir-phoenix · 33 tokens

triage

Triage review findings interactively — approve, skip, or prioritize each issue. Use after /phx:review to filter findings before fixing.

oliver-kriska/claude-elixir-phoenix · 32 tokens