clean-flow
AGENTS.md1 starsChanged 27 days agoMITView on GitHub
Clean Flow (Cflow): source pack of skills for cleanup/refactor flows, distributed as the cflow plugin for Claude Code and Codex. This repo authors and distributes the skills; it does not use them at runtime.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,040 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository10 other files it gives its agents.
- cf-architectureSkill
- cf-brainstormSkill
- cf-cleanSkill
- cf-cognitiveSkill
- cf-deadcodeSkill
- cf-docsSkill
- cf-mr-wolfSkill
- cf-placementSkill
- cf-scenarioSkill
- cf-testSkill
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 7
Test: pnpm test (Node built-in test runner): pack-wide checks in test/pack.test.mjs, one skill's contract in test/skills/<skill>.test.mjs, …
- Very specific: line 33
Run pnpm test before committing.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md 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
AGENTS.md
Clean Flow (Cflow): source pack of skills for cleanup/refactor flows, distributed as the cflow plugin for Claude Code and Codex. This repo authors and distributes the skills; it does not use them at runtime.
Commands
- Test:
pnpm test(Node built-in test runner): pack-wide checks intest/pack.test.mjs, one skill's contract intest/skills/<skill>.test.mjs, tool tests intest/*.test.mjs - Flow token report:
pnpm reportfor the full pack;pnpm report -- cf-cleanto focus output on one skill. The packaged report usessrc/commands/skill-token-report.context.jsonand fails when its runtime Markdown coverage drifts from the skill contracts. - Raw token count:
pnpm count-tokens -- <file...>for selected files; without file arguments it reads stdin. - Vendor shared files:
pnpm vendor;pnpm vendor -- --checkreports drift without writing. - Plugin check:
claude plugin validate .(Claude Code manifests; the Codex ones are covered bytest/plugin.test.mjs) - CLI (temporary):
node ./bin/cflow-skills.mjs migrate <repo>|--global [--dry-run]moves an installation made by the old installer onto the plugin.
Layout
.claude-plugin/— Claude Code'splugin.json(thecflowplugin; the repository root is its root) andmarketplace.json(theclean-flowmarketplace).codex-plugin/plugin.jsonand.agents/plugins/marketplace.json— the same plugin and marketplace for Codex;interfaceholds what only Codex shows.githooks/pre-commit— blocks a commit whose vendored copies or manifests are out of line;pnpm installenables it.github/workflows/main.yml— runspnpm teston pushes and pull requests tomain, the branch the marketplaces installskills/— the plugin's skills (cf-*), with their vendored copies committed; nothing elseshared/— content shared across skills (references/,scripts/) andvendor.jsonsrc/— vendoring, token reports, and the temporarymigratecommand (commands/,lib/)docs/sources/— one mirror per skill (cf-<name>.md) with the sources its rules rest on;docs/maintaining-this-pack.mdis the guidetest/— Node test suites (skills/per skill,support/helpers)
Rules
- ESM only (
.mjs,type: module); pnpm; single dev dep:tiktoken. - Runtime contracts live in
SKILL.md+ linked references. A skill's mirror indocs/sources/holds only the literature each rule rests on, quoted and linked: when a rule is added or changed, add or update its source there; never restate the contract. - Content shared across skills lives once in
shared/(references/,scripts/);shared/vendor.jsonmaps which skills receive which files. Each shared file has a committed copy in every consuming skill'sreferences//scripts/, because the hosts installskills/as it is. To share content: author it inshared/, map it invendor.json, runpnpm vendor— never edit the vendored copies; a test fails when a copy differs from its source. - Both
plugin.jsonfiles carry thepackage.jsonversionand the samedescription(a test checks it); bump all three only when releasing tomain, since users receive a new version only when it changes. migratemust stay idempotent; don't bootstrap.cflow/here.- Run
pnpm testbefore committing. CHANGELOG.mdis written only when releasing tomain, from the commits since the previous release; work ondevadds nothing to it. Follow Keep a Changelog: one heading per release (## <version> - <date>), changes grouped underAdded,Changed,Fixed,Removed, one short line per user-visible change saying what changed for whoever installs the pack. No measurements, run counts, token counts or rationale.- Work lands on
dev;mainmoves only at a release. To release: add onerelease: <version>commit ondevwith the CHANGELOG entry and the version bump, fast-forwardmainto it without squashing, tag it<version>(annotated, novprefix), and push both branches and the tag.
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.

