njt2810/claude-code-framework/guard

Claude Code and agent skill by njt2810/claude-code-framework

Trust tier 3
  • community
Source check pending

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/guard

SKILL.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:

json
{
"mode": "guard",
"what": "{specific change}",
"why": "{justification}",
"failure_modes": ["..."],
"approver": "{name or 'self-approved'}",
"rollback_plan": "{how to reverse}",
"entered_at": "{ISO}",
"entered_by": "{user}"
}

Step 3 — Apply Guard Mode Rules

Everything in /careful, PLUS:

  1. No actions without explicit "yes" per step. The Lead Engineer

describes what it's about to do and stops.

  1. 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
  1. Time-boxed window:
  • Guard mode auto-expires after 1 hour
  • Re-enter to extend
  1. Audit log enrichment:
  • Every action logged with "guard-mode" tag + the captured "what/why"
  • Logged to wiki/compliance/evidence/guard-mode-log.md
  1. Postmortem on mistakes:
  • If something goes wrong while in guard mode → /incident automatically

Step 4 — Announce

🔴 GUARD MODE ACTIVATED — highest caution
What: {change}
Why: {justification}
Failure modes: {list}
Rollback: {plan}
Approver: {name}
Expires: {entered + 1 hour}
While in guard mode:
✓ Everything in /careful mode
✓ Explicit "yes" required for every action
✓ Snapshot taken before action
✓ Auto-expires in 1 hour
✓ Actions logged to wiki/compliance/evidence/guard-mode-log.md
✓ If anything breaks → /incident automatically
Recommended next:
- Walk through the change step by step
- Confirm each step before execution
- Run /unfreeze when done (or wait for 1-hour auto-expire)

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.json written 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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/njt2810/claude-code-framework/guard/badge)](https://verified-skill.com/skills/njt2810/claude-code-framework/guard)

Something wrong with this skill or its page? Tell us.