arch-guard
Skill2 starsChanged 31 days agoMITView on GitHub
Call the arch-guard sub-agent before and after every code change in pm so new code lands in the right package, reuses the shared helpers and stays within the size limits of docs/ARCHITECTURE.md. Use before writing or delegating any Python, template, CSS or JS change (mode pre) and after it is written, before commit/merge (mode post). Also use when the user asks to check architecture, structure, placement or duplication — even if they do not say the word skill.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- wensihao123/Claude_Skillstheir own version, first seen Jun 21, 2026
- Karatuss/bstacktheir own version, first seen Apr 27, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- wensihao123/Claude_Skills★ 2same name
- Karatuss/bstack★ 0same 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 repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- builder-previewSkill
- features-auditSkill
- features-updateSkill
- screen-validatorSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
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
- Distinctive: line 30
Do not commit on FAIL. Stop after 3 rounds and show the remaining findings to the user.
- Distinctive: line 37
Read-only: never edits, commits or runs the app.
- Very specific: line 45
When a rule changes, update docs/ARCHITECTURE.md in the same commit.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
arch-guard: check placement before, verify structure after
docs/ARCHITECTURE.md is the rulebook (target layout, layer rules, shared helpers, size limits,
migration status). For dt theme files (src/pm/web/dt, src/pm/web/themes/dt, tests/web/dt) the sub-agent
also applies docs/themes/dt/CONDUCT.md (V7-* ids), docs/themes/dt/SHELL.md and docs/themes/dt/CODE.md;
classic UI files follow docs/UI-RULES.md. The two themes' rules never cross. The arch-guard sub-agent is
read-only and applies them. Skip only for changes that touch nothing but Markdown docs.
Flow (main agent)
- Before —
Agent(subagent_type="arch-guard", prompt="mode: pre\nworktree: <path>\ntask: <what and why>"). Pass its Owner, Reuse, Rules and Tests sections to the agent that writes the code (or use them yourself) as the file list and contract. If it says to split an oversized file, that split is part of the task. - Implement — the agent that writes the code (or you), with tests.
- After —
Agent(subagent_type="arch-guard", prompt="mode: post\nworktree: <path>\nbase: main\ntask: <same>").PASS→ continue with tests, screen-validator (UI changes), commit; describe user-visible changes in the PR (the maintainer adds the CHANGELOG / FEATURES entries).FAIL→ fix the findings (or hand them back to the agent that wrote the code), then runpostagain. Do not commit on FAIL. Stop after 3 rounds and show the remaining findings to the user.
- Mention the final verdict in the report (one line).
Several independent tasks: one pre per task (they may run in parallel), one post per task's diff.
Rules for the sub-agent
- Read-only: never edits, commits or runs the app. Never reads pm's token, TOTP or dev-token.
- Judges only what the diff introduces or worsens; old debt is a one-line note, not a FAIL.
- Uses helper names as they exist in the tree now (
docs/ARCHITECTURE.md"Shared helpers"). ./tools/check.sh(=make check) must pass; it scans the dt static tree with zero tolerance.tools/archcheck_baseline.jsonmay only shrink. Any added entry or raised count is a FAIL.
Updating the rules
When a rule changes, update docs/ARCHITECTURE.md in the same commit; for dt, docs/themes/dt/CONDUCT.md or
docs/themes/dt/CODE.md. The agent and this skill read those files, so they need no edit for rule changes.
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.

