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 ↓
About the project

jezweb/claude-skills is a collection of skills, commands, plugins, settings, instructions, and hooks that guide the Claude Code CLI through development tasks and produce outputs such as project scaffolds, assets, documents, or deployed services. It is for developers using Claude Code with technologies and services including Cloudflare, React, Tailwind, Shopify, and WordPress. The catalogue entries are the project's own Claude Code workflow components.

jezweb/claude-skills · 1,084 stars · on GitHub · jezweb.com.au

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 15 Sept 2026
  • Snyk pass 15 Sept 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.5 $0.00050 $0.01174
Sonnet 5.5 $0.00025 $0.00587
Haiku 4.5 $0.00012 $0.00293

Measured 1mo ago against content hash 2efd10048eb7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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,084 stars, last pushed 18d ago), licensed MIT. It adds 124 tokens to every session and 2,934 once invoked, about $0.0005 per session on Opus 5.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

react-effects-audit

Use when auditing React or Next.js components for unnecessary or unsafe useEffect usage -- detects 9 anti-patterns from "You Might Not Need an Effect".

fusengine/agents · 36 tokens

React Component Reviewer

Analyzes React components for performance, accessibility, and modern hook usage.

Notysoty/openagentskills · 18 tokens

react-component-hook-guidelines

Use when reviewing, refactoring, or implementing React components and custom Hooks with unclear boundaries or oversized props.

YangsonHung/awesome-agent-skills · 27 tokens

react-component-hook-guidelines-cn

Guidance for splitting and reviewing React components and custom Hooks, which are reusable functions that manage React logic. It focuses on separating page layout, display, state, requests, and side effects into clearer parts.

YangsonHung/awesome-agent-skills · 190 tokens

react-senior-code-review

Senior-level review of a React feature, by theSeniorDev — structure & boundaries, state & data flow, performance & rendering, types/forms/testability/a11y, and styling architecture & motion. Recommends design patterns by name when one fits. Produces prioritized findings (Critical → Nit) with file:line, why, and a…

the-senior-dev/senior-dev-skills · 127 tokens

review-work

Post-implementation gate review: run manual QA on the real surface yourself, then launch ONE gate reviewer (never a panel) to audit goal, constraints, code quality, security, missed context, and QA evidence. Use before a PR handoff or when the user explicitly asks to review completed work.

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