coding-discipline
Skill3 starsChanged 3 months agoMITView on GitHub
Enforces clarity, surgical diffs, simplicity, and goal-driven TDD for any codebase. Use when implementing features, fixing bugs, refactoring, or making any code change.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Dmkdok/product-factorytheir own version, first seen Oct 25, 2026
- jjmrocha/coding-skillstheir own version, first seen Oct 13, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- Dmkdok/product-factory★ 1same name
- jjmrocha/coding-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository47 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- api-designSkill
- backend-craftSkill
- meilisearchSkill
- design-coreSkill
- design-datavizSkill
- design-flowsSkill
- design-formsSkill
- design-product-uiSkill
- design-researchSkill
- design-reviewSkill
- design-slidesSkill
- design-systemsSkill
- design-webSkill
- agent-syncSkill
- build-autonomous-agentsSkill
- completion-gateSkill
- deliver-dependency-upgradesSkill
- documentation-and-adrsSkill
- grill-harness-with-docsSkill
- learn-agentic-engineeringSkill
- pnpmSkill
- scaffold-harnessSkill
- scaffold-monorepoSkill
- shift-left-securitySkill
- start-gateSkill
- update-harnessSkill
- write-a-skillSkill
- frontend-craftSkill
- ansible-automationSkill
- gitea-actionsSkill
- gitea-teaSkill
- manage-infrastructure-as-codeSkill
- multi-stage-dockerfileSkill
- secure-linux-web-hostingSkill
- integrate-product-complianceSkill
- plain-numbersSkill
- product-craftSkill
- run-product-engineeringSkill
- playwright-best-practicesSkill
- testing-strategiesSkill
- writing-coreSkill
- writing-editorialSkill
- writing-engineeringSkill
- writing-marketingSkill
- writing-productSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. About 0 are common, 20 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈20
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Read the repo's local instructions: AGENTS.md, CLAUDE.md, .cursor/rules/, README.md, contributing docs, or equivalents.
- Distinctive: line 24
If project rules conflict with this skill, follow the project rules and tell the user about the trade-off when it matters.
- Distinctive: line 26
If expected agent docs are missing and the task is non-trivial, suggest
- Distinctive: line 32
If multiple consequential interpretations remain after investigation, present them with a recommendation - do not pick silently.
- Distinctive: line 35
Stop before the dependent change when uncertainty cannot be resolved safely.
- Distinctive: line 41
Prefer the language standard library, native platform behavior, or an installed dependency over new code or another dependency.
- Distinctive: line 43
Add only the minimum code for the requested problem.
- Distinctive: line 45
Prefer correction, consolidation, or deletion over another layer.
- Distinctive: line 46
Do not simplify away input validation at trust boundaries, security, accessibility, data integrity, necessary recovery, or error handling.
- Distinctive: line 53
Start from the product outcome, domain language, constraints, failure modes, and required qualities.
- Distinctive: line 56
Treat languages, frameworks, database families, CQRS, and hexagonal or other architecture styles as tools.
- Distinctive: line 59
Keep user interfaces thin: presentation, interaction, local UI state, and feedback stay close to the user.
- Distinctive: line 62
Prefer task-shaped read models and intent-shaped mutation or command models when generic CRUD or database repositories would hide domain …
- Distinctive: line 68
When a material technology choice remains uncertain, run the smallest disposable comparison with representative data shape and volume, …
- Distinctive: line 76
Follow the target repository's language and audience rules.
- Distinctive: line 77
When no rule exists, preserve the language and terminology of the touched area.
- Distinctive: line 86
Do not refactor, reformat, or "improve" adjacent code.
- Distinctive: line 89
Remove only imports/symbols your diff made unused.
- Distinctive: line 90
Every changed line should trace to the user's request.
- Distinctive: line 110
Test through public interfaces (API routes, package exports, user-visible behavior).
- Distinctive: line 117
Do not mock internals; do not test private helpers in isolation.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Coding Discipline
Prime directive: clarity, safe change, bounded impact. Small localized diffs. Investigate discoverable facts; ask when intent, authority, domain semantics, or material impact remain unresolved.
Bias toward caution over speed. Use judgment on trivial tasks.
Project Fit Check
Before changing code:
- Read the repo's local instructions:
AGENTS.md,CLAUDE.md,.cursor/rules/,README.md, contributing docs, or equivalents. - Detect the package manager, formatter, linter, test runner, language level, and branch/worktree conventions from project files before choosing commands.
- Match existing architecture, naming, test style, and error-handling patterns in the touched area.
- If project rules conflict with this skill, follow the project rules and tell the user about the trade-off when it matters.
- If expected agent docs are missing and the task is non-trivial, suggest scaffold-harness or adapt to the repo's existing docs.
Think before coding
- State material assumptions explicitly.
- If multiple consequential interpretations remain after investigation, present them with a recommendation - do not pick silently.
- Name simpler approaches and push back when warranted.
- Stop before the dependent change when uncertainty cannot be resolved safely.
Simplicity first
- Reuse the owning implementation or established repository pattern when it already fits.
- Prefer the language standard library, native platform behavior, or an installed dependency over new code or another dependency.
- Add only the minimum code for the requested problem. No speculative features, abstractions, or configuration.
- Prefer correction, consolidation, or deletion over another layer.
- Do not simplify away input validation at trust boundaries, security, accessibility, data integrity, necessary recovery, or error handling.
- Self-check: Would a senior engineer call this overcomplicated? If yes, simplify.
End-to-end architecture
- Start from the product outcome, domain language, constraints, failure modes, and required qualities. Frontend, backend, data, infrastructure, and operations are one change system, not handoff departments.
- Treat languages, frameworks, database families, CQRS, and hexagonal or other architecture styles as tools. Select them for the current context and evidence, not as maturity badges.
- Keep user interfaces thin: presentation, interaction, local UI state, and feedback stay close to the user; domain policy and durable decisions stay at the strongest reusable boundary.
- Prefer task-shaped read models and intent-shaped mutation or command models when generic CRUD or database repositories would hide domain language, authorization, concurrency, transaction, or query semantics.
- Preserve cheap change through explicit boundaries and public contracts. Do not pre-build speculative flexibility in the name of avoiding future lock-in.
- When a material technology choice remains uncertain, run the smallest disposable comparison with representative data shape and volume, concurrency, failures, latency, memory, I/O, recovery, and operating cost. Record the decision and discard the spike unless production hardening is an explicit next investment.
Language
- Follow the target repository's language and audience rules.
- When no rule exists, preserve the language and terminology of the touched area. Do not translate product copy, documentation, or tests incidentally.
Surgical changes
- Touch only what the request requires.
- One rule with several call sites is one unit of work. Fixing only the site the request names leaves the rule half-applied. Extend the fix to its siblings and say which ones, or name them when the extension is genuinely out of scope.
- Do not refactor, reformat, or "improve" adjacent code.
- Match existing style and patterns in the touched area.
- Unrelated dead code: mention it - do not delete unless asked.
- Remove only imports/symbols your diff made unused.
- Every changed line should trace to the user's request.
Goal-driven execution
| Request | Success criteria |
| Add validation | Tests for invalid inputs pass |
| Fix bug | Failing test reproduces it, then passes |
| Refactor | Tests pass before and after |
Multi-step work: brief plan as [Step] -> verify: [check].
TDD
Tests are design feedback, not a phase after implementation. Use vertical
slices - one behavior test, minimal implementation, repeat. Prefer the
harness-referenced or catalog coding-discipline Skill (or the consumer's
pinned release). Follow a project-local tdd Skill only when it is a thin
wrapper with real local deltas, not a duplicate of portable TDD.
- Test through public interfaces (API routes, package exports, user-visible behavior).
- Express each behavior with Given/When/Then semantics: preconditions and context, one relevant stimulus, then an externally observable outcome. Use the target framework's names and structure; comments or a GWT library are not required.
- Name behavior in the target's domain language; keep examples, tests, code, and public contracts aligned.
- Do not mock internals; do not test private helpers in isolation.
- Match test type to risk: unit for logic, integration/e2e for user flows (per
AGENTS.md). - For a disposable spike whose purpose is learning, use a hypothesis, timebox, and exit decision instead of pretending it is production code. Discard it or restart the production slice from public behavior with tests.
Quality mindset
- Understand the problem before choosing a solution; assess value and risk before estimating effort.
- For bugs, reproduce the failure, trace callers and shared ownership, and fix the root cause at the narrowest common boundary.
- Quality at the start: acceptance criteria and tests - not late inspection.
- Readable over clever; abstractions only when they remove real complexity.
- Direct communication: name trade-offs, constraints, and next step.
Optional Complement
Use the upstream
ponytail Skill only when repeated
overengineering justifies a stronger implementation-style guardrail and the
target host has passed a representative pilot. It complements this workflow; it
does not override target instructions or the safeguards above.
Working signal
Fewer unnecessary diff lines, fewer rewrites from over-engineering, clarifying questions before implementation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

