一键导入
issue-handler
Diagnose a single GitHub issue - query logs, reproduce, collect evidence, hand off to CTO agent. The "how it broke" investigation layer.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Diagnose a single GitHub issue - query logs, reproduce, collect evidence, hand off to CTO agent. The "how it broke" investigation layer.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | issue-handler |
| description | Diagnose a single GitHub issue - query logs, reproduce, collect evidence, hand off to CTO agent. The "how it broke" investigation layer. |
| user-invocable | false |
Part of: Autonomous Issue Dispatch System Upstream:
issue-dispatcher(or direct invocation) Downstream: CTO Agent →qa-submission(per-project)
The Handler answers: "Why is this broken and how do we fix it?"
It takes ONE issue and:
Handler is focused. One issue at a time. Deep investigation.
Handler is evidence-based. No guessing. Query logs, reproduce, prove.
Handler prepares, doesn't fix. The moment you start writing production code, hand off to CTO.
Can I answer these questions from the issue?
├── WHAT failed? (which feature/endpoint)
├── WHEN did it fail? (timestamp or recency)
├── WHO experienced it? (user/session ID)
├── Any ERROR shown to user?
└── Source reference? (Slack thread, email for loop-back)
If basic info missing — self-investigate BEFORE asking humans:
Only after exhausting automated investigation: If the issue is genuinely ambiguous or requires information that cannot be fetched programmatically (e.g., "what did the user see on screen?", "what was the intended behavior?"), then ask for clarification:
needs-info labelPrerequisite: Project must have queryable logging infrastructure. See "Repository Requirements" section below.
-- Example: Find recent failures
SELECT * FROM audit_logs
WHERE operation_name = 'generate_captions'
AND status = 'error'
AND created_at > NOW() - INTERVAL '24 hours'
ORDER BY created_at DESC;
Look for:
For LLM operations:
Write or identify E2E test that triggers the bug:
test('reproduces issue #123 - caption parse failure', async () => {
// Create test data matching the failing scenario
const entry = await createTestEntry({ transcript: '...' });
// Trigger the operation
const result = await generateCaptions(entry.id);
// This should fail before fix, pass after
expect(result.status).toBe('success');
});
If reproduction fails: Report as blocker. Can't verify fix without reproduction.
From logs and reproduction, identify:
| Finding | Document |
|---|---|
| Root cause | "LLM returned markdown instead of JSON" |
| Trigger condition | "Only when transcript > 5000 chars" |
| Affected scope | "All caption generation, ~5% of requests" |
| Suggested fix | "Add markdown stripping before JSON parse" |
Package everything for CTO agent:
## Diagnosis for Issue #123
**Root cause:** LLM returns markdown-wrapped JSON when transcript exceeds 5000 characters.
The JSON parser fails on the markdown code fence.
**Evidence:**
- Log entry [timestamp]: `ParseError: Unexpected token at position 0`
- Raw LLM response started with "```json" instead of "{"
- 47 similar failures in last 24 hours
**Reproduction:** `tests/e2e/caption-parse-failure.spec.ts`
- Currently fails (expected)
- Should pass after fix
**Suggested fix:**
- File: `api/lib/llmClient.ts:142`
- Add markdown fence stripping before JSON.parse()
**Relevant files:**
- `api/generate-captions.ts:87` - calls parseJSON
- `api/lib/llmClient.ts:142` - parseJSON implementation
- `tests/e2e/caption-flow.spec.ts` - existing test (add failure case)
CTO takes over from here. Handler's job is done.
If Handler cannot complete diagnosis, report WHY:
BLOCKER: Cannot diagnose autonomously.
**Gap:** No logging for caption generation failures.
The error "parse failed" is shown to users but the actual
LLM response that failed to parse is not captured.
**Required:** Implement audit_logs for LLM operations.
**Blocks:** All LLM-related bug diagnosis.
BLOCKER: Cannot reproduce.
**Issue says:** "video-2 failed"
**Problem:**
- No content_entry_id provided
- Cannot identify which entry "video-2" refers to
- No test fixture for this scenario
**Required:** Either provide entry ID, or create E2E test fixture.
BLOCKER: Cannot verify fix safely.
**Feature:** Bulk caption generation
**Problem:** No E2E tests exist for this feature.
I can diagnose but cannot confirm fix works without manual testing.
**Required:** E2E test for bulk caption generation.
BLOCKER: Cannot query logs.
**Logs exist in:** Vercel dashboard
**Problem:** No programmatic query access.
**Required:** Either:
- Database-backed logging (queryable via SQL)
- Log export API access
For Handler to work, each repo needs:
| What to Log | Why |
|---|---|
| Full input (request body, params) | Reproduce exact scenario |
| Full output (response, return) | See what actually happened |
| Error type and message | Classify failure |
| Stack trace | Locate code path |
| Timestamp | Correlate with reports |
| User/session ID | Find specific request |
For LLM operations:
Handler must be able to query, not just view in dashboard:
SELECT * FROM audit_logs WHERE...npm test, pytest)Handler needs read access to:
Complete workflow: assess → logs → reproduce → analyze → handoff.
"Diagnose issue #71"
Just check if issue is diagnosable, don't do full investigation.
"Can we diagnose #71?" / "Is #71 actionable?"
Returns: diagnosable / blocked (with reason)
Skip reproduction, just gather log evidence.
"Find logs for issue #71"
Useful when reproduction is known but need log correlation.
| Not Handler's Job | Who Does It |
|---|---|
| Scan full queue | Dispatcher |
| Write production fix | CTO Agent (Developer) |
| Run test suite | CTO Agent (QA Engineer) |
| Deploy | CTO Agent |
| Notify reporter | Bug Intake / QA Submission |
| Prioritize issues | Dispatcher |
Handler is the investigator, not the fixer or the traffic controller.
Handler prepares a diagnosis package. CTO Agent expects:
CTO Agent then orchestrates:
Handler does NOT wait for CTO completion. Handoff is fire-and-forget (Dispatcher tracks overall status).
| Skill | Location | Relationship |
|---|---|---|
autonomous-issue-dispatch | ~/.claude/skills/ | Parent architecture — defines the full pipeline this skill belongs to |
issue-dispatcher | ~/.claude/skills/ | Upstream — Dispatcher triages queue, invokes Handler per actionable issue |
strategic-cto-planner | ~/.claude/agents/ | Downstream — Handler packages diagnosis, hands off to CTO Agent for implementation |
bug-intake | ~/.claude/skills/ | Indirect upstream — Bug Intake creates issues that eventually reach Handler via Dispatcher |
qa-submission | .claude/skills/ (per-project) | Downstream (via CTO) — QA submission after CTO completes the fix |
Google Apps Script development best practices learned from production. Use when building Apps Script automation, payment API integrations, Google Sheets menu functions, modal dialogs, Poka Yoke quality gates, or running Apps Script functions from CLI. Covers UI dialog philosophy, API field discovery, submission architecture (source_amount vs transfer_amount), clasp CLI logging, run-appscript.sh function execution, and gate flow design.
Orchestration overview for the autonomous issue dispatch system. Handles bugs AND features from ANY entry point. References the component skills (dispatcher, handler) and per-project skills (bug-intake, qa-submission). Use when user says "dispatch", "fix these issues", "batch implement", "implement this", "build this", "develop this", "here's a plan", or any implementation/feature/fix request — including direct conversational requests to Claude Code.
Generalized Slack bug intake. Scans bug-report channels, auto-fixes small bugs, dispatches big work with clear specs, defers only genuinely ambiguous items to owner. Uses emoji reactions to track state. Each repo provides workspace config via local bug-intake skill. Supports shared channels where multiple repos receive bugs from one Slack channel via semantic routing.
PreToolUse hooks that block direct production database access and raw SQL write operations. Prevents bypass scripts that skip Drizzle ORM migration tracking, and HARD BLOCKS raw psql writes with no bypass — all writes must go through Admin API.
Standard development SOP for ALL code changes — bug fixes, features, refactors, any implementation. Defines the universal pipeline (investigate → fix → test → deploy → QA) and scope-based decision matrix. Also provides continuous scanning mode for autonomous operation. Use when implementing ANY code change, fixing bugs, building features, or when user says "start dev loop", "cowork", "fix this", "implement this", "build this". Each workspace can override with local skill.
Knowledge management for Claude Code projects. Use when: creating skills or agents, deciding where to put new knowledge (skill vs CLAUDE.md vs reference-data vs memory vs agent), routing information, CLAUDE.md hygiene, editing/modifying CLAUDE.md or skills or agents or memory files, extracting content from bloated files, or any discussion about knowledge architecture, documentation structure, or SOP placement. MUST be invoked BEFORE proposing any edits to CLAUDE.md, skills, agents, or memory - no exceptions.