guarding-architecture — Claude Code skill: how to install
Enforces system boundaries by turning structural invariants into breaking build tests. Useful when code crosses module limits or adds unwanted cross-package imports.
npx skills add riekelt/principal-engineer --skill guarding-architecture -a claude-codeWhat guarding-architecture does
The skill requires the principal-engineering skill as a prerequisite. It instructs the agent to treat invariants as strict contracts with an incident-backed rationale and automated guards. Rules kept only in memory get forgotten. Here they must break the build on forbidden imports or layer violations.
System definitions stay split in two parts. Core principles stay in a stable document free of class names, while implementations and tests live in an accompanying file. If code clashes with an invariant, the design must change. Weakening contracts to match nonconforming code is strictly disallowed.
Exceptions exist only as documented amendments or dated waivers with expiry criteria and owner sign-off. Bypassing a guard without an explicit waiver is treated as a hidden defect.
What it helps with
- convert architectural conventions into automated build tests
- prevent forbidden cross-package imports and circular dependencies
- isolate the hot path from slow I/O operations
- document structured temporary waivers with explicit expiry dates
Example prompts for the agent
- Check if this new dependency direction violates domain isolation rules.
- Write an architecture test preventing the core module from importing web transport packages.
- Create an amendment proposal for this boundary exception with owner sign-off.
How to install guarding-architecture
1Skills CLI (Vercel)
npx skills add riekelt/principal-engineer --skill guarding-architecture -a claude-code2Manually: put the files in place
~/.claude/skills/guarding-architecture/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/guarding-architecture/
1Skills CLI (Vercel)
npx skills add riekelt/principal-engineer --skill guarding-architecture -a codex2Manually: put the files in place
.agents/skills/guarding-architecture/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add riekelt/principal-engineer --skill guarding-architecture -a cursor2Manually: put the files in place
.cursor/skills/guarding-architecture/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install riekelt/principal-engineer guarding-architecture2Manually: put the files in place
.github/skills/guarding-architecture/SKILL.md1Skills CLI (Vercel)
npx skills add riekelt/principal-engineer --skill guarding-architecture -a gemini-cli2Platform CLI
gemini skills install https://github.com/riekelt/principal-engineer --path plugins/principal-engineer/skills/guarding-architectureManually: put the files in place
.devin/skills/guarding-architecture/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add riekelt/principal-engineer --skill guarding-architecture -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about guarding-architecture
How do I install guarding-architecture in Claude Code?
Run npx skills add riekelt/principal-engineer --skill guarding-architecture -a claude-code in your terminal.
What does guarding-architecture do?
It encodes module boundaries into automated tests and explicit review checks, preventing architecture degradation caused by quick convenience imports.
What prerequisite does this skill require?
It requires the principal-engineering skill to provide baseline patterns and engineering rules.