From hoyeon
Analyzes Claude Code sessions to validate skill, agent, hook behavior, tool calls, and artifacts against SKILL.md specs using logs and debug files. Activated by session ID and skill path.
npx claudepluginhub team-attention/hoyeon --plugin hoyeonThis skill is limited to using the following tools:
Post-hoc analysis tool for validating Claude Code session behavior against SKILL.md specifications.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Post-hoc analysis tool for validating Claude Code session behavior against SKILL.md specifications.
Analyze completed sessions to verify:
| Parameter | Required | Description |
|---|---|---|
sessionId | YES | UUID of the session to analyze |
targetSkill | YES | Path to SKILL.md to validate against |
additionalRequirements | NO | Extra validation criteria |
Session files are located in ~/.claude/:
# Main session log
~/.claude/projects/-{encoded-cwd}/{sessionId}.jsonl
# Debug log (detailed)
~/.claude/debug/{sessionId}.txt
# Agent transcripts (if subagents were used)
~/.claude/projects/-{encoded-cwd}/agent-{agentId}.jsonl
Use script to locate files:
${baseDir}/scripts/find-session-files.sh {sessionId}
Check all required files exist before proceeding. If debug log is missing, analysis will be limited.
Read the target SKILL.md and identify:
From YAML Frontmatter:
hooks.PreToolUse - Expected PreToolUse hooks and matchershooks.PostToolUse - Expected PostToolUse hookshooks.Stop - Expected Stop hookshooks.SubagentStop - Expected SubagentStop hooksallowed-tools - Tools the skill is allowed to useFrom Markdown Body:
Task(subagent_type="..."))Skill("...")).hoyeon/drafts/, .hoyeon/specs/, etc.)Create checklist from SKILL.md analysis:
## Expected Behavior
### SubAgents
- [ ] Explore agent called (parallel, run_in_background)
- [ ] gap-analyzer called before plan generation
- [ ] plan-reviewer called after plan creation
### Hooks
- [ ] PreToolUse[Edit|Write] triggers plan-guard.sh
- [ ] Stop hook validates plan-reviewer approval
### Artifacts
- [ ] Draft file created at .hoyeon/drafts/{name}.md
- [ ] Plan file created at .hoyeon/specs/{name}.md
- [ ] Draft file deleted after OKAY
### Workflow
- [ ] Interview Mode before Plan Generation
- [ ] User explicit request triggers plan generation
- [ ] Reviewer REJECT causes revision loop
The debug log (~/.claude/debug/{sessionId}.txt) contains detailed execution traces.
Search patterns:
SubagentStart with query: {agent-name}
SubagentStop with query: {agent-id}
Use script:
${baseDir}/scripts/extract-subagent-calls.sh {debug-log-path}
Search patterns:
Getting matching hook commands for {HookEvent} with query: {tool-name}
Matched {N} unique hooks for query "{query}"
Hooks: Processing prompt hook with prompt: {prompt}
Hooks: Prompt hook condition was met/not met
permissionDecision: allow/deny
Use script:
${baseDir}/scripts/extract-hook-events.sh {debug-log-path}
Search patterns:
executePreToolHooks called for tool: {tool-name}
File {path} written atomically
For prompt-based hooks, find the model response:
Hooks: Model response: {
"ok": true/false,
"reason": "..."
}
For each expected artifact:
FileHistory: Tracked file modification for {path}File {path} written atomicallyFor files that should be deleted:
rm commands in Bash calls| Component | Expected | Actual | Status |
|-----------|----------|--------|--------|
| Explore agent | 2 parallel calls | 2 calls at 09:39:26 | ✅ |
| gap-analyzer | Called before plan | Called at 09:43:08 | ✅ |
| plan-reviewer | Called after plan | 2 calls (REJECT→OKAY) | ✅ |
| PreToolUse hook | Edit\|Write matcher | Triggered for Write | ✅ |
| Stop hook | Validates approval | Returned ok:true | ✅ |
| Draft file | Created then deleted | Created→Deleted | ✅ |
| Plan file | Created | Exists (10KB) | ✅ |
Flag any mismatches:
# Session Analysis Report
## Session Info
- **Session ID**: {sessionId}
- **Target Skill**: {skillPath}
- **Analysis Date**: {date}
---
## 1. Expected Behavior (from SKILL.md)
[Summary of expected workflow]
---
## 2. Skill/SubAgent/Hook Verification
### SubAgents
| SubAgent | Expected | Actual | Time | Result |
|----------|----------|--------|------|--------|
| ... | ... | ... | ... | ✅/❌ |
### Hooks
| Hook | Matcher | Triggered | Result |
|------|---------|-----------|--------|
| ... | ... | ... | ✅/❌ |
---
## 3. Artifacts Verification
| Artifact | Path | Expected State | Actual State |
|----------|------|----------------|--------------|
| ... | ... | ... | ✅/❌ |
---
## 4. Issues/Bugs
| Severity | Description | Location |
|----------|-------------|----------|
| ... | ... | ... |
---
## 5. Overall Result
**Verdict**: ✅ PASS / ❌ FAIL
**Summary**: [1-2 sentence summary]
| Script | Purpose |
|---|---|
find-session-files.sh | Locate all files for a session ID |
extract-subagent-calls.sh | Parse subagent invocations from debug log |
extract-hook-events.sh | Parse hook events from debug log |
User: "Analyze session 3cc71c9f-d27a-4233-9dbc-c4f07ea6ec5b against .claude/skills/spec/SKILL.md"
1. Find session files
2. Parse SKILL.md → Expected: Explore, gap-analyzer, plan-reviewer, hooks
3. Analyze debug log → Extract actual calls
4. Verify artifacts → Check .hoyeon/
5. Compare → Build verification table
6. Generate report → PASS/FAIL with details
references/analysis-patterns.md - Detailed grep patterns for log analysisreferences/common-issues.md - Known issues and troubleshootingscripts/find-session-files.sh - Session file locatorscripts/extract-subagent-calls.sh - SubAgent call extractorscripts/extract-hook-events.sh - Hook event extractor