rhyolyn/handbag-of-holding/architecture-guards
Claude Code and agent skill by rhyolyn/handbag-of-holding
- community
Checking that the SKILL.md file is still in the repository.
Use when establishing an architectural rule that must survive future sessions — layer boundaries, import direction, state ownership, size tripwires — or when such a rule exists only in prose, review feedback, or comments and has no failing check in CI.
Install
npx vskill@latest install rhyolyn/handbag-of-holding/architecture-guardsSKILL.md
The same SKILL.md was published earlier as rhyolyn/handbag-of-holding/architecture-guards.
Architecture Guards
Overview
An architectural rule that is not machine-checked does not exist across sessions. This skill holds per-ecosystem recipes for turning rules into checks.
A qualifying guard has four properties:
- Runs in CI and fails the build on violation.
- Is named after the rule it enforces (
test_views_do_not_import_state_layers, nottest_imports_2). - Has a planted-violation test proving it fires on a synthetic offender.
- Fails loudly when it scans nothing — an empty directory, a moved path, or a parser blind spot must break the guard, not green it.
When NOT to use: one-off style preferences (linter config), rules a compiler already enforces, or judgment calls that genuinely need a human (cohesion, naming) — those get review checklists, not guards.
Quick reference
| Rule type | Python | Unreal C++ | TypeScript | |
|---|---|---|---|---|
| Layer / import direction | pytest AST scanner (below) | .Build.cs module dependency lists | eslint no-restricted-imports, dependency-cruiser | |
| Type-strictness ratchet | pyright include list, widened per migration step | — | tsconfig include list / project references | |
| Deleted module cannot return | forbidden-import list test, grown at deletion time | remove from every .Build.cs; CI compile fails on reuse | dependency-cruiser forbidden rule | |
| "No logic in X" (declarative-only files) | AST node walk (forbid If/For/While/Match/Try) | header-scan Automation test | eslint custom rule | |
| Size tripwire | line-count test + allowlist with justification comment | CI script + allowlist | same | |
| Suite actually ran | pytest exits 5 on zero collected — never mask it | assert Automation test count > 0 | ban --passWithNoTests |
Python: AST import scanner (reference implementation)
Regex cannot resolve relative imports; parse the AST. One scanner serves every layer rule:
A guard is then one assertion:
Always ship the two safety tests alongside:
Unreal C++
- Layering is native: a module can only include what its
.Build.csdeclares inPublicDependencyModuleNames/PrivateDependencyModuleNames. Express layer rules as dependency lists — the compiler is the guard, and CI compilation is the check. Prefer this over any scanner. - Deleting a module: remove it from every
.Build.csin the same change; reintroduction then fails compilation, which is the forbidden-list equivalent. - Rules inside one module (e.g., "gameplay code never includes editor headers"): an Automation spec that walks the module's
Public//Private/headers and fails on banned#includepatterns. Give it a planted offender under a test fixture directory. - Suite-ran check: the automation runner reports executed test counts; fail CI when the filter matched zero tests.
TypeScript
- Per-layer import bans:
no-restricted-importsin eslint overrides keyed by folder, oreslint-plugin-boundariesfor whole-architecture element types. - Graph rules (cycles, orphans, forbidden edges): dependency-cruiser with
forbiddenrules, run in CI; itsreachable/orphanrules catch dead modules. - Hard boundaries beat lint: tsconfig project references make an upward import unresolvable rather than merely flagged. Use references between layers, lint within them.
CI patterns (any ecosystem)
- Fail-on-empty selection: a green job that ran nothing is the most expensive kind of green. pytest exits 5 on zero collected tests — let it fail the job; where the runner doesn't do this, assert on the reported count.
- Size tripwires force a decision, not a verdict: a trip requires an allowlist entry plus a justification comment in the same PR. A cohesive large file with a justification is a pass; splitting to duck the gate is the failure mode the tripwire exists to surface.
- Deletion rule for migrations: every change that deletes a superseded module also adds it to the forbidden list. Old code that "cannot creep back" is a property of the guard, not of intentions.
Common mistakes
- Guard greens because it scans nothing. Moved directory, renamed package, glob typo. Fix: the scans-real-files assertion, always.
- Regex import matching. Misses relative imports, aliases, and multi-line imports. Parse the AST.
- Rule lives only in AGENTS.md or a comment. It will be violated politely and confidently. Write the check in the same change that states the rule.
- No planted violation. You proved the guard passes, never that it can fail — that is an untested test.
- Count gates as verdicts. Line/file/parameter counts are tripwires for human decisions; hard-failing on them rewards evasive splitting.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsecret-agents/docs/migrations/2026-10-13-worky-agent/.retired-worky-tree/skills/architecture-guards/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/rhyolyn/handbag-of-holding/architecture-guards)