Add .claude/hooks for command auditing, dangerous command blocking, file protection, and auto-formatting; update documentation and configuration to integrate new hooks.

This commit is contained in:
olekhondera
2026-02-14 21:22:27 +02:00
parent 5b28ea675d
commit 6d2eef5317
8 changed files with 227 additions and 0 deletions

25
DOCS.md
View File

@@ -71,6 +71,31 @@ Technical index for developers and AI agents. Use this as the entry point to all
- `agents/code-reviewer.md` — code quality and PR review.
- `agents/prompt-engineer.md` — LLM prompt design and optimization.
## Claude Code Skills (`/.claude/skills`)
- `.claude/skills/update-status/` — sync project status across docs after milestone.
- `.claude/skills/phase-transition/` — full phase transition with verification.
- `.claude/skills/init-project/` — interactive project initialization wizard.
- `.claude/skills/component/` — scaffold accessible React component (frontend-architect).
- `.claude/skills/a11y-audit/` — WCAG 2.2 AA accessibility audit (frontend-architect).
- `.claude/skills/api-endpoint/` — scaffold REST API endpoint (backend-architect).
- `.claude/skills/db-schema/` — design database schema with migration (backend-architect).
- `.claude/skills/security-audit/` — OWASP security audit of git diff (security-auditor).
- `.claude/skills/threat-model/` — threat modeling with risk tiers (security-auditor).
- `.claude/skills/write-tests/` — write tests with Vitest + Testing Library (test-engineer).
- `.claude/skills/test-plan/` — test strategy and coverage plan (test-engineer).
- `.claude/skills/review/` — code review of current git diff (code-reviewer).
- `.claude/skills/review-pr/` — GitHub PR review by number (code-reviewer).
- `.claude/skills/improve-prompt/` — diagnose and improve LLM prompt (prompt-engineer).
## Claude Code Hooks (`/.claude/hooks`)
- `.claude/hooks/protect-files.sh` — blocks edits to `.env`, lock files, `.git/`, keys.
- `.claude/hooks/bash-firewall.sh` — blocks destructive commands (`rm -rf /`, `git reset --hard`, etc.).
- `.claude/hooks/post-edit-format.sh` — auto-formats files with Prettier after edits.
- `.claude/hooks/audit-log.sh` — logs all Bash commands with timestamp to `audit.log`.
- `.claude/settings.json` — hooks configuration (also: Notification, SessionStart compact context).
## GitHub Templates (`/.github`)
- `.github/ISSUE_TEMPLATE/bug_report.md` — bug report template.