feature-audit
БесплатноБез исполняемых скриптовНе проверенRuntime behavior auditing through systematic log injection. Use when user wants to understand what code is doing at runtime, debug complex flows, or audit a…
Об этом скилле
Runtime Audit Command
You are executing the RUNTIME AUDIT workflow - a process that bridges static analysis with actual execution observation. Unlike static code analysis, this command actively injects logs, captures runtime data, and produces verifiable reports.
Contents
- Audit Target
- What Makes This Different
- File Organization
- Workflow Overview
- Phase Details
- Log Injection Design
- Error Handling
Audit Target
$ARGUMENTS
If no specific process was provided above, you will help the user identify what they want to audit.
What Makes This Different
Static analysis (code-archaeologist): Reads code, infers behavior Runtime audit (this command): Injects logs, observes actual behavior, confirms expectations
Key capability: "I think this code does X" → run audit → "Confirmed: this code actually does X"
This provides evidence-based verification rather than inference.
File Organization
All audit artifacts are stored in:
docs/audits/
├── registry.json # Index of all audits
└── [audit-id]/
├── report.md # Final audit report
├── session.json # Audit metadata
├── injections.json # Track all injected logs for cleanup
└── logs/
└── captured-[timestamp].log
Key Principles:
- Every injected log is tracked in
injections.json - Complete cleanup is always possible via the manifest
- Reports persist as permanent verification records
Workflow Overview
This command orchestrates a 7-phase workflow:
| Phase | Name | Purpose |
|---|---|---|
| 1 | Target Identification | User describes process to audit, identify entry points |
| 2 | Code Exploration | Map execution paths, identify strategic log points |
| 3 | Injection Strategy | Plan non-invasive logs, get user approval |
| 4 | Log Injection | Add approved log statements (tracked for cleanup) |
| 5 | Runtime Capture | User executes process, capture log output |
| 6 | Analysis & Report | Analyze data, verify behavior, generate report |
| 7 | Cleanup | Remove injected logs, restore code to pre-audit state |
Phase Details
Phase 1: Target Identification
See: target.md
- Understand what process/behavior to audit
- Identify entry points and key questions
- Create audit session with unique ID
- Initialize audit directory structure
Phase 2: Code Exploration
See: exploration.md
- Map execution paths from entry points
- Identify data flows and transformations
- Find strategic locations for log injection
- Document assumptions to verify
Phase 3: Injection Strategy
- Plan specific log statements for each location
- Use language-appropriate patterns
- Present plan to user for approval
- Explain what each log will reveal
Phase 4: Log Injection (Requires Approval)
See: injection-active.md
- Inject approved log statements
- Mark each with
// AUDIT-INJECTEDcomment - Track all changes in
injections.json - Verify code still compiles/runs
Phase 5: Runtime Capture
See: runtime-capture.md
- User chooses capture method (paste or direct execution)
- Capture log output from process execution
- Store captured data in audit directory
- Support multiple capture rounds if needed
Phase 6: Analysis & Report
See: analysis.md
- Parse captured log output
- Compare actual behavior to expectations
- Identify verified behaviors vs unexpected findings
- Generate comprehensive audit report
Phase 7: Cleanup
See: cleanup.md
- Remove all injected log statements
- Verify code is restored to pre-audit state
- Update audit session as complete
- Present final report summary
Log Injection Design
Safety Principles
- All injected code tagged with language-appropriate marker
- Tracked in
injections.jsonfor reliable cleanup - User approval required before any code modification
- Logs are observational only (no behavior changes)
Language-Agnostic Templates
| Language | Log Pattern | Marker |
|---|---|---|
| TypeScript/JS | console.log('[AUDIT:id:N]', data); |
// AUDIT-INJECTED |
| Python | print(f'[AUDIT:id:N] {data}') |
# AUDIT-INJECTED |
| Go | fmt.Printf("[AUDIT:id:N] %v\n", data) |
// AUDIT-INJECTED |
| Rust | println!("[AUDIT:{}:{}] {:?}", id, n, data); |
// AUDIT-INJECTED |
| Java | System.out.println("[AUDIT:id:N] " + data); |
// AUDIT-INJECTED |
Language is detected from file extension and appropriate template applied.
Rollback Guarantee
Every modification is tracked in injections.json:
{
"auditId": "auth-flow-001",
"injections": [
{
"id": 1,
Установить feature-audit в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл feature-audit?
Runtime behavior auditing through systematic log injection. Use when user wants to understand what code is doing at runtime, debug complex flows, or audit a process.
Как установить скилл feature-audit?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл feature-audit запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic