Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add riekelt/principal-engineer --skill guarding-architecture -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/guarding-architecture/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/guarding-architecture/

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.

Similar skills

All skills for Code review and refactoring →

From the same set5

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor