Skip to content
Development
Skill

/context-hygiene

Use when starting a project, reading project documentation or history, or resolving conflicts between documents. For current state, read only the latest documents designated by the project; do not proactively read archives; do not duplicate the spec; use long-term memory only

From plugin
coding-discipline
258 skills

Claude Code

$ npx -y skills add chipfighter/coding-discipline --skill context-hygiene --agent claude-code

SKILL.md

context-hygiene.SKILL.md
name: context-hygiene
description: Use when starting a project, reading project documentation or history, or resolving conflicts between documents. For current state, read only the latest documents designated by the project; do not proactively read archives; do not duplicate the spec; use long-term memory only for environment, people, and preferences not recorded in the repository.
license: MIT

Old documents can trace history, but they are not current facts. Models easily follow the most extensively documented old account instead of finding the latest, correct one. If the project guide document (Codex's `AGENTS.md` / Claude Code's `CLAUDE.md`) designates a current-state document and archive location, follow it.

What to read—and what not to read

1. **For current state, read only the latest document designated by the project** (such as the top of `CHANGELOG.md` or a STATUS document). Do not treat an old version snapshot as current. 2. **Do not proactively read archives or documents marked `superseded` / deprecated.** When history is genuinely needed, search for and read the relevant passage rather than reading the entire archive. 3. When documents conflict, first follow the project's designated latest state document; if it is still unclear, ask the user. Do not choose one yourself, and never treat an archive as current.

Do not copy another set of instructions

4. Point design work to the existing project guide document / architecture decision record (ADR) / current-state document instead of copying another spec—the copy will eventually go stale. 5. **When the reason for a direction changes, rewrite it; do not append:** retaining the old rationale invites it to be repeated and pull the work in the wrong direction. 6. **Use memory only for facts unavailable in the repository** (environment / people / preferences / lessons from past pitfalls). Read project progress from the current-state document, and record design rationale in an architecture decision record (ADR). Delete stale memory; do not archive another copy.

Project guide documents grow over time; they are not filled in up front

When the project root has no `AGENTS.md` (Codex) or `CLAUDE.md` (Claude Code), the plugin places the corresponding empty skeleton there the first time it enters the repository. It grows by **confirming one thing and recording one line**:

  • Record only things already agreed with the user and not apparent from the code (technology choices / hard boundaries / definition of done). Do not record matters still under discussion or unsettled—filling the guide up front makes later sessions treat guesses as facts.
  • Whenever such a decision is finalized, proactively ask, “Should I record this in the project guide document?” Write it only after approval, one line at a time.
  • If a recorded decision later changes, edit that line; do not add a conflicting line below it (the same “rewrite, do not append” rule above).

When a document becomes obsolete

Mark it `status: superseded by XX`, move it to the archive, and use an architecture decision record (ADR) to explain why it was abandoned—so a later session does not revive and rebuild a discarded idea.

Read more
@chipfighter
Ships withcoding-discipline

Chinese → README.zh-CN.md Guardrails, not a workflow. Quiet on routine work; firm when a named failure mode is at risk. AI coding agents tend to fail in two expensive ways: They drift off-goal.

Stars on GitHub

Momentum

stars in total
25
Star history of chipfighter/coding-discipline on GitHub, a chart by star-history.com

Other skills on coding-discipline.

git-flow

git-flow

Use when creating a branch, using worktrees for parallel work, committing, or wrapping up. Covers branch naming, conventional…

spec-sync

spec-sync

Use in cross-session work when user-confirmed outcomes, non-goals, hard constraints, or acceptance criteria have not been written…

tdd

tdd

Use before implementation when behavior can be verified by automated tests and regression coverage has clear value. For bugs with…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about context-hygiene.

Which coding agents can use context-hygiene?
context-hygiene installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.