njt2810/claude-code-framework/guard
Claude Code and agent skill by njt2810/claude-code-framework
- community
Checking that the SKILL.md file is still in the repository.
TRIGGER when: the user is about to touch CRITICAL systems (production DB, auth provider config, payment processor settings, signing keys, IAM roles), or says "guard mode", "this is critical", "highest caution". DO NOT TRIGGER when: medium-risk work (use /careful instead) or routine work.
Install
npx vskill@latest install njt2810/claude-code-framework/guardSKILL.md
The same SKILL.md was published earlier as njt2810/claude-code-framework/guard.
Guard Mode
When to Use
The most cautious mode. Reserved for changes that, if wrong, can:
- Cause data loss
- Lock out users
- Expose secrets
- Trigger compliance incidents
- Cost real money (e.g., misconfigured Stripe webhook)
Examples:
- Rotating production signing keys
- Changing IAM roles in cloud console
- Modifying production DB constraints
- Editing auth provider trust relationships
- Changing payment processor webhook endpoints
Lead Engineer Guidance — Why This Matters
Guard mode is /careful plus a human-in-the-loop confirmation discipline. The Lead Engineer will NOT proceed without you actively saying "yes, do X." No defaults, no inferences.
If you ever wonder "should I be in guard mode?" — yes, you should be.
Procedure
Step 1 — Capture Intent
Ask (and require answers):
- WHAT change are you making? (specific, not vague)
- WHY now? (justification)
- WHAT could go wrong? (you list the failure modes)
- WHO else has approved? (for team: name an approver; for solo: write "self-approved with reasoning")
- WHAT's the rollback? (how do you reverse this)
If any answer is missing, refuse to enter guard mode.
Step 2 — Set Mode
Write to .claude/state/mode.json:
Step 3 — Apply Guard Mode Rules
Everything in /careful, PLUS:
- No actions without explicit "yes" per step. The Lead Engineer
describes what it's about to do and stops.
- Snapshot before action:
- Database: take a snapshot or confirm one exists from < 1 hour ago
- Config: capture current state (export, screenshot)
- Cloud resources: terraform plan / cloud console export
- Time-boxed window:
- Guard mode auto-expires after 1 hour
- Re-enter to extend
- Audit log enrichment:
- Every action logged with "guard-mode" tag + the captured "what/why"
- Logged to
wiki/compliance/evidence/guard-mode-log.md
- Postmortem on mistakes:
- If something goes wrong while in guard mode → /incident automatically
Step 4 — Announce
Pitfalls
- Entering guard mode without a rollback plan — defeats the purpose
- Spending too long in guard mode → fatigue → typo → disaster
- Bypassing the explicit "yes" requirements — strip the safety
- Not capturing the snapshot — can't compare or restore
Verification
.claude/state/mode.jsonwritten with mode = "guard" and all required fields- All "what/why/rollback" fields filled
- Snapshot taken or confirmed
- Time-bound expiry set
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/guard/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. 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/njt2810/claude-code-framework/guard)