design-guards
Skill5 starsChanged 6 months agoMITView on GitHub
Investigate a bug pattern audit report and design architectural guards (tests, contracts, structural changes) that provide immunity to each identified pattern. Use when user says "design guards", "design defenses", or wants architectural solutions for bug patterns.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Trecek/useful-claude-skillsword for word, first seen Mar 26, 2026
Other versions1 project uses a version of this.
Word for word · 1
- Trecek/useful-claude-skills★ 1100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
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 repository23 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/CLAUDE.mdCLAUDE.md
- tests/CLAUDE.mdCLAUDE.md
- audit-archSkill
- audit-bugsSkill
- audit-cohesionSkill
- audit-defense-standardsSkill
- audit-testsSkill
- chart-courseSkill
- check-bearingSkill
- elaborate-phaseSkill
- id-slopSkill
- make-arch-diagSkill
- make-reqSkill
- make-scenariosSkill
- promote-to-mainSkill
- render-recipeSkill
- review-promotionSkill
- update-architectureSkill
- update-reqsSkill
- update-specsSkill
- validate-auditSkill
- verify-diagSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
After /audit-bugs produces a bug pattern report
- Very specific: line 32
Create files outside temp/design-guards/ directory
- Distinctive: line 35
Use subagents for parallel codebase exploration
- Very specific: line 38
All output goes under temp/design-guards/ (create if needed)
- Distinctive: line 41
Do not change any code
- Distinctive: line 47
Read the input report and extract each pattern:
- Very specific: line 85
Ensure temp/design-guards/ exists (mkdir -p).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Design Guards Skill
Take a bug pattern audit report and design architectural guards that make each pattern structurally impossible or instantly caught. This is a multi-pattern analysis driven by a pattern report rather than a single bug investigation.
When to Use
- After
/audit-bugsproduces a bug pattern report - User says "design guards", "design defenses", or "guard against these patterns"
- User wants architectural immunity for a set of identified bug patterns
Arguments
Path to a bug pattern audit report (typically under temp/audit-bugs/). If not specified, use the most recent temp/audit-bugs/bug_pattern_audit_*.md.
Critical Constraints
NEVER:
- Modify any source code files
- Propose bandaid fixes or direct-only patches
- Create files outside
temp/design-guards/directory
ALWAYS:
- Use subagents for parallel codebase exploration
- Focus on structural immunity over one-off fixes
- Each guard must be concrete and testable
- All output goes under
temp/design-guards/(create if needed) - Final report:
temp/design-guards/defense_guards_{YYYY-MM-DD_HHMMSS}.md - Subagents must NOT create their own files - they return findings in their response text only
- Do not change any code
Workflow
Step 1: Parse the Bug Pattern Report
Read the input report and extract each pattern:
- Pattern name and description
- Affected components and sessions
- The root architectural gap identified
Step 2: Investigate Each Pattern in Parallel
For each pattern (or group of related patterns), launch subagents to explore:
Current State
- Find all current instances of the pattern in the codebase (not just the ones that already caused bugs)
- Map which components are vulnerable to this pattern today
Existing Guards
- What tests, contracts, or validation already exists for this area?
- Why did existing guards miss these bugs?
Architectural Solutions
- How do well-designed parts of the codebase prevent similar issues?
- What structural pattern would make this class of bug impossible?
- What's the minimum change that provides maximum coverage?
Step 3: Design Guards for Each Pattern
For each pattern, produce:
- Detection scan - A concrete grep/search command or pattern that finds latent instances today
- Contract test - A test that fails if the pattern re-emerges (description of what it asserts, not code)
- Structural guard - An architectural change that makes the pattern impossible by construction (if applicable)
- Standard recommendation - Whether this should become an enforced standard in
/audit-defense-standards
Prioritize guards by:
- Coverage: How many bug instances would this single guard have prevented?
- Automation: Can it be enforced in CI/pre-commit, or does it require manual audit?
- Cost: How invasive is the change?
Step 4: Write Report
Ensure temp/design-guards/ exists (mkdir -p).
Save to: temp/design-guards/defense_guards_{YYYY-MM-DD_HHMMSS}.md
# Defense Guards: {Report Title}
**Date:** {today}
**Source Report:** {path to bug audit report}
**Patterns Addressed:** {count}
## Summary
{Which patterns get guards, expected coverage, recommended standards}
## Guard N: {Pattern Name}
**Addresses Pattern:** {name} ({X} of {Y} historical bugs)
### Current Exposure
{How many latent instances exist in the codebase today}
### Detection Scan
{Runnable grep/search commands}
### Contract Test
{What the test asserts, where it belongs}
### Structural Guard
{Architectural change that prevents by construction}
### Standard Recommendation
{YES/NO - should this become an audit-defense-standards entry?}
{If YES: one-sentence rule statement}
---
## Standards to Add
{List of guards recommended as permanent standards for audit-defense-standards, with rule statements}Step 5: Terminal Summary
Output: guard count, coverage stats, how many standards recommended, and report location.
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.

