# Command Guard

> Enforce .agentpolicy rules before executing commands.

- Skill: `majiayu000/command-guard-2` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add majiayu000/command-guard-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/command-guard-2/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/majiayu000/command-guard-2

---


## Purpose
Prevent destructive or risky commands without explicit approval.

## Steps
1. Read `.agentpolicy` before running commands.
2. Block denied commands and request confirmation for guarded ones.
3. Record the decision in the Action Log.

## Guardrails
- Always respect `.agentpolicy` and `.agentignore`.

