| name | self-audit |
| description | Meta-gate that audits the current session's own actions before any commit โ philosophy, scope, convention, and token-budget violations. Read-only on session state; emits a single inline table verdict. Use as the final step of any multi-edit / multi-cycle task. Triggers: "self-audit", "audit yourself", "self-check", "์
ํ ์ ๊ฒ", "์
ํ ๊ฐ์ฌ", "๋ด ํ๋ ์ ๊ฒ", "before commit"
|
| version | 0.1.0 |
| ssl | {"scheduling":{"anti_triggers":["SSL audit of a SKILL.md target โ use galmuri:skill-audit","Completion-claim gate on code/UI โ use galmuri:polish","Test-gap / coverage inspection โ use galmuri:ralphi","Decision forcing โ use harnish:forki"]},"structural":{"scenes":["Survey","Check","Verdict","Halt-or-Pass"],"resumable":false,"branches":["0 violations โ 'self-audit clean, proceed to commit'","1+ violations โ halt, list violations + propose fixes, wait for user 'go'","report length > 1500 tokens โ write to tmp/self-audit-<ts>.md and link"]},"logical":{"tools":["Bash","Read"],"side_effects":{"reads":["git diff (current session changes)","git status","current branch name"],"writes":["tmp/self-audit-<ts>.md when the inline report would exceed 1500 tokens"],"deletes":[],"network":[]},"idempotent":true,"rollback":null}} |
galmuri:self-audit โ session action gate
"๊ฒ์ฆ ์์ด ์๋ฃ ์ ์ธํ์ง ์๋๋ค." A pre-commit meta-gate. Audits Claude's own actions in the current session, not external code.
When to run
- Before any commit on a feature branch
- After any multi-cycle task (
polish / ralphi / audit loop) completes
- When the user says "audit yourself" / "self-check" / "์
ํ ์ ๊ฒ"
- Automatically as the final step of any multi-edit task
If invoked bare on a quiet diff, ask: "Anything in this session you want me to scrutinise specifically? e.g. a scope decision you weren't sure about, a refactor you want double-checked."
Step 1: Survey
Collect the audit surface for this session:
git status --short
git diff --stat
git branch --show-current
git log -1 --pretty=%H
Do not read full file contents โ only the diff and stat. The point is to check what changed in this session, not to review the whole codebase.
Step 2: Check (4 axes)
2-A. Philosophy violations (highest severity)
| Check | Pattern (rg over git diff) |
|---|
ROP โ no withTimeout or defensive {timeout: N} introduced | rg -nP 'withTimeout|timeout:\s*\d+' |
| ROP โ no silent try/catch wrappers added | rg -nP 'catch\s*\([^)]*\)\s*\{[^}]*$' |
| SSOT โ no hardcoded version-specific field names | rg -nP 'v\d+\.\w+|schema_v\d' |
| "compress" preserved structure (no H2 / step removal) | manual diff inspection |
| Locale separation โ en / ko / jp content in correct file | rg -l '[๊ฐ-ํฃ]' diff filtered by .md$ (not .ko.md/.jp.md) |
2-B. Scope violations
- Did I act on an ambiguous affirmative ("์", "ok", "๊ทธ๋") while a pending follow-up question was open?
- Did I invent tooling, helpers, or abstractions not asked for?
- Did I delete or modify at scale (>5 files) without proposing the candidate set first?
2-C. Convention violations
testid constants are UPPER_SNAKE_CASE โ rg 'data-testid="[a-z]' over diff
- No raw
px / hex values outside design-token files
- No deep imports bypassing a public API surface
2-D. Token-efficiency violations
- Did I output > 30 lines of report content directly to chat (should be a file under
docs/reports/ or tmp/)?
- Did I quote entire functions or files in verifier output?
- Did I batch multiple cycles into a single commit?
- Did I retry a failing command in a
sleep loop instead of diagnosing the root cause?
Step 3: Verdict (inline table)
Output exactly this table โ one row per check, โ or โ only. Evidence is a path / line / rg pattern, never a quoted block.
| Check | Status | Evidence | Fix |
|----------------------------------------------------|--------|--------------------------------|--------------------------------|
| ROP โ no withTimeout / defensive timeout | โ/โ | file:line | revert + use Result type |
| ROP โ no silent try/catch | โ/โ | file:line | rethrow or convert to Result |
| SSOT โ no hardcoded version field names | โ/โ | file:line | parse-don't-validate |
| Compress preserved structure | โ/โ | section diff stat | restore deleted section |
| Locale separation respected | โ/โ | file:line | move content to correct file |
| Scope confirmed before ambiguous affirmative | โ/โ | conversation turn | revert action, re-confirm |
| No invented tooling | โ/โ | file path | remove invented helper |
| Bulk modify proposed before applying | โ/โ | files changed count | revert + propose list |
| testid UPPER_SNAKE_CASE | โ/โ | file:line | rename constant |
| No raw px / hex outside tokens | โ/โ | file:line | use design token |
| No deep imports bypassing public API | โ/โ | file:line | use public re-export |
| Chat output โค 30 lines | โ/โ | last report length | move to docs/reports/ |
| No entire-file quoting in verifier output | โ/โ | output line range | summarize + link |
| One cycle = one commit | โ/โ | `git log` last N commits | split commit |
| No sleep-loop retry of failing command | โ/โ | shell history | diagnose root cause |
Step 4: Halt-or-Pass
- 0 violations โ emit one line:
self-audit clean, proceed to commit.
- 1+ violations โ halt. List violations + propose fixes. Wait for explicit "go" / "proceed" / "์ด๋๋ก ๊ฐ" before any further action.
Token budget
- Inline table โค 1500 tokens. If the diff is too large for an inline pass, write the report to
tmp/self-audit-<ts>.md and emit only a one-line summary + path to chat.
What this skill does NOT do
- โ Modify any session file
- โ Audit other repos / other sessions
- โ SSL-decompose a SKILL.md (that is
galmuri:skill-audit)
- โ Replace
galmuri:polish (which gates UI/code-completion claims) or galmuri:ralphi (which budgets quality loops)