{"items":[{"id":"cmugwhpet01bqqu068f5yovpr","slug":"parcadei-continuous-claude-v3-dead-code","name":"dead-code","description":"Find unused functions and dead code in the codebase","authorId":"gh:parcadei","authorName":"parcadei","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":3942,"pricePerCall":0,"manifest":{"name":"dead-code","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Find unused functions and dead code in the codebase","permissions":["shell"],"systemPrompt":"# Dead Code Detection\n\nFind unused functions and dead code using TLDR static analysis.\n\n## Quick Start\n\n```bash\n# Scan entire project\ntldr dead .\n\n# Scan specific directory\ntldr dead src/\n\n# Specify entry points (functions to exclude from analysis)\ntldr dead . --entry main cli test_\n\n# Specify language\ntldr dead . --lang python\ntldr dead . --lang typescript\n```\n\n## Output Format\n\n```\nDead code analysis:\n  Total functions: 150\n  Dead functions: 12\n\nUnused functions:\n  - old_helper (src/utils.py:42)\n  - deprecated_func (src/legacy.py:15)\n  - _unused_method (src/api.py:230)\n```\n\n## Cross-Platform\n\nWorks on Windows, Mac, and Linux (including WSL).\n\n```bash\n# Windows (PowerShell)\ntldr dead .\n\n# Mac/Linux\ntldr dead .\n```\n\n## Entry Points\n\nFunctions matching entry patterns are excluded from dead code analysis:\n- `main`, `cli` - Application entry points\n- `test_*`, `*_test` - Test functions\n- `setup`, `teardown` - Fixtures\n- `@app.route`, `@api.endpoint` - Framework handlers\n\n```bash\n# Custom entry points\ntldr dead src/ --entry main api_handler background_job\n```\n\n## Integration\n\nThis skill replaces the session-start-dead-code hook with on-demand analysis.\n\n| Approach | Pros | Cons |\n|----------|------|------|\n| Hook (removed) | Automatic | Slowed startup by 3s |\n| Skill (this) | On-demand, fast | Manual invocation |\n\n## Related Commands\n\n```bash\n# Impact analysis (who calls this?)\ntldr impact func_name .\n\n# Architecture layers\ntldr arch src/\n\n# Full codebase structure\ntldr structure . --lang python\n```","schemaVersion":1},"repoUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/dead-code","tags":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp","dead code","unused","cleanup"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Continuous-Claude-v3","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:51:52.595Z","lockfiles":[]},"forks":303,"owner":"parcadei","stars":3942,"topics":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp"],"license":"MIT","fullName":"parcadei/Continuous-Claude-v3","homepage":null,"language":"Python","pushedAt":"2026-01-26T15:27:49Z","avatarUrl":"https://avatars.githubusercontent.com/u/227596144?v=4","crawledAt":"2026-09-25T11:51:43.697Z","openIssues":46,"manifestFile":"SKILL.md","manifestPath":".claude/skills/dead-code/SKILL.md","defaultBranch":"main"},"readme":"# Dead Code Detection\n\nFind unused functions and dead code using TLDR static analysis.\n\n## Quick Start\n\n```bash\n# Scan entire project\ntldr dead .\n\n# Scan specific directory\ntldr dead src/\n\n# Specify entry points (functions to exclude from analysis)\ntldr dead . --entry main cli test_\n\n# Specify language\ntldr dead . --lang python\ntldr dead . --lang typescript\n```\n\n## Output Format\n\n```\nDead code analysis:\n  Total functions: 150\n  Dead functions: 12\n\nUnused functions:\n  - old_helper (src/utils.py:42)\n  - deprecated_func (src/legacy.py:15)\n  - _unused_method (src/api.py:230)\n```\n\n## Cross-Platform\n\nWorks on Windows, Mac, and Linux (including WSL).\n\n```bash\n# Windows (PowerShell)\ntldr dead .\n\n# Mac/Linux\ntldr dead .\n```\n\n## Entry Points\n\nFunctions matching entry patterns are excluded from dead code analysis:\n- `main`, `cli` - Application entry points\n- `test_*`, `*_test` - Test functions\n- `setup`, `teardown` - Fixtures\n- `@app.route`, `@api.endpoint` - Framework handlers\n\n```bash\n# Custom entry points\ntldr dead src/ --entry main api_handler background_job\n```\n\n## Integration\n\nThis skill replaces the session-start-dead-code hook with on-demand analysis.\n\n| Approach | Pros | Cons |\n|----------|------|------|\n| Hook (removed) | Automatic | Slowed startup by 3s |\n| Skill (this) | On-demand, fast | Manual invocation |\n\n## Related Commands\n\n```bash\n# Impact analysis (who calls this?)\ntldr impact func_name .\n\n# Architecture layers\ntldr arch src/\n\n# Full codebase structure\ntldr structure . --lang python\n```","createdAt":"2026-09-25T11:51:52.805Z","updatedAt":"2026-09-25T11:51:52.805Z"},{"id":"cmugwhp9t019zqu06rcb53453","slug":"parcadei-continuous-claude-v3-agent-context-isolation","name":"agent-context-isolation","description":"Agent Context Isolation","authorId":"gh:parcadei","authorName":"parcadei","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":3942,"pricePerCall":0,"manifest":{"name":"agent-context-isolation","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Agent Context Isolation","permissions":[],"systemPrompt":"# Agent Context Isolation\n\nPrevent agent output from polluting the main context window.\n\n## Rules\n\n### 1. Use Background Agents with File-Based Coordination\n```\n# RIGHT - background agent writes to file, main reads file\nTask(subagent_type=\"...\", run_in_background=true, prompt=\"... Output to: /path/to/file.md\")\n\n# WRONG - foreground agent dumps full transcript into main context\nTask(subagent_type=\"...\", run_in_background=false)\n```\n\nBackground agents with `run_in_background=true` isolate their context. Have them write results to files in `.claude/cache/agents/<agent-type>/`.\n\n### 2. Never Use TaskOutput to Retrieve Results\n```\n# WRONG - dumps entire transcript (70k+ tokens) into context\nTaskOutput(task_id=\"<id>\")\nTaskOutput(task_id=\"<id>\", block=true)\n\n# RIGHT - check expected output files\nBash(\"ls -la .claude/cache/agents/<agent-type>/\")\nBash(\"bun test\")  # verify with tests\n```\n\nTaskOutput returns the full agent transcript. Always use file-based coordination instead.\n\n### 3. Monitor Agent Progress via System Reminders\n```\n# System reminders come automatically:\n# \"Agent a42a16e progress: 6 new tools used, 88914 new tokens\"\n\n# To detect completion:\n# - Watch for progress reminders to stop arriving\n# - Poll for expected output files: find .claude/cache/agents -name \"*.md\" -mmin -5\n# - Check task output file size growth: wc -c /tmp/claude/.../tasks/<id>.output\n```\n\n**Stuck agent detection:**\n1. Progress reminders stop arriving\n2. Task output file size stops growing\n3. Expected output file not created after reasonable time\n\n### 4. Verify with Tests, Not Output\nAfter agent work:\n1. Run the test suite directly: `bun test`\n2. Report pass/fail counts\n3. Only investigate failures if tests fail\n\n### 5. File-Based Agent Pipeline Pattern\n```\nResearch agent → .claude/cache/agents/oracle/output.md\n                          ↓\nPlan agent → .claude/cache/agents/plan-agent/output.md (reads research)\n                          ↓\nValidate agent → .claude/cache/agents/validate-agent/output.md (reads plan)\n                          ↓\nImplement agent → src/module.ts (reads validated plan)\n```\n\nEach agent reads the previous agent's file output, not TaskOutput.\n\n## Why This Matters\n\nAgent context isolation preserves the main conversation's context budget. Reading agent outputs via TaskOutput floods context, causing:\n- Mid-conversation compaction\n- Lost context about user's original request\n- Repeated explanations needed\n\n## Source\n- Session where TaskOutput flooded 70k+ tokens into main context\n- Session 2026-01-01: Successfully used background agents with file-based coordination for SDK Phase 3","schemaVersion":1},"repoUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/agent-context-isolation","tags":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Continuous-Claude-v3","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:51:52.595Z","lockfiles":[]},"forks":303,"owner":"parcadei","stars":3942,"topics":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp"],"license":"MIT","fullName":"parcadei/Continuous-Claude-v3","homepage":null,"language":"Python","pushedAt":"2026-01-26T15:27:49Z","avatarUrl":"https://avatars.githubusercontent.com/u/227596144?v=4","crawledAt":"2026-09-25T11:51:43.697Z","openIssues":46,"manifestFile":"SKILL.md","manifestPath":".claude/skills/agent-context-isolation/SKILL.md","defaultBranch":"main"},"readme":"# Agent Context Isolation\n\nPrevent agent output from polluting the main context window.\n\n## Rules\n\n### 1. Use Background Agents with File-Based Coordination\n```\n# RIGHT - background agent writes to file, main reads file\nTask(subagent_type=\"...\", run_in_background=true, prompt=\"... Output to: /path/to/file.md\")\n\n# WRONG - foreground agent dumps full transcript into main context\nTask(subagent_type=\"...\", run_in_background=false)\n```\n\nBackground agents with `run_in_background=true` isolate their context. Have them write results to files in `.claude/cache/agents/<agent-type>/`.\n\n### 2. Never Use TaskOutput to Retrieve Results\n```\n# WRONG - dumps entire transcript (70k+ tokens) into context\nTaskOutput(task_id=\"<id>\")\nTaskOutput(task_id=\"<id>\", block=true)\n\n# RIGHT - check expected output files\nBash(\"ls -la .claude/cache/agents/<agent-type>/\")\nBash(\"bun test\")  # verify with tests\n```\n\nTaskOutput returns the full agent transcript. Always use file-based coordination instead.\n\n### 3. Monitor Agent Progress via System Reminders\n```\n# System reminders come automatically:\n# \"Agent a42a16e progress: 6 new tools used, 88914 new tokens\"\n\n# To detect completion:\n# - Watch for progress reminders to stop arriving\n# - Poll for expected output files: find .claude/cache/agents -name \"*.md\" -mmin -5\n# - Check task output file size growth: wc -c /tmp/claude/.../tasks/<id>.output\n```\n\n**Stuck agent detection:**\n1. Progress reminders stop arriving\n2. Task output file size stops growing\n3. Expected output file not created after reasonable time\n\n### 4. Verify with Tests, Not Output\nAfter agent work:\n1. Run the test suite directly: `bun test`\n2. Report pass/fail counts\n3. Only investigate failures if tests fail\n\n### 5. File-Based Agent Pipeline Pattern\n```\nResearch agent → .claude/cache/agents/oracle/output.md\n                          ↓\nPlan agent → .claude/cache/agents/plan-agent/output.md (reads research)\n                          ↓\nValidate agent → .claude/cache/agents/validate-agent/output.md (reads plan)\n                          ↓\nImplement agent → src/module.ts (reads validated plan)\n```\n\nEach agent reads the previous agent's file output, not TaskOutput.\n\n## Why This Matters\n\nAgent context isolation preserves the main conversation's context budget. Reading agent outputs via TaskOutput floods context, causing:\n- Mid-conversation compaction\n- Lost context about user's original request\n- Repeated explanations needed\n\n## Source\n- Session where TaskOutput flooded 70k+ tokens into main context\n- Session 2026-01-01: Successfully used background agents with file-based coordination for SDK Phase 3","createdAt":"2026-09-25T11:51:52.625Z","updatedAt":"2026-09-25T11:51:52.625Z"},{"id":"cmugwhpa201a2qu06ftrt13hr","slug":"parcadei-continuous-claude-v3-agent-orchestration","name":"agent-orchestration","description":"Agent Orchestration Rules","authorId":"gh:parcadei","authorName":"parcadei","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":3942,"pricePerCall":0,"manifest":{"name":"agent-orchestration","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Agent Orchestration Rules","permissions":[],"systemPrompt":"# Agent Orchestration Rules\n\nWhen the user asks to implement something, use implementation agents to preserve main context.\n\n## The Pattern\n\n**Wrong - burns context:**\n```\nMain: Read files → Understand → Make edits → Report\n      (2000+ tokens consumed in main context)\n```\n\n**Right - preserves context:**\n```\nMain: Spawn agent(\"implement X per plan\")\n      ↓\nAgent: Reads files → Understands → Edits → Tests\n      ↓\nMain: Gets summary (~200 tokens)\n```\n\n## When to Use Agents\n\n| Task Type | Use Agent? | Reason |\n|-----------|------------|--------|\n| Multi-file implementation | Yes | Agent handles complexity internally |\n| Following a plan phase | Yes | Agent reads plan, implements |\n| New feature with tests | Yes | Agent can run tests |\n| Single-line fix | No | Faster to do directly |\n| Quick config change | No | Overhead not worth it |\n\n## Key Insight\n\nAgents read their own context. Don't read files in main chat just to understand what to pass to an agent - give them the task and they figure it out.\n\n## Example Prompt\n\n```\nImplement Phase 4: Outcome Marking Hook from the Artifact Index plan.\n\n**Plan location:** thoughts/shared/plans/2025-12-24-artifact-index.md (search for \"Phase 4\")\n\n**What to create:**\n1. TypeScript hook\n2. Shell wrapper\n3. Python script\n4. Register in settings.json\n\nWhen done, provide a summary of files created and any issues.\n```\n\n## Trigger Words\n\nWhen user says these, consider using an agent:\n- \"implement\", \"build\", \"create feature\"\n- \"follow the plan\", \"do phase X\"\n- \"use implementation agents\"","schemaVersion":1},"repoUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/agent-orchestration","tags":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Continuous-Claude-v3","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:51:52.595Z","lockfiles":[]},"forks":303,"owner":"parcadei","stars":3942,"topics":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp"],"license":"MIT","fullName":"parcadei/Continuous-Claude-v3","homepage":null,"language":"Python","pushedAt":"2026-01-26T15:27:49Z","avatarUrl":"https://avatars.githubusercontent.com/u/227596144?v=4","crawledAt":"2026-09-25T11:51:43.697Z","openIssues":46,"manifestFile":"SKILL.md","manifestPath":".claude/skills/agent-orchestration/SKILL.md","defaultBranch":"main"},"readme":"# Agent Orchestration Rules\n\nWhen the user asks to implement something, use implementation agents to preserve main context.\n\n## The Pattern\n\n**Wrong - burns context:**\n```\nMain: Read files → Understand → Make edits → Report\n      (2000+ tokens consumed in main context)\n```\n\n**Right - preserves context:**\n```\nMain: Spawn agent(\"implement X per plan\")\n      ↓\nAgent: Reads files → Understands → Edits → Tests\n      ↓\nMain: Gets summary (~200 tokens)\n```\n\n## When to Use Agents\n\n| Task Type | Use Agent? | Reason |\n|-----------|------------|--------|\n| Multi-file implementation | Yes | Agent handles complexity internally |\n| Following a plan phase | Yes | Agent reads plan, implements |\n| New feature with tests | Yes | Agent can run tests |\n| Single-line fix | No | Faster to do directly |\n| Quick config change | No | Overhead not worth it |\n\n## Key Insight\n\nAgents read their own context. Don't read files in main chat just to understand what to pass to an agent - give them the task and they figure it out.\n\n## Example Prompt\n\n```\nImplement Phase 4: Outcome Marking Hook from the Artifact Index plan.\n\n**Plan location:** thoughts/shared/plans/2025-12-24-artifact-index.md (search for \"Phase 4\")\n\n**What to create:**\n1. TypeScript hook\n2. Shell wrapper\n3. Python script\n4. Register in settings.json\n\nWhen done, provide a summary of files created and any issues.\n```\n\n## Trigger Words\n\nWhen user says these, consider using an agent:\n- \"implement\", \"build\", \"create feature\"\n- \"follow the plan\", \"do phase X\"\n- \"use implementation agents\"","createdAt":"2026-09-25T11:51:52.635Z","updatedAt":"2026-09-25T11:51:52.635Z"},{"id":"cmugwhpac01a5qu06aahq2eb1","slug":"parcadei-continuous-claude-v3-agentic-workflow","name":"agentic-workflow","description":"Agentic Workflow Pattern","authorId":"gh:parcadei","authorName":"parcadei","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":3942,"pricePerCall":0,"manifest":{"name":"agentic-workflow","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Agentic Workflow Pattern","permissions":[],"systemPrompt":"# Agentic Workflow Pattern\n\nStandard multi-agent pipeline for implementation tasks.\n\n## Architecture Principles\n\n- Use `run_in_background: true` for all agents to keep main context minimal\n- Use `Task` tool (never `TaskOutput`) to avoid receiving full agent transcripts\n- Agents write outputs to `.claude/cache/agents/<stage>/` for injection into subsequent agents\n- Main conversation is pure orchestration — no heavy lifting, only coordination\n\n## Workflow Stages\n\n### 1. Research Agent\n```\nTask(subagent_type=\"oracle\", run_in_background=true, prompt=\"\"\"\nQuery NIA Oracle (via /nia-docs skill) to verify approach and gather best practices.\n\nOutput to: .claude/cache/agents/oracle/<task>-research.md\n\"\"\")\n```\n- Enforce NIA as the research layer\n- Output: Research findings\n\n### 2. Planning Agent\n```\nTask(subagent_type=\"plan-agent\", run_in_background=true, prompt=\"\"\"\nRead: .claude/cache/agents/oracle/<task>-research.md\nUse RP-CLI to analyze the target codebase section.\nGenerate implementation plan informed by research.\n\nOutput to: .claude/cache/agents/plan-agent/<task>-plan.md\n\"\"\")\n```\n- Receives: Research agent output as context\n- Output: Implementation plan\n\n### 3. Validation Agent\n```\nTask(subagent_type=\"validate-agent\", run_in_background=true, prompt=\"\"\"\nRead: .claude/cache/agents/plan-agent/<task>-plan.md\nRead: .claude/cache/agents/oracle/<task>-research.md\nReview plan against research findings and best practices.\n\nOutput to: .claude/cache/agents/validate-agent/<task>-validated.md\n\"\"\")\n```\n- Reviews plan against research\n- Output: Validated plan with amendments\n\n### 4. Implementation Agent\n```\nTask(subagent_type=\"agentica-agent\", run_in_background=true, prompt=\"\"\"\nRead: .claude/cache/agents/validate-agent/<task>-validated.md\nRead: .claude/cache/agents/oracle/<task>-research.md\n\nTDD approach: Write failing tests FIRST, then implement.\nRun tests to verify.\n\nOutput summary to: .claude/cache/agents/implement-agent/<task>-implementation.md\n\"\"\")\n```\n- Receives: Validated plan + research context\n- **TDD**: Failing tests first\n- Output: Implementation + tests\n\n### 5. Review Agent\n```\nTask(subagent_type=\"review-agent\", run_in_background=true, prompt=\"\"\"\nRead: .claude/cache/agents/implement-agent/<task>-implementation.md\nRead: .claude/cache/agents/validate-agent/<task>-validated.md\nRead: .claude/cache/agents/oracle/<task>-research.md\n\nCross-reference implementation against plan and research.\nRun tests to confirm passing.\n\nOutput to: .claude/cache/agents/review-agent/<task>-review.md\n\"\"\")\n```\n- Cross-references all artifacts\n- Confirms tests pass\n- Output: Review summary\n\n## Agent Progress Monitoring\n\n```bash\n# Watch for system reminders:\n# \"Agent a42a16e progress: 6 new tools used, 88914 new tokens\"\n\n# Poll for output files:\nfind .claude/cache/agents -name \"*.md\" -mmin -5\n\n# Check task file size growth:\nwc -c /tmp/claude/.../tasks/<id>.output\n```\n\n**Stuck detection:**\n1. Progress reminders stop arriving\n2. Task output file size stops growing\n3. Expected output file not created after reasonable time\n\n## Directory Structure\n\n```\n.claude/cache/agents/\n├── oracle/\n│   └── <task>-research.md\n├── plan-agent/\n│   └── <task>-plan.md\n├── validate-agent/\n│   └── <task>-validated.md\n├── implement-agent/\n│   └── <task>-implementation.md\n└── review-agent/\n    └── <task>-review.md\n```\n\n## Key Rules\n\n1. **Never use TaskOutput** - floods context with 70k+ token transcripts\n2. **Always run_in_background=true** - isolates agent context\n3. **File-based handoff** - each agent reads previous agent's output file\n4. **Poll, don't block** - check file system for outputs, don't wait\n5. **TDD in implementation** - failing tests first, then make them pass\n\n## Source\n- Session 2026-01-01: SDK Phase 3 implementation using this pattern","schemaVersion":1},"repoUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/agentic-workflow","tags":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Continuous-Claude-v3","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:51:52.595Z","lockfiles":[]},"forks":303,"owner":"parcadei","stars":3942,"topics":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp"],"license":"MIT","fullName":"parcadei/Continuous-Claude-v3","homepage":null,"language":"Python","pushedAt":"2026-01-26T15:27:49Z","avatarUrl":"https://avatars.githubusercontent.com/u/227596144?v=4","crawledAt":"2026-09-25T11:51:43.697Z","openIssues":46,"manifestFile":"SKILL.md","manifestPath":".claude/skills/agentic-workflow/SKILL.md","defaultBranch":"main"},"readme":"# Agentic Workflow Pattern\n\nStandard multi-agent pipeline for implementation tasks.\n\n## Architecture Principles\n\n- Use `run_in_background: true` for all agents to keep main context minimal\n- Use `Task` tool (never `TaskOutput`) to avoid receiving full agent transcripts\n- Agents write outputs to `.claude/cache/agents/<stage>/` for injection into subsequent agents\n- Main conversation is pure orchestration — no heavy lifting, only coordination\n\n## Workflow Stages\n\n### 1. Research Agent\n```\nTask(subagent_type=\"oracle\", run_in_background=true, prompt=\"\"\"\nQuery NIA Oracle (via /nia-docs skill) to verify approach and gather best practices.\n\nOutput to: .claude/cache/agents/oracle/<task>-research.md\n\"\"\")\n```\n- Enforce NIA as the research layer\n- Output: Research findings\n\n### 2. Planning Agent\n```\nTask(subagent_type=\"plan-agent\", run_in_background=true, prompt=\"\"\"\nRead: .claude/cache/agents/oracle/<task>-research.md\nUse RP-CLI to analyze the target codebase section.\nGenerate implementation plan informed by research.\n\nOutput to: .claude/cache/agents/plan-agent/<task>-plan.md\n\"\"\")\n```\n- Receives: Research agent output as context\n- Output: Implementation plan\n\n### 3. Validation Agent\n```\nTask(subagent_type=\"validate-agent\", run_in_background=true, prompt=\"\"\"\nRead: .claude/cache/agents/plan-agent/<task>-plan.md\nRead: .claude/cache/agents/oracle/<task>-research.md\nReview plan against research findings and best practices.\n\nOutput to: .claude/cache/agents/validate-agent/<task>-validated.md\n\"\"\")\n```\n- Reviews plan against research\n- Output: Validated plan with amendments\n\n### 4. Implementation Agent\n```\nTask(subagent_type=\"agentica-agent\", run_in_background=true, prompt=\"\"\"\nRead: .claude/cache/agents/validate-agent/<task>-validated.md\nRead: .claude/cache/agents/oracle/<task>-research.md\n\nTDD approach: Write failing tests FIRST, then implement.\nRun tests to verify.\n\nOutput summary to: .claude/cache/agents/implement-agent/<task>-implementation.md\n\"\"\")\n```\n- Receives: Validated plan + research context\n- **TDD**: Failing tests first\n- Output: Implementation + tests\n\n### 5. Review Agent\n```\nTask(subagent_type=\"review-agent\", run_in_background=true, prompt=\"\"\"\nRead: .claude/cache/agents/implement-agent/<task>-implementation.md\nRead: .claude/cache/agents/validate-agent/<task>-validated.md\nRead: .claude/cache/agents/oracle/<task>-research.md\n\nCross-reference implementation against plan and research.\nRun tests to confirm passing.\n\nOutput to: .claude/cache/agents/review-agent/<task>-review.md\n\"\"\")\n```\n- Cross-references all artifacts\n- Confirms tests pass\n- Output: Review summary\n\n## Agent Progress Monitoring\n\n```bash\n# Watch for system reminders:\n# \"Agent a42a16e progress: 6 new tools used, 88914 new tokens\"\n\n# Poll for output files:\nfind .claude/cache/agents -name \"*.md\" -mmin -5\n\n# Check task file size growth:\nwc -c /tmp/claude/.../tasks/<id>.output\n```\n\n**Stuck detection:**\n1. Progress reminders stop arriving\n2. Task output file size stops growing\n3. Expected output file not created after reasonable time\n\n## Directory Structure\n\n```\n.claude/cache/agents/\n├── oracle/\n│   └── <task>-research.md\n├── plan-agent/\n│   └── <task>-plan.md\n├── validate-agent/\n│   └── <task>-validated.md\n├── implement-agent/\n│   └── <task>-implementation.md\n└── review-agent/\n    └── <task>-review.md\n```\n\n## Key Rules\n\n1. **Never use TaskOutput** - floods context with 70k+ token transcripts\n2. **Always run_in_background=true** - isolates agent context\n3. **File-based handoff** - each agent reads previous agent's output file\n4. **Poll, don't block** - check file system for outputs, don't wait\n5. **TDD in implementation** - failing tests first, then make them pass\n\n## Source\n- Session 2026-01-01: SDK Phase 3 implementation using this pattern","createdAt":"2026-09-25T11:51:52.644Z","updatedAt":"2026-09-25T11:51:52.644Z"},{"id":"cmugwhpak01a8qu06acjasrnn","slug":"parcadei-continuous-claude-v3-agentica-claude-proxy","name":"agentica-claude-proxy","description":"Guide for integrating Agentica SDK with Claude Code CLI proxy","authorId":"gh:parcadei","authorName":"parcadei","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":3942,"pricePerCall":0,"manifest":{"name":"agentica-claude-proxy","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Guide for integrating Agentica SDK with Claude Code CLI proxy","permissions":["shell"],"systemPrompt":"# Agentica-Claude Code Proxy Integration\n\nUse this skill when developing or debugging the Agentica-Claude proxy integration.\n\n## When to Use\n\n- Setting up Agentica agents to use Claude Code tools\n- Debugging agent hallucination issues\n- Fixing permission errors in file operations\n- Understanding the REPL response format\n\n## Architecture Overview\n\n```\nAgentica Agent → S_M_BASE_URL → Claude Proxy → claude -p → Claude CLI (with tools)\n                 (localhost:2345)   (localhost:8080)\n```\n\n## Critical Requirements\n\n### 1. --allowedTools Flag (REQUIRED)\n\nClaude CLI in `-p` mode restricts file operations. You MUST add:\n\n```python\nsubprocess.run([\n    \"claude\", \"-p\", prompt,\n    \"--append-system-prompt\", system_prompt,\n    \"--allowedTools\", \"Read\", \"Write\", \"Edit\", \"Bash\",  # REQUIRED\n])\n```\n\nWithout this, agents will report \"permission denied\" for Write/Edit operations.\n\n### 2. SSE Streaming Format (REQUIRED)\n\nAgentica expects SSE streaming, not plain JSON:\n\n```python\n# Response format\nyield f\"data: {json.dumps(chunk)}\\n\\n\"\nyield \"data: [DONE]\\n\\n\"\n```\n\n### 3. REPL Response Format (REQUIRED)\n\nAgents MUST return results as Python code blocks with a return statement:\n\n```python\nreturn \"your result here\"\n```\n\nAgentica's REPL parser extracts code between \\`\\`\\`python and \\`\\`\\`.\n\n## Anti-Hallucination Prompt Engineering\n\nAgents will hallucinate success without actually using tools unless you explicitly warn them:\n\n```\n## ANTI-HALLUCINATION WARNING\n\n**STOP AND READ THIS CAREFULLY:**\n\nYou have access to these tools: Read, Write, Edit, Bash\n\nWhen the task asks you to create/modify/run something:\n1. FIRST: Actually invoke the tool (Read, Write, Edit, or Bash)\n2. SECOND: Wait for the tool result\n3. THIRD: Then return your answer based on what actually happened\n\n**DO NOT** skip the tool invocation and just claim success!\n\nIf you didn't invoke a tool, you CANNOT claim the action succeeded.\n```\n\n## Path Sandboxing\n\nBoth Claude Code and Agentica have sandboxes:\n\n- `/tmp/` paths are blocked by Claude Code\n- Files outside project directory blocked by Agentica\n\n**Solution:** Use project-relative paths like `workspace/` instead of `/tmp/`\n\n## Debugging\n\n### Check Agent Logs\n\n```bash\ncat logs/agent-<N>.log\n```\n\nNote: Logs only show final conversational response, not tool invocations.\n\n### Test Proxy Directly\n\n```bash\ncurl -s http://localhost:8080/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\": \"claude\", \"messages\": [{\"role\": \"user\", \"content\": \"Create file at workspace/test.txt\"}], \"stream\": false}'\n```\n\n### Verify File Operations\n\n```bash\n# After agent claims to create file\nls -la workspace/test.txt\ncat workspace/test.txt\n```\n\n## Server Commands\n\n### Start Servers\n\n```bash\n# Terminal 1: Proxy\nuv run python scripts/agentica/claude_proxy.py --port 8080\n\n# Terminal 2: Agentica Server\ncd workspace/agentica-research/agentica-server\nINFERENCE_ENDPOINT_URL=http://localhost:8080/v1/chat/completions uv run agentica-server --port 2345\n```\n\n### Use Swarm\n\n```bash\nS_M_BASE_URL=http://localhost:2345 uv run python your_script.py\n```\n\n### Health Checks\n\n```bash\ncurl http://localhost:8080/health  # Proxy\ncurl http://localhost:2345/health  # Agentica\n```\n\n## Reference Files\n\n- Proxy implementation: `scripts/agentica/claude_proxy.py`\n- REPL_BASELINE prompt: `scripts/agentica/claude_proxy.py:49-155`\n- Comprehensive test: `workspace/test_swarm_all_tools.py`\n- DependencySwarm: `scripts/agentica/dependency_swarm.py`\n\n## Common Errors\n\n| Error | Cause | Fix |\n|-------|-------|-----|\n| \"Permission denied\" | Missing --allowedTools | Add `--allowedTools Read Write Edit Bash` |\n| Agent claims success but file not created | Hallucination | Add anti-hallucination prompt section |\n| \"Cannot access /tmp/...\" | Sandbox restriction | Use project-relative paths |\n| \"APIConnectionError\" | Wrong response format | Use SSE streaming (data: {...}\\n\\n) |\n| \"NameError: view_file\" | Agent using REPL functions | Add REPL_BASELINE with native tool examples |","schemaVersion":1},"repoUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/agentica-claude-proxy","tags":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Continuous-Claude-v3","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:51:52.595Z","lockfiles":[]},"forks":303,"owner":"parcadei","stars":3942,"topics":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp"],"license":"MIT","fullName":"parcadei/Continuous-Claude-v3","homepage":null,"language":"Python","pushedAt":"2026-01-26T15:27:49Z","avatarUrl":"https://avatars.githubusercontent.com/u/227596144?v=4","crawledAt":"2026-09-25T11:51:43.697Z","openIssues":46,"manifestFile":"SKILL.md","manifestPath":".claude/skills/agentica-claude-proxy/SKILL.md","defaultBranch":"main"},"readme":"# Agentica-Claude Code Proxy Integration\n\nUse this skill when developing or debugging the Agentica-Claude proxy integration.\n\n## When to Use\n\n- Setting up Agentica agents to use Claude Code tools\n- Debugging agent hallucination issues\n- Fixing permission errors in file operations\n- Understanding the REPL response format\n\n## Architecture Overview\n\n```\nAgentica Agent → S_M_BASE_URL → Claude Proxy → claude -p → Claude CLI (with tools)\n                 (localhost:2345)   (localhost:8080)\n```\n\n## Critical Requirements\n\n### 1. --allowedTools Flag (REQUIRED)\n\nClaude CLI in `-p` mode restricts file operations. You MUST add:\n\n```python\nsubprocess.run([\n    \"claude\", \"-p\", prompt,\n    \"--append-system-prompt\", system_prompt,\n    \"--allowedTools\", \"Read\", \"Write\", \"Edit\", \"Bash\",  # REQUIRED\n])\n```\n\nWithout this, agents will report \"permission denied\" for Write/Edit operations.\n\n### 2. SSE Streaming Format (REQUIRED)\n\nAgentica expects SSE streaming, not plain JSON:\n\n```python\n# Response format\nyield f\"data: {json.dumps(chunk)}\\n\\n\"\nyield \"data: [DONE]\\n\\n\"\n```\n\n### 3. REPL Response Format (REQUIRED)\n\nAgents MUST return results as Python code blocks with a return statement:\n\n```python\nreturn \"your result here\"\n```\n\nAgentica's REPL parser extracts code between \\`\\`\\`python and \\`\\`\\`.\n\n## Anti-Hallucination Prompt Engineering\n\nAgents will hallucinate success without actually using tools unless you explicitly warn them:\n\n```\n## ANTI-HALLUCINATION WARNING\n\n**STOP AND READ THIS CAREFULLY:**\n\nYou have access to these tools: Read, Write, Edit, Bash\n\nWhen the task asks you to create/modify/run something:\n1. FIRST: Actually invoke the tool (Read, Write, Edit, or Bash)\n2. SECOND: Wait for the tool result\n3. THIRD: Then return your answer based on what actually happened\n\n**DO NOT** skip the tool invocation and just claim success!\n\nIf you didn't invoke a tool, you CANNOT claim the action succeeded.\n```\n\n## Path Sandboxing\n\nBoth Claude Code and Agentica have sandboxes:\n\n- `/tmp/` paths are blocked by Claude Code\n- Files outside project directory blocked by Agentica\n\n**Solution:** Use project-relative paths like `workspace/` instead of `/tmp/`\n\n## Debugging\n\n### Check Agent Logs\n\n```bash\ncat logs/agent-<N>.log\n```\n\nNote: Logs only show final conversational response, not tool invocations.\n\n### Test Proxy Directly\n\n```bash\ncurl -s http://localhost:8080/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\": \"claude\", \"messages\": [{\"role\": \"user\", \"content\": \"Create file at workspace/test.txt\"}], \"stream\": false}'\n```\n\n### Verify File Operations\n\n```bash\n# After agent claims to create file\nls -la workspace/test.txt\ncat workspace/test.txt\n```\n\n## Server Commands\n\n### Start Servers\n\n```bash\n# Terminal 1: Proxy\nuv run python scripts/agentica/claude_proxy.py --port 8080\n\n# Terminal 2: Agentica Server\ncd workspace/agentica-research/agentica-server\nINFERENCE_ENDPOINT_URL=http://localhost:8080/v1/chat/completions uv run agentica-server --port 2345\n```\n\n### Use Swarm\n\n```bash\nS_M_BASE_URL=http://localhost:2345 uv run python your_script.py\n```\n\n### Health Checks\n\n```bash\ncurl http://localhost:8080/health  # Proxy\ncurl http://localhost:2345/health  # Agentica\n```\n\n## Reference Files\n\n- Proxy implementation: `scripts/agentica/claude_proxy.py`\n- REPL_BASELINE prompt: `scripts/agentica/claude_proxy.py:49-155`\n- Comprehensive test: `workspace/test_swarm_all_tools.py`\n- DependencySwarm: `scripts/agentica/dependency_swarm.py`\n\n## Common Errors\n\n| Error | Cause | Fix |\n|-------|-------|-----|\n| \"Permission denied\" | Missing --allowedTools | Add `--allowedTools Read Write Edit Bash` |\n| Agent claims success but file not created | Hallucination | Add anti-hallucination prompt section |\n| \"Cannot access /tmp/...\" | Sandbox restriction | Use project-relative paths |\n| \"APIConnectionError\" | Wrong response format | Use SSE streaming (data: {...}\\n\\n) |\n| \"NameError: view_file\" | Agent using REPL functions | Add REPL_BASELINE with native tool examples |","createdAt":"2026-09-25T11:51:52.652Z","updatedAt":"2026-09-25T11:51:52.652Z"},{"id":"cmugwhpat01abqu064pqghqlz","slug":"parcadei-continuous-claude-v3-agentica-infrastructure","name":"agentica-infrastructure","description":"Reference guide for Agentica multi-agent infrastructure APIs","authorId":"gh:parcadei","authorName":"parcadei","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":3942,"pricePerCall":0,"manifest":{"name":"agentica-infrastructure","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Reference guide for Agentica multi-agent infrastructure APIs","permissions":[],"systemPrompt":"# Agentica Infrastructure Reference\n\nComplete API specification for Agentica multi-agent coordination infrastructure.\n\n## When to Use\n\n- Building multi-agent workflows with Agentica patterns\n- Need exact constructor signatures for pattern classes\n- Want to understand coordination database schema\n- Implementing custom patterns using primitives\n- Debugging agent tracking or orphan detection\n\n## Quick Reference\n\n### 11 Pattern Classes\n\n| Pattern | Purpose | Key Method |\n|---------|---------|------------|\n| `Swarm` | Parallel perspectives | `.execute(query)` |\n| `Pipeline` | Sequential stages | `.run(initial_state)` |\n| `Hierarchical` | Coordinator + specialists | `.execute(task)` |\n| `Jury` | Voting consensus | `.decide(return_type, question)` |\n| `GeneratorCritic` | Iterative refinement | `.run(task)` |\n| `CircuitBreaker` | Failure fallback | `.execute(query)` |\n| `Adversarial` | Debate + judge | `.resolve(question)` |\n| `ChainOfResponsibility` | Route to handler | `.process(query)` |\n| `MapReduce` | Fan out + reduce | `.execute(query, chunks)` |\n| `Blackboard` | Shared state | `.solve(query)` |\n| `EventDriven` | Event bus | `.publish(event)` |\n\n### Core Infrastructure\n\n| Component | File | Purpose |\n|-----------|------|---------|\n| `CoordinationDB` | `coordination.py` | SQLite tracking |\n| `tracked_spawn` | `tracked_agent.py` | Agent with tracking |\n| `HandoffAtom` | `handoff_atom.py` | Universal handoff format |\n| `BlackboardCache` | `blackboard.py` | Hot tier communication |\n| `MemoryService` | `memory_service.py` | Core + Archival memory |\n| `create_claude_scope` | `claude_scope.py` | Scope with file ops |\n\n### Primitives\n\n| Primitive | Purpose |\n|-----------|---------|\n| `Consensus` | Voting (MAJORITY, UNANIMOUS, THRESHOLD) |\n| `Aggregator` | Combine results (MERGE, CONCAT, BEST) |\n| `HandoffState` | Structured agent handoff |\n| `build_premise` | Structured premise builder |\n| `gather_fail_fast` | TaskGroup-based parallel execution |\n\n## Full API Spec\n\nSee: `API_SPEC.md` in this skill directory\n\n## Usage Example\n\n```python\nfrom scripts.agentica_patterns.patterns import Swarm, Jury\nfrom scripts.agentica_patterns.primitives import ConsensusMode\nfrom scripts.agentica_patterns.coordination import CoordinationDB\nfrom scripts.agentica_patterns.tracked_agent import tracked_spawn\n\n# Create tracking database\ndb = CoordinationDB(session_id=\"my-session\")\n\n# Swarm with tracking\nswarm = Swarm(\n    perspectives=[\"Security expert\", \"Performance expert\"],\n    db=db\n)\nresult = await swarm.execute(\"Review this code\")\n\n# Jury with consensus\njury = Jury(\n    num_jurors=3,\n    consensus_mode=ConsensusMode.MAJORITY,\n    premise=\"You evaluate code quality\",\n    db=db\n)\nverdict = await jury.decide(bool, \"Is this code production ready?\")\n```\n\n## Location\n\nAPI spec: `.claude/skills/agentica-infrastructure/API_SPEC.md`\nSource: `scripts/agentica_patterns/`","schemaVersion":1},"repoUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/agentica-infrastructure","tags":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Continuous-Claude-v3","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:51:52.595Z","lockfiles":[]},"forks":303,"owner":"parcadei","stars":3942,"topics":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp"],"license":"MIT","fullName":"parcadei/Continuous-Claude-v3","homepage":null,"language":"Python","pushedAt":"2026-01-26T15:27:49Z","avatarUrl":"https://avatars.githubusercontent.com/u/227596144?v=4","crawledAt":"2026-09-25T11:51:43.697Z","openIssues":46,"manifestFile":"SKILL.md","manifestPath":".claude/skills/agentica-infrastructure/SKILL.md","defaultBranch":"main"},"readme":"# Agentica Infrastructure Reference\n\nComplete API specification for Agentica multi-agent coordination infrastructure.\n\n## When to Use\n\n- Building multi-agent workflows with Agentica patterns\n- Need exact constructor signatures for pattern classes\n- Want to understand coordination database schema\n- Implementing custom patterns using primitives\n- Debugging agent tracking or orphan detection\n\n## Quick Reference\n\n### 11 Pattern Classes\n\n| Pattern | Purpose | Key Method |\n|---------|---------|------------|\n| `Swarm` | Parallel perspectives | `.execute(query)` |\n| `Pipeline` | Sequential stages | `.run(initial_state)` |\n| `Hierarchical` | Coordinator + specialists | `.execute(task)` |\n| `Jury` | Voting consensus | `.decide(return_type, question)` |\n| `GeneratorCritic` | Iterative refinement | `.run(task)` |\n| `CircuitBreaker` | Failure fallback | `.execute(query)` |\n| `Adversarial` | Debate + judge | `.resolve(question)` |\n| `ChainOfResponsibility` | Route to handler | `.process(query)` |\n| `MapReduce` | Fan out + reduce | `.execute(query, chunks)` |\n| `Blackboard` | Shared state | `.solve(query)` |\n| `EventDriven` | Event bus | `.publish(event)` |\n\n### Core Infrastructure\n\n| Component | File | Purpose |\n|-----------|------|---------|\n| `CoordinationDB` | `coordination.py` | SQLite tracking |\n| `tracked_spawn` | `tracked_agent.py` | Agent with tracking |\n| `HandoffAtom` | `handoff_atom.py` | Universal handoff format |\n| `BlackboardCache` | `blackboard.py` | Hot tier communication |\n| `MemoryService` | `memory_service.py` | Core + Archival memory |\n| `create_claude_scope` | `claude_scope.py` | Scope with file ops |\n\n### Primitives\n\n| Primitive | Purpose |\n|-----------|---------|\n| `Consensus` | Voting (MAJORITY, UNANIMOUS, THRESHOLD) |\n| `Aggregator` | Combine results (MERGE, CONCAT, BEST) |\n| `HandoffState` | Structured agent handoff |\n| `build_premise` | Structured premise builder |\n| `gather_fail_fast` | TaskGroup-based parallel execution |\n\n## Full API Spec\n\nSee: `API_SPEC.md` in this skill directory\n\n## Usage Example\n\n```python\nfrom scripts.agentica_patterns.patterns import Swarm, Jury\nfrom scripts.agentica_patterns.primitives import ConsensusMode\nfrom scripts.agentica_patterns.coordination import CoordinationDB\nfrom scripts.agentica_patterns.tracked_agent import tracked_spawn\n\n# Create tracking database\ndb = CoordinationDB(session_id=\"my-session\")\n\n# Swarm with tracking\nswarm = Swarm(\n    perspectives=[\"Security expert\", \"Performance expert\"],\n    db=db\n)\nresult = await swarm.execute(\"Review this code\")\n\n# Jury with consensus\njury = Jury(\n    num_jurors=3,\n    consensus_mode=ConsensusMode.MAJORITY,\n    premise=\"You evaluate code quality\",\n    db=db\n)\nverdict = await jury.decide(bool, \"Is this code production ready?\")\n```\n\n## Location\n\nAPI spec: `.claude/skills/agentica-infrastructure/API_SPEC.md`\nSource: `scripts/agentica_patterns/`","createdAt":"2026-09-25T11:51:52.661Z","updatedAt":"2026-09-25T11:51:52.661Z"},{"id":"cmugwhpb001aequ069nppki9v","slug":"parcadei-continuous-claude-v3-agentica-prompts","name":"agentica-prompts","description":"Write reliable prompts for Agentica/REPL agents that avoid LLM instruction ambiguity","authorId":"gh:parcadei","authorName":"parcadei","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":3942,"pricePerCall":0,"manifest":{"name":"agentica-prompts","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Write reliable prompts for Agentica/REPL agents that avoid LLM instruction ambiguity","permissions":[],"systemPrompt":"# Agentica Prompt Engineering\n\nWrite prompts that Agentica agents reliably follow. Standard natural language prompts fail ~35% of the time due to LLM instruction ambiguity.\n\n## The Orchestration Pattern\n\nProven workflow for context-preserving agent orchestration:\n\n```\n1. RESEARCH (Nia)     → Output to .claude/cache/agents/research/\n       ↓\n2. PLAN (RP-CLI)      → Reads research, outputs .claude/cache/agents/plan/\n       ↓\n3. VALIDATE           → Checks plan against best practices\n       ↓\n4. IMPLEMENT (TDD)    → Failing tests first, then pass\n       ↓\n5. REVIEW (Jury)      → Compare impl vs plan vs research\n       ↓\n6. DEBUG (if needed)  → Research via Nia, don't assume\n```\n\n**Key:** Use Task (not TaskOutput) + directory handoff = clean context\n\n## Agent System Prompt Template\n\nInject this into each agent's system prompt for rich context understanding:\n\n```\n## AGENT IDENTITY\n\nYou are {AGENT_ROLE} in a multi-agent orchestration system.\nYour output will be consumed by: {DOWNSTREAM_AGENT}\nYour input comes from: {UPSTREAM_AGENT}\n\n## SYSTEM ARCHITECTURE\n\nYou are part of the Agentica orchestration framework:\n- Memory Service: remember(key, value), recall(query), store_fact(content)\n- Task Graph: create_task(), complete_task(), get_ready_tasks()\n- File I/O: read_file(), write_file(), edit_file(), bash()\n\nSession ID: {SESSION_ID} (all your memory/tasks scoped here)\n\n## DIRECTORY HANDOFF\n\nRead your inputs from: {INPUT_DIR}\nWrite your outputs to: {OUTPUT_DIR}\n\nOutput format: Write a summary file and any artifacts.\n- {OUTPUT_DIR}/summary.md - What you did, key findings\n- {OUTPUT_DIR}/artifacts/ - Any generated files\n\n## CODE CONTEXT\n\n{CODE_MAP}  <- Inject RepoPrompt codemap here\n\n## YOUR TASK\n\n{TASK_DESCRIPTION}\n\n## CRITICAL RULES\n\n1. RETRIEVE means read existing content - NEVER generate hypothetical content\n2. WRITE means create/update file - specify exact content\n3. When stuck, output what you found and what's blocking you\n4. Your summary.md is your handoff to the next agent - be precise\n```\n\n## Pattern-Specific Prompts\n\n### Swarm (Research)\n\n```\n## SWARM AGENT: {PERSPECTIVE}\n\nYou are researching: {QUERY}\nYour unique angle: {PERSPECTIVE}\n\nOther agents are researching different angles. You don't need to be comprehensive.\nFocus ONLY on your perspective. Be specific, not broad.\n\nOutput format:\n- 3-5 key findings from YOUR perspective\n- Evidence/sources for each finding\n- Uncertainties or gaps you identified\n\nWrite to: {OUTPUT_DIR}/{PERSPECTIVE}/findings.md\n```\n\n### Hierarchical (Coordinator)\n\n```\n## COORDINATOR\n\nTask to decompose: {TASK}\n\nAvailable specialists (use EXACTLY these names):\n{SPECIALIST_LIST}\n\nRules:\n1. ONLY use specialist names from the list above\n2. Each subtask should be completable by ONE specialist\n3. 2-5 subtasks maximum\n4. If task is simple, return empty list and handle directly\n\nOutput: JSON list of {specialist, task} pairs\n```\n\n### Generator/Critic (Generator)\n\n```\n## GENERATOR\n\nTask: {TASK}\n{PREVIOUS_FEEDBACK}\n\nProduce your solution. The Critic will review it.\n\nOutput structure (use EXACTLY these keys):\n{\n  \"solution\": \"your main output\",\n  \"code\": \"if applicable\",\n  \"reasoning\": \"why this approach\"\n}\n\nWrite to: {OUTPUT_DIR}/solution.json\n```\n\n### Generator/Critic (Critic)\n\n```\n## CRITIC\n\nReviewing solution at: {SOLUTION_PATH}\n\nEvaluation criteria:\n1. Correctness - Does it solve the task?\n2. Completeness - Any missing cases?\n3. Quality - Is it well-structured?\n\nIf APPROVED: Write {\"approved\": true, \"feedback\": \"why approved\"}\nIf NOT approved: Write {\"approved\": false, \"feedback\": \"specific issues to fix\"}\n\nWrite to: {OUTPUT_DIR}/critique.json\n```\n\n### Jury (Voter)\n\n```\n## JUROR #{N}\n\nQuestion: {QUESTION}\n\nVote independently. Do NOT try to guess what others will vote.\nYour vote should be based solely on the evidence.\n\nOutput: Your vote as {RETURN_TYPE}\n```\n\n## Verb Mappings\n\n| Action | Bad (ambiguous) | Good (explicit) |\n|--------|-----------------|-----------------|\n| Read | \"Read the file at X\" | \"RETRIEVE contents of: X\" |\n| Write | \"Put this in the file\" | \"WRITE to X: {content}\" |\n| Check | \"See if file has X\" | \"RETRIEVE contents of: X. Contains Y? YES/NO.\" |\n| Edit | \"Change X to Y\" | \"EDIT file X: replace 'old' with 'new'\" |\n\n## Directory Handoff Mechanism\n\nAgents communicate via filesystem, not TaskOutput:\n\n```python\n# Pattern implementation\nOUTPUT_BASE = \".claude/cache/agents\"\n\ndef get_agent_dirs(agent_id: str, phase: str) -> tuple[Path, Path]:\n    \"\"\"Return (input_dir, output_dir) for an agent.\"\"\"\n    input_dir = Path(OUTPUT_BASE) / f\"{phase}_input\"\n    output_dir = Path(OUTPUT_BASE) / agent_id\n    output_dir.mkdir(parents=True, exist_ok=True)\n    return input_dir, output_dir\n\ndef chain_agents(phase1_id: str, phase2_id: str):\n    \"\"\"Phase2 reads from phase1's output.\"\"\"\n    phase1_output = Path(OUTPUT_BASE) / phase1_id\n    phase2_input = phase1_output  # Direct handoff\n    return phase2_input\n```\n\n## Anti-Patterns\n\n| Pattern | Problem | Fix |\n|---------|---------|-----|\n| \"Tell me what X contains\" | May summarize or hallucinate | \"Return the exact text\" |\n| \"Check the file\" | Ambiguous action | Specify RETRIEVE or VERIFY |\n| Question form | Invites generation | Use imperative \"RETRIEVE\" |\n| \"Read and confirm\" | May just say \"confirmed\" | \"Return the exact text\" |\n| TaskOutput for handoff | Floods context with transcript | Directory-based handoff |\n| \"Be thorough\" | Subjective, inconsistent | Specify exact output format |\n\n## Expected Improvement\n\n- Without fixes: ~60% success rate\n- With RETRIEVE + explicit return: ~95% success rate\n- With structured tool schemas: ~98% success rate\n- With directory handoff: Context preserved, no transcript pollution\n\n## Code Map Injection\n\nUse RepoPrompt to generate code map for agent context:\n\n```bash\n# Generate codemap for agent context\nrp-cli --path . --output .claude/cache/agents/codemap.md\n\n# Inject into agent system prompt\ncodemap=$(cat .claude/cache/agents/codemap.md)\n```\n\n## Memory Context Injection\n\nExplain the memory system to agents:\n\n```\n## MEMORY SYSTEM\n\nYou have access to a 3-tier memory system:\n\n1. **Core Memory** (in-context): remember(key, value), recall(query)\n   - Fast key-value store for current session facts\n\n2. **Archival Memory** (searchable): store_fact(content), search_memory(query)\n   - FTS5-indexed long-term storage\n   - Use for findings that should persist\n\n3. **Recall** (unified): recall(query)\n   - Searches both core and archival\n   - Returns formatted context string\n\nAll memory is scoped to session_id: {SESSION_ID}\n```\n\n## References\n\n- ToolBench (2023): Models fail ~35% retrieval tasks with ambiguous descriptions\n- Gorilla (2023): Structured schemas improve reliability by 3x\n- ReAct (2022): Explicit reasoning before action reduces errors by ~25%","schemaVersion":1},"repoUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/agentica-prompts","tags":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Continuous-Claude-v3","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:51:52.595Z","lockfiles":[]},"forks":303,"owner":"parcadei","stars":3942,"topics":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp"],"license":"MIT","fullName":"parcadei/Continuous-Claude-v3","homepage":null,"language":"Python","pushedAt":"2026-01-26T15:27:49Z","avatarUrl":"https://avatars.githubusercontent.com/u/227596144?v=4","crawledAt":"2026-09-25T11:51:43.697Z","openIssues":46,"manifestFile":"SKILL.md","manifestPath":".claude/skills/agentica-prompts/SKILL.md","defaultBranch":"main"},"readme":"# Agentica Prompt Engineering\n\nWrite prompts that Agentica agents reliably follow. Standard natural language prompts fail ~35% of the time due to LLM instruction ambiguity.\n\n## The Orchestration Pattern\n\nProven workflow for context-preserving agent orchestration:\n\n```\n1. RESEARCH (Nia)     → Output to .claude/cache/agents/research/\n       ↓\n2. PLAN (RP-CLI)      → Reads research, outputs .claude/cache/agents/plan/\n       ↓\n3. VALIDATE           → Checks plan against best practices\n       ↓\n4. IMPLEMENT (TDD)    → Failing tests first, then pass\n       ↓\n5. REVIEW (Jury)      → Compare impl vs plan vs research\n       ↓\n6. DEBUG (if needed)  → Research via Nia, don't assume\n```\n\n**Key:** Use Task (not TaskOutput) + directory handoff = clean context\n\n## Agent System Prompt Template\n\nInject this into each agent's system prompt for rich context understanding:\n\n```\n## AGENT IDENTITY\n\nYou are {AGENT_ROLE} in a multi-agent orchestration system.\nYour output will be consumed by: {DOWNSTREAM_AGENT}\nYour input comes from: {UPSTREAM_AGENT}\n\n## SYSTEM ARCHITECTURE\n\nYou are part of the Agentica orchestration framework:\n- Memory Service: remember(key, value), recall(query), store_fact(content)\n- Task Graph: create_task(), complete_task(), get_ready_tasks()\n- File I/O: read_file(), write_file(), edit_file(), bash()\n\nSession ID: {SESSION_ID} (all your memory/tasks scoped here)\n\n## DIRECTORY HANDOFF\n\nRead your inputs from: {INPUT_DIR}\nWrite your outputs to: {OUTPUT_DIR}\n\nOutput format: Write a summary file and any artifacts.\n- {OUTPUT_DIR}/summary.md - What you did, key findings\n- {OUTPUT_DIR}/artifacts/ - Any generated files\n\n## CODE CONTEXT\n\n{CODE_MAP}  <- Inject RepoPrompt codemap here\n\n## YOUR TASK\n\n{TASK_DESCRIPTION}\n\n## CRITICAL RULES\n\n1. RETRIEVE means read existing content - NEVER generate hypothetical content\n2. WRITE means create/update file - specify exact content\n3. When stuck, output what you found and what's blocking you\n4. Your summary.md is your handoff to the next agent - be precise\n```\n\n## Pattern-Specific Prompts\n\n### Swarm (Research)\n\n```\n## SWARM AGENT: {PERSPECTIVE}\n\nYou are researching: {QUERY}\nYour unique angle: {PERSPECTIVE}\n\nOther agents are researching different angles. You don't need to be comprehensive.\nFocus ONLY on your perspective. Be specific, not broad.\n\nOutput format:\n- 3-5 key findings from YOUR perspective\n- Evidence/sources for each finding\n- Uncertainties or gaps you identified\n\nWrite to: {OUTPUT_DIR}/{PERSPECTIVE}/findings.md\n```\n\n### Hierarchical (Coordinator)\n\n```\n## COORDINATOR\n\nTask to decompose: {TASK}\n\nAvailable specialists (use EXACTLY these names):\n{SPECIALIST_LIST}\n\nRules:\n1. ONLY use specialist names from the list above\n2. Each subtask should be completable by ONE specialist\n3. 2-5 subtasks maximum\n4. If task is simple, return empty list and handle directly\n\nOutput: JSON list of {specialist, task} pairs\n```\n\n### Generator/Critic (Generator)\n\n```\n## GENERATOR\n\nTask: {TASK}\n{PREVIOUS_FEEDBACK}\n\nProduce your solution. The Critic will review it.\n\nOutput structure (use EXACTLY these keys):\n{\n  \"solution\": \"your main output\",\n  \"code\": \"if applicable\",\n  \"reasoning\": \"why this approach\"\n}\n\nWrite to: {OUTPUT_DIR}/solution.json\n```\n\n### Generator/Critic (Critic)\n\n```\n## CRITIC\n\nReviewing solution at: {SOLUTION_PATH}\n\nEvaluation criteria:\n1. Correctness - Does it solve the task?\n2. Completeness - Any missing cases?\n3. Quality - Is it well-structured?\n\nIf APPROVED: Write {\"approved\": true, \"feedback\": \"why approved\"}\nIf NOT approved: Write {\"approved\": false, \"feedback\": \"specific issues to fix\"}\n\nWrite to: {OUTPUT_DIR}/critique.json\n```\n\n### Jury (Voter)\n\n```\n## JUROR #{N}\n\nQuestion: {QUESTION}\n\nVote independently. Do NOT try to guess what others will vote.\nYour vote should be based solely on the evidence.\n\nOutput: Your vote as {RETURN_TYPE}\n```\n\n## Verb Mappings\n\n| Action | Bad (ambiguous) | Good (explicit) |\n|--------|-----------------|-----------------|\n| Read | \"Read the file at X\" | \"RETRIEVE contents","createdAt":"2026-09-25T11:51:52.669Z","updatedAt":"2026-09-25T11:51:52.669Z"},{"id":"cmugwhpbe01ahqu06yif5px16","slug":"parcadei-continuous-claude-v3-agentica-sdk","name":"agentica-sdk","description":"Build Python agents with Agentica SDK - @agentic decorator, spawn(), persistence, MCP integration","authorId":"gh:parcadei","authorName":"parcadei","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":3942,"pricePerCall":0,"manifest":{"name":"agentica-sdk","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Build Python agents with Agentica SDK - @agentic decorator, spawn(), persistence, MCP integration","permissions":["shell"],"systemPrompt":"# Agentica SDK Reference (v0.3.1)\n\nBuild AI agents in Python using the Agentica framework. Agents can implement functions, maintain state, use tools, and coordinate with each other.\n\n## When to Use\n\nUse this skill when:\n- Building new Python agents\n- Adding agentic capabilities to existing code\n- Integrating MCP tools with agents\n- Implementing multi-agent orchestration\n- Debugging agent behavior\n\n## Quick Start\n\n### Agentic Function (simplest)\n\n```python\nfrom agentica import agentic\n\n@agentic()\nasync def add(a: int, b: int) -> int:\n    \"\"\"Returns the sum of a and b\"\"\"\n    ...\n\nresult = await add(1, 2)  # Agent computes: 3\n```\n\n### Spawned Agent (more control)\n\n```python\nfrom agentica import spawn\n\nagent = await spawn(premise=\"You are a truth-teller.\")\nresult: bool = await agent.call(bool, \"The Earth is flat\")\n# Returns: False\n```\n\n## Core Patterns\n\n### Return Types\n\n```python\n# String (default)\nresult = await agent.call(\"What is 2+2?\")\n\n# Typed output\nresult: int = await agent.call(int, \"What is 2+2?\")\nresult: dict[str, int] = await agent.call(dict[str, int], \"Count items\")\n\n# Side-effects only\nawait agent.call(None, \"Send message to John\")\n```\n\n### Premise vs System Prompt\n\n```python\n# Premise: adds to default system prompt\nagent = await spawn(premise=\"You are a math expert.\")\n\n# System: full control (replaces default)\nagent = await spawn(system=\"You are a JSON-only responder.\")\n```\n\n### Passing Tools (Scope)\n\n```python\nfrom agentica import agentic, spawn\n\n# In decorator\n@agentic(scope={'web_search': web_search_fn})\nasync def researcher(query: str) -> str:\n    \"\"\"Research a topic.\"\"\"\n    ...\n\n# In spawn\nagent = await spawn(\n    premise=\"Data analyzer\",\n    scope={\"analyze\": custom_analyzer}\n)\n\n# Per-call scope\nresult = await agent.call(\n    dict[str, int],\n    \"Analyze the dataset\",\n    dataset=data,           # Available as 'dataset'\n    analyzer=custom_fn      # Available as 'analyzer'\n)\n```\n\n### SDK Integration Pattern\n\n```python\nfrom slack_sdk import WebClient\n\nslack = WebClient(token=SLACK_TOKEN)\n\n# Extract specific methods\n@agentic(scope={\n    'list_users': slack.users_list,\n    'send_message': slack.chat_postMessage\n})\nasync def team_notifier(message: str) -> None:\n    \"\"\"Send team notifications.\"\"\"\n    ...\n```\n\n## Agent Instantiation\n\n### spawn() - Async (most cases)\n\n```python\nagent = await spawn(premise=\"Helpful assistant\")\n```\n\n### Agent() - Sync (for `__init__`)\n\n```python\nfrom agentica.agent import Agent\n\nclass CustomAgent:\n    def __init__(self):\n        # Synchronous - use Agent() not spawn()\n        self._brain = Agent(\n            premise=\"Specialized assistant\",\n            scope={\"tool\": some_tool}\n        )\n\n    async def run(self, task: str) -> str:\n        return await self._brain(str, task)\n```\n\n## Model Selection\n\n```python\n# In spawn\nagent = await spawn(\n    premise=\"Fast responses\",\n    model=\"openai:gpt-5\"  # Default: openai:gpt-4.1\n)\n\n# In decorator\n@agentic(model=\"anthropic:claude-sonnet-4.5\")\nasync def analyze(text: str) -> dict:\n    \"\"\"Analyze text.\"\"\"\n    ...\n```\n\n**Available models:**\n- `openai:gpt-3.5-turbo`, `openai:gpt-4o`, `openai:gpt-4.1`, `openai:gpt-5`\n- `anthropic:claude-sonnet-4`, `anthropic:claude-opus-4.1`\n- `anthropic:claude-sonnet-4.5`, `anthropic:claude-opus-4.5`\n- Any OpenRouter slug (e.g., `google/gemini-2.5-flash`)\n\n## Persistence (Stateful Agents)\n\n```python\n@agentic(persist=True)\nasync def chatbot(message: str) -> str:\n    \"\"\"Remembers conversation history.\"\"\"\n    ...\n\nawait chatbot(\"My name is Alice\")\nawait chatbot(\"What's my name?\")  # Knows: Alice\n```\n\nFor `spawn()` agents, state is automatic across calls to the same instance.\n\n## Token Limits\n\n```python\nfrom agentica import spawn, MaxTokens\n\n# Simple limit\nagent = await spawn(\n    premise=\"Brief responses\",\n    max_tokens=500\n)\n\n# Fine-grained control\nagent = await spawn(\n    premise=\"Controlled output\",\n    max_tokens=MaxTokens(\n        per_invocation=5000,  # Total across all rounds\n        per_round=1000,       # Per inference round\n        rounds=5              # Max inference rounds\n    )\n)\n```\n\n## Token Usage Tracking\n\n```python\nfrom agentica import spawn, last_usage, total_usage\n\nagent = await spawn(premise=\"You are helpful.\")\nawait agent.call(str, \"Hello!\")\n\n# Agent method\nusage = agent.last_usage()\nprint(f\"Last: {usage.input_tokens} in, {usage.output_tokens} out\")\n\nusage = agent.total_usage()\nprint(f\"Total: {usage.total_tokens} processed\")\n\n# For @agentic functions\n@agentic()\nasync def my_fn(x: str) -> str: ...\n\nawait my_fn(\"test\")\nprint(last_usage(my_fn))\nprint(total_usage(my_fn))\n```\n\n## Streaming\n\n```python\nfrom agentica import spawn\nfrom agentica.logging.loggers import StreamLogger\nimport asyncio\n\nagent = await spawn(premise=\"You are helpful.\")\n\nstream = StreamLogger()\nwith stream:\n    result = asyncio.create_task(\n        agent.call(bool, \"Is Paris the capital of France?\")\n    )\n\n# Consume stream FIRST for live output\nasync for chunk in stream:\n    print(chunk.content, end=\"\", flush=True)\n# chunk.role is 'user', 'agent', or 'system'\n\n# Then await result\nfinal = await result\n```\n\n## MCP Integration\n\n```python\nfrom agentica import spawn, agentic\n\n# Via config file\nagent = await spawn(\n    premise=\"Tool-using agent\",\n    mcp=\"path/to/mcp_config.json\"\n)\n\n@agentic(mcp=\"path/to/mcp_config.json\")\nasync def tool_user(query: str) -> str:\n    \"\"\"Uses MCP tools.\"\"\"\n    ...\n```\n\n**mcp_config.json format:**\n```json\n{\n  \"mcpServers\": {\n    \"tavily-remote-mcp\": {\n      \"command\": \"npx -y mcp-remote https://mcp.tavily.com/mcp/?tavilyApiKey=<key>\",\n      \"env\": {}\n    }\n  }\n}\n```\n\n## Logging\n\n### Default Behavior\n- Prints to stdout with colors\n- Writes to `./logs/agent-<id>.log`\n\n### Contextual Logging\n\n```python\nfrom agentica.logging.loggers import FileLogger, PrintLogger\nfrom agentica.logging.agent_logger import NoLogging\n\n# File only\nwith FileLogger():\n    agent = await spawn(premise=\"Debug agent\")\n    await agent.call(int, \"Calculate\")\n\n# Silent\nwith NoLogging():\n    agent = await spawn(premise=\"Silent agent\")\n```\n\n### Per-Agent Logging\n\n```python\n# Listeners are in agent_listener submodule (NOT exported from agentica.logging)\nfrom agentica.logging.agent_listener import (\n    PrintOnlyListener,  # Console output only\n    FileOnlyListener,   # File logging only\n    StandardListener,   # Both console + file (default)\n    NoopListener,       # Silent - no logging\n)\n\nagent = await spawn(\n    premise=\"Custom logging\",\n    listener=PrintOnlyListener\n)\n\n# Silent agent\nagent = await spawn(\n    premise=\"Silent agent\",\n    listener=NoopListener\n)\n```\n\n### Global Config\n\n```python\nfrom agentica.logging.agent_listener import (\n    set_default_agent_listener,\n    get_default_agent_listener,\n    PrintOnlyListener,\n)\n\nset_default_agent_listener(PrintOnlyListener)\nset_default_agent_listener(None)  # Disable all\n```\n\n## Error Handling\n\n```python\nfrom agentica.errors import (\n    AgenticaError,           # Base for all SDK errors\n    RateLimitError,          # Rate limiting\n    InferenceError,          # HTTP errors from inference\n    MaxTokensError,          # Token limit exceeded\n    MaxRoundsError,          # Max inference rounds exceeded\n    ContentFilteringError,   # Content filtered\n    APIConnectionError,      # Network issues\n    APITimeoutError,         # Request timeout\n    InsufficientCreditsError,# Out of credits\n    OverloadedError,         # Server overloaded\n    ServerError,             # Generic server error\n)\n\ntry:\n    result = await agent.call(str, \"Do something\")\nexcept RateLimitError:\n    await asyncio.sleep(60)\n    result = await agent.call(str, \"Do something\")\nexcept MaxTokensError:\n    # Reduce scope or increase limits\n    pass\nexcept ContentFilteringError:\n    # Content was filtered\n    pass\nexcept InferenceError as e:\n    logger.error(f\"Inference failed: {e}\")\nexcept AgenticaError as e:\n    logger.error(f\"SDK error: {e}\")\n```\n\n### Custom Exceptions\n\n```python\nclass DataValidationError(Exception):\n    \"\"\"Invalid input data.\"\"\"\n    pass\n\n@agentic(DataValidationError)  # Pass exception type\nasync def analyze(data: str) -> dict:\n    \"\"\"\n    Analyze data.\n\n    Raises:\n        DataValidationError: If data is malformed\n    \"\"\"\n    ...\n\ntry:\n    result = await analyze(raw_data)\nexcept DataValidationError as e:\n    logger.warning(f\"Invalid: {e}\")\n```\n\n## Multi-Agent Patterns\n\n### Custom Agent Class\n\n```python\nfrom agentica.agent import Agent\n\nclass ResearchAgent:\n    def __init__(self, web_search_fn):\n        self._brain = Agent(\n            premise=\"Research assistant.\",\n            scope={\"web_search\": web_search_fn}\n        )\n\n    async def research(self, topic: str) -> str:\n        return await self._brain(str, f\"Research: {topic}\")\n\n    async def summarize(self, text: str) -> str:\n        return await self._brain(str, f\"Summarize: {text}\")\n```\n\n### Agent Orchestration\n\n```python\nclass LeadResearcher:\n    def __init__(self):\n        self._brain = Agent(\n            premise=\"Coordinate research across subagents.\",\n            scope={\"SubAgent\": ResearchAgent}\n        )\n\n    async def __call__(self, query: str) -> str:\n        return await self._brain(str, query)\n\nlead = LeadResearcher()\nreport = await lead(\"Research AI agent frameworks 2025\")\n```\n\n## Tracing & Debugging\n\n### OpenTelemetry Tracing\n\n```python\nfrom agentica import initialize_tracing\n\n# Initialize tracing (returns TracerProvider)\ntracer = initialize_tracing(\n    service_name=\"my-agent-app\",\n    environment=\"development\",  # Optional\n    tempo_endpoint=\"http://localhost:4317\",  # Optional: Grafana Tempo\n    organization_id=\"my-org\",  # Optional\n    log_level=\"INFO\",  # DEBUG, INFO, WARNING, ERROR\n    instrument_httpx=False,  # Optional: trace HTTP calls\n)\n```\n\n### SDK Debug Logging\n\n```python\nfrom agentica import enable_sdk_logging\n\n# Enable internal SDK logs (for debugging the SDK itself)\ndisable_fn = enable_sdk_logging(log_tags=\"1\")\n\n# ... run agents ...\n\ndisable_fn()  # Disable when done\n```\n\n## Top-Level Exports\n\n```python\n# Main imports from agentica\nfrom agentica import (\n    # Core\n    Agent,              # Synchronous agent class\n    agentic,            # @agentic decorator\n    spawn,              # Async agent creation\n\n    # Configuration\n    ModelStrings,       # Model string type hints\n    AgenticFunction,    # Agentic function type\n\n    # Token tracking\n    last_usage,         # Get last call's token usage\n    total_usage,        # Get cumulative token usage\n\n    # Tracing/Logging\n    initialize_tracing, # OpenTelemetry setup\n    enable_sdk_logging, # SDK debug logs\n\n    # Version\n    __version__,        # \"0.3.1\"\n)\n```\n\n## Checklist\n\nBefore using Agentica:\n- [ ] Functions with `@agentic()` MUST be `async`\n- [ ] `spawn()` returns awaitable - use `await spawn(...)`\n- [ ] `agent.call()` is awaitable - use `await agent.call(...)`\n- [ ] First arg to `call()` is return type, second is prompt string\n- [ ] Use `persist=True` for conversation memory in `@agentic`\n- [ ] Use `Agent()` (not `spawn()`) in synchronous `__init__`\n- [ ] Document exceptions in docstrings for agent to raise them\n- [ ] Import listeners from `agentica.logging.agent_listener` (NOT `agentica.logging`)","schemaVersion":1},"repoUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/agentica-sdk","tags":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Continuous-Claude-v3","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:51:52.595Z","lockfiles":[]},"forks":303,"owner":"parcadei","stars":3942,"topics":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp"],"license":"MIT","fullName":"parcadei/Continuous-Claude-v3","homepage":null,"language":"Python","pushedAt":"2026-01-26T15:27:49Z","avatarUrl":"https://avatars.githubusercontent.com/u/227596144?v=4","crawledAt":"2026-09-25T11:51:43.697Z","openIssues":46,"manifestFile":"SKILL.md","manifestPath":".claude/skills/agentica-sdk/SKILL.md","defaultBranch":"main"},"readme":"# Agentica SDK Reference (v0.3.1)\n\nBuild AI agents in Python using the Agentica framework. Agents can implement functions, maintain state, use tools, and coordinate with each other.\n\n## When to Use\n\nUse this skill when:\n- Building new Python agents\n- Adding agentic capabilities to existing code\n- Integrating MCP tools with agents\n- Implementing multi-agent orchestration\n- Debugging agent behavior\n\n## Quick Start\n\n### Agentic Function (simplest)\n\n```python\nfrom agentica import agentic\n\n@agentic()\nasync def add(a: int, b: int) -> int:\n    \"\"\"Returns the sum of a and b\"\"\"\n    ...\n\nresult = await add(1, 2)  # Agent computes: 3\n```\n\n### Spawned Agent (more control)\n\n```python\nfrom agentica import spawn\n\nagent = await spawn(premise=\"You are a truth-teller.\")\nresult: bool = await agent.call(bool, \"The Earth is flat\")\n# Returns: False\n```\n\n## Core Patterns\n\n### Return Types\n\n```python\n# String (default)\nresult = await agent.call(\"What is 2+2?\")\n\n# Typed output\nresult: int = await agent.call(int, \"What is 2+2?\")\nresult: dict[str, int] = await agent.call(dict[str, int], \"Count items\")\n\n# Side-effects only\nawait agent.call(None, \"Send message to John\")\n```\n\n### Premise vs System Prompt\n\n```python\n# Premise: adds to default system prompt\nagent = await spawn(premise=\"You are a math expert.\")\n\n# System: full control (replaces default)\nagent = await spawn(system=\"You are a JSON-only responder.\")\n```\n\n### Passing Tools (Scope)\n\n```python\nfrom agentica import agentic, spawn\n\n# In decorator\n@agentic(scope={'web_search': web_search_fn})\nasync def researcher(query: str) -> str:\n    \"\"\"Research a topic.\"\"\"\n    ...\n\n# In spawn\nagent = await spawn(\n    premise=\"Data analyzer\",\n    scope={\"analyze\": custom_analyzer}\n)\n\n# Per-call scope\nresult = await agent.call(\n    dict[str, int],\n    \"Analyze the dataset\",\n    dataset=data,           # Available as 'dataset'\n    analyzer=custom_fn      # Available as 'analyzer'\n)\n```\n\n### SDK Integration Pattern\n\n```python\nfrom slack_sdk import WebClient\n\nslack = WebClient(token=SLACK_TOKEN)\n\n# Extract specific methods\n@agentic(scope={\n    'list_users': slack.users_list,\n    'send_message': slack.chat_postMessage\n})\nasync def team_notifier(message: str) -> None:\n    \"\"\"Send team notifications.\"\"\"\n    ...\n```\n\n## Agent Instantiation\n\n### spawn() - Async (most cases)\n\n```python\nagent = await spawn(premise=\"Helpful assistant\")\n```\n\n### Agent() - Sync (for `__init__`)\n\n```python\nfrom agentica.agent import Agent\n\nclass CustomAgent:\n    def __init__(self):\n        # Synchronous - use Agent() not spawn()\n        self._brain = Agent(\n            premise=\"Specialized assistant\",\n            scope={\"tool\": some_tool}\n        )\n\n    async def run(self, task: str) -> str:\n        return await self._brain(str, task)\n```\n\n## Model Selection\n\n```python\n# In spawn\nagent = await spawn(\n    premise=\"Fast responses\",\n    model=\"openai:gpt-5\"  # Default: openai:gpt-4.1\n)\n\n# In decorator\n@agentic(model=\"anthropic:claude-sonnet-4.5\")\nasync def analyze(text: str) -> dict:\n    \"\"\"Analyze text.\"\"\"\n    ...\n```\n\n**Available models:**\n- `openai:gpt-3.5-turbo`, `openai:gpt-4o`, `openai:gpt-4.1`, `openai:gpt-5`\n- `anthropic:claude-sonnet-4`, `anthropic:claude-opus-4.1`\n- `anthropic:claude-sonnet-4.5`, `anthropic:claude-opus-4.5`\n- Any OpenRouter slug (e.g., `google/gemini-2.5-flash`)\n\n## Persistence (Stateful Agents)\n\n```python\n@agentic(persist=True)\nasync def chatbot(message: str) -> str:\n    \"\"\"Remembers conversation history.\"\"\"\n    ...\n\nawait chatbot(\"My name is Alice\")\nawait chatbot(\"What's my name?\")  # Knows: Alice\n```\n\nFor `spawn()` agents, state is automatic across calls to the same instance.\n\n## Token Limits\n\n```python\nfrom agentica import spawn, MaxTokens\n\n# Simple limit\nagent = await spawn(\n    premise=\"Brief responses\",\n    max_tokens=500\n)\n\n# Fine-grained control\nagent = await spawn(\n    premise=\"Controlled output\",\n    max_tokens=MaxTokens(\n        per_invocation=5000,  # Total across all rounds\n        per_round=1000,       # Per","createdAt":"2026-09-25T11:51:52.682Z","updatedAt":"2026-09-25T11:51:52.682Z"},{"id":"cmugwhpbp01akqu06xafwlx0p","slug":"parcadei-continuous-claude-v3-agentica-server","name":"agentica-server","description":"Agentica server + Claude proxy setup - architecture, startup sequence, debugging","authorId":"gh:parcadei","authorName":"parcadei","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":3942,"pricePerCall":0,"manifest":{"name":"agentica-server","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Agentica server + Claude proxy setup - architecture, startup sequence, debugging","permissions":["shell"],"systemPrompt":"# Agentica Server + Claude Proxy Setup\n\nComplete reference for running Agentica SDK with a local Claude proxy. This enables Python agents to use Claude CLI as their inference backend.\n\n## When to Use\n\nUse this skill when:\n- Starting Agentica development with Claude proxy\n- Debugging connection issues between SDK, server, and proxy\n- Setting up a fresh Agentica environment\n- Troubleshooting agent tool access or hallucination issues\n\n## Architecture\n\n```\nAgentica SDK (client code)\n    | S_M_BASE_URL=http://localhost:2345\n    v\nClientSessionManager\n    |\n    v\nAgentica Server (agentica-server)\n    | INFERENCE_ENDPOINT_URL=http://localhost:8080/v1/chat/completions\n    v\nClaude Proxy (claude_proxy.py)\n    |\n    v\nClaude CLI (claude -p)\n```\n\n## Environment Variables\n\n| Variable | Set By | Used By | Purpose |\n|----------|--------|---------|---------|\n| `INFERENCE_ENDPOINT_URL` | Human | agentica-server | Where server sends LLM inference requests |\n| `S_M_BASE_URL` | Human | Agentica SDK client | Where SDK connects to session manager |\n\n**KEY:** These are NOT the same endpoint!\n- SDK connects to server (port 2345)\n- Server connects to proxy (port 8080)\n\n## Startup Sequence\n\nMust start in this order (each in a separate terminal):\n\n### Terminal 1: Claude Proxy\n\n```bash\nuv run python scripts/agentica/claude_proxy.py --port 8080\n```\n\n### Terminal 2: Agentica Server\n\n**MUST run from its directory:**\n\n```bash\ncd workspace/agentica-research/agentica-server\nINFERENCE_ENDPOINT_URL=http://localhost:8080/v1/chat/completions uv run agentica-server --port 2345\n```\n\n### Terminal 3: Your Agent Script\n\n```bash\nS_M_BASE_URL=http://localhost:2345 uv run python scripts/agentica/your_script.py\n```\n\n## Health Checks\n\n```bash\n# Claude proxy health\ncurl http://localhost:8080/health\n\n# Agentica server health\ncurl http://localhost:2345/health\n```\n\n## Common Errors & Fixes\n\n### 1. APIConnectionError after agent spawn\n\n**Symptom:** Agent spawns successfully but fails on first call with connection error.\n\n**Cause:** Claude proxy returning plain JSON instead of SSE format.\n\n**Fix:** Proxy must return Server-Sent Events format:\n```\ndata: {\"choices\": [...]}\\n\\n\n```\n\n### 2. ModuleNotFoundError for agentica-server\n\n**Symptom:** `ModuleNotFoundError: No module named 'agentica_server'`\n\n**Cause:** Running `uv run agentica-server` from wrong directory.\n\n**Fix:** Must `cd workspace/agentica-research/agentica-server` first.\n\n### 3. Agent can't use Read/Write/Edit tools\n\n**Symptom:** Agent asks for file contents instead of reading them.\n\n**Cause:** Missing `--allowedTools` in claude_proxy.py CLI call.\n\n**Fix:** Proxy must pass tool permissions:\n```bash\nclaude -p ... --allowedTools Read Write Edit Bash\n```\n\n### 4. Agent claims success but didn't do task\n\n**Symptom:** Agent says \"I've created the file\" but file doesn't exist.\n\n**Cause:** Hallucination - agent describing intended actions without executing.\n\n**Fix:** Added emphatic anti-hallucination prompt in REPL_BASELINE:\n```\nCRITICAL: Use ACTUAL tools. Never DESCRIBE using tools.\n```\n\n### 5. Timeout on agent.call()\n\n**Symptom:** Call hangs for 30+ seconds then times out.\n\n**Cause:** Claude CLI taking too long or stuck in a loop.\n\n**Fix:** Check proxy logs for the actual CLI output. May need to simplify prompt.\n\n## Key Files\n\n| File | Purpose |\n|------|---------|\n| `scripts/agentica/claude_proxy.py` | OpenAI-compatible proxy with SSE streaming |\n| `workspace/agentica-research/agentica-server/` | Local agentica-server installation |\n| `scripts/agentica/PATTERNS.md` | Multi-agent pattern documentation |\n\n## Quick Verification\n\nTest the full stack:\n\n```bash\n# 1. Verify proxy responds\ncurl http://localhost:8080/health\n\n# 2. Verify server responds\ncurl http://localhost:2345/health\n\n# 3. Test inference through proxy\ncurl http://localhost:8080/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"claude\",\"messages\":[{\"role\":\"user\",\"content\":\"Say hello\"}]}'\n```\n\n## Checklist\n\nBefore running agents:\n- [ ] Claude proxy running on port 8080\n- [ ] Agentica server running on port 2345 (from its directory)\n- [ ] `S_M_BASE_URL` set for client scripts\n- [ ] `INFERENCE_ENDPOINT_URL` set for server\n- [ ] Both health checks return 200","schemaVersion":1},"repoUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/agentica-server","tags":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Continuous-Claude-v3","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:51:52.595Z","lockfiles":[]},"forks":303,"owner":"parcadei","stars":3942,"topics":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp"],"license":"MIT","fullName":"parcadei/Continuous-Claude-v3","homepage":null,"language":"Python","pushedAt":"2026-01-26T15:27:49Z","avatarUrl":"https://avatars.githubusercontent.com/u/227596144?v=4","crawledAt":"2026-09-25T11:51:43.697Z","openIssues":46,"manifestFile":"SKILL.md","manifestPath":".claude/skills/agentica-server/SKILL.md","defaultBranch":"main"},"readme":"# Agentica Server + Claude Proxy Setup\n\nComplete reference for running Agentica SDK with a local Claude proxy. This enables Python agents to use Claude CLI as their inference backend.\n\n## When to Use\n\nUse this skill when:\n- Starting Agentica development with Claude proxy\n- Debugging connection issues between SDK, server, and proxy\n- Setting up a fresh Agentica environment\n- Troubleshooting agent tool access or hallucination issues\n\n## Architecture\n\n```\nAgentica SDK (client code)\n    | S_M_BASE_URL=http://localhost:2345\n    v\nClientSessionManager\n    |\n    v\nAgentica Server (agentica-server)\n    | INFERENCE_ENDPOINT_URL=http://localhost:8080/v1/chat/completions\n    v\nClaude Proxy (claude_proxy.py)\n    |\n    v\nClaude CLI (claude -p)\n```\n\n## Environment Variables\n\n| Variable | Set By | Used By | Purpose |\n|----------|--------|---------|---------|\n| `INFERENCE_ENDPOINT_URL` | Human | agentica-server | Where server sends LLM inference requests |\n| `S_M_BASE_URL` | Human | Agentica SDK client | Where SDK connects to session manager |\n\n**KEY:** These are NOT the same endpoint!\n- SDK connects to server (port 2345)\n- Server connects to proxy (port 8080)\n\n## Startup Sequence\n\nMust start in this order (each in a separate terminal):\n\n### Terminal 1: Claude Proxy\n\n```bash\nuv run python scripts/agentica/claude_proxy.py --port 8080\n```\n\n### Terminal 2: Agentica Server\n\n**MUST run from its directory:**\n\n```bash\ncd workspace/agentica-research/agentica-server\nINFERENCE_ENDPOINT_URL=http://localhost:8080/v1/chat/completions uv run agentica-server --port 2345\n```\n\n### Terminal 3: Your Agent Script\n\n```bash\nS_M_BASE_URL=http://localhost:2345 uv run python scripts/agentica/your_script.py\n```\n\n## Health Checks\n\n```bash\n# Claude proxy health\ncurl http://localhost:8080/health\n\n# Agentica server health\ncurl http://localhost:2345/health\n```\n\n## Common Errors & Fixes\n\n### 1. APIConnectionError after agent spawn\n\n**Symptom:** Agent spawns successfully but fails on first call with connection error.\n\n**Cause:** Claude proxy returning plain JSON instead of SSE format.\n\n**Fix:** Proxy must return Server-Sent Events format:\n```\ndata: {\"choices\": [...]}\\n\\n\n```\n\n### 2. ModuleNotFoundError for agentica-server\n\n**Symptom:** `ModuleNotFoundError: No module named 'agentica_server'`\n\n**Cause:** Running `uv run agentica-server` from wrong directory.\n\n**Fix:** Must `cd workspace/agentica-research/agentica-server` first.\n\n### 3. Agent can't use Read/Write/Edit tools\n\n**Symptom:** Agent asks for file contents instead of reading them.\n\n**Cause:** Missing `--allowedTools` in claude_proxy.py CLI call.\n\n**Fix:** Proxy must pass tool permissions:\n```bash\nclaude -p ... --allowedTools Read Write Edit Bash\n```\n\n### 4. Agent claims success but didn't do task\n\n**Symptom:** Agent says \"I've created the file\" but file doesn't exist.\n\n**Cause:** Hallucination - agent describing intended actions without executing.\n\n**Fix:** Added emphatic anti-hallucination prompt in REPL_BASELINE:\n```\nCRITICAL: Use ACTUAL tools. Never DESCRIBE using tools.\n```\n\n### 5. Timeout on agent.call()\n\n**Symptom:** Call hangs for 30+ seconds then times out.\n\n**Cause:** Claude CLI taking too long or stuck in a loop.\n\n**Fix:** Check proxy logs for the actual CLI output. May need to simplify prompt.\n\n## Key Files\n\n| File | Purpose |\n|------|---------|\n| `scripts/agentica/claude_proxy.py` | OpenAI-compatible proxy with SSE streaming |\n| `workspace/agentica-research/agentica-server/` | Local agentica-server installation |\n| `scripts/agentica/PATTERNS.md` | Multi-agent pattern documentation |\n\n## Quick Verification\n\nTest the full stack:\n\n```bash\n# 1. Verify proxy responds\ncurl http://localhost:8080/health\n\n# 2. Verify server responds\ncurl http://localhost:2345/health\n\n# 3. Test inference through proxy\ncurl http://localhost:8080/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"claude\",\"messages\":[{\"role\":\"user\",\"content\":\"Say hello\"}]}'\n```\n\n## Checklist\n\nBefore running agents:\n- [ ] Cla","createdAt":"2026-09-25T11:51:52.693Z","updatedAt":"2026-09-25T11:51:52.693Z"},{"id":"cmugwhpc201anqu06b1hrycmu","slug":"parcadei-continuous-claude-v3-agentica-spawn","name":"agentica-spawn","description":"Spawn Agentica multi-agent patterns","authorId":"gh:parcadei","authorName":"parcadei","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":3942,"pricePerCall":0,"manifest":{"name":"agentica-spawn","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Spawn Agentica multi-agent patterns","permissions":[],"systemPrompt":"# Agentica Spawn Skill\n\nUse this skill after user selects an Agentica pattern.\n\n## When to Use\n\n- After agentica-orchestrator prompts user for pattern selection\n- When user explicitly requests a multi-agent pattern (swarm, hierarchical, etc.)\n- When implementing complex tasks that benefit from parallel agent execution\n- For research tasks requiring multiple perspectives (use Swarm)\n- For implementation tasks requiring coordination (use Hierarchical)\n- For iterative refinement (use Generator/Critic)\n- For high-stakes validation (use Jury)\n\n## Pattern Selection to Spawn Method\n\n### Swarm (Research/Explore)\n```python\nswarm = Swarm(\n    perspectives=[\n        \"Security expert analyzing for vulnerabilities\",\n        \"Performance expert optimizing for speed\",\n        \"Architecture expert reviewing design\"\n    ],\n    aggregate_mode=AggregateMode.MERGE,\n)\nresult = await swarm.execute(task_description)\n```\n\n### Hierarchical (Build/Implement)\n```python\nhierarchical = Hierarchical(\n    coordinator_premise=\"You break tasks into subtasks\",\n    specialist_premises={\n        \"planner\": \"You create implementation plans\",\n        \"implementer\": \"You write code\",\n        \"reviewer\": \"You review code for issues\"\n    },\n)\nresult = await hierarchical.execute(task_description)\n```\n\n### Generator/Critic (Iterate/Refine)\n```python\ngc = GeneratorCritic(\n    generator_premise=\"You generate solutions\",\n    critic_premise=\"You critique and suggest improvements\",\n    max_rounds=3,\n)\nresult = await gc.run(task_description)\n```\n\n### Jury (Validate/Verify)\n```python\njury = Jury(\n    num_jurors=5,\n    consensus_mode=ConsensusMode.MAJORITY,\n    premise=\"You evaluate the solution\"\n)\nverdict = await jury.decide(bool, question)\n```\n\n## Environment Variables\n\nAll spawned agents receive:\n- `SWARM_ID`: Unique identifier for this swarm run\n- `AGENT_ROLE`: Role within the pattern (coordinator, specialist, etc.)\n- `PATTERN_TYPE`: Which pattern is running","schemaVersion":1},"repoUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/agentica-spawn","tags":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Continuous-Claude-v3","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:51:52.595Z","lockfiles":[]},"forks":303,"owner":"parcadei","stars":3942,"topics":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp"],"license":"MIT","fullName":"parcadei/Continuous-Claude-v3","homepage":null,"language":"Python","pushedAt":"2026-01-26T15:27:49Z","avatarUrl":"https://avatars.githubusercontent.com/u/227596144?v=4","crawledAt":"2026-09-25T11:51:43.697Z","openIssues":46,"manifestFile":"SKILL.md","manifestPath":".claude/skills/agentica-spawn/SKILL.md","defaultBranch":"main"},"readme":"# Agentica Spawn Skill\n\nUse this skill after user selects an Agentica pattern.\n\n## When to Use\n\n- After agentica-orchestrator prompts user for pattern selection\n- When user explicitly requests a multi-agent pattern (swarm, hierarchical, etc.)\n- When implementing complex tasks that benefit from parallel agent execution\n- For research tasks requiring multiple perspectives (use Swarm)\n- For implementation tasks requiring coordination (use Hierarchical)\n- For iterative refinement (use Generator/Critic)\n- For high-stakes validation (use Jury)\n\n## Pattern Selection to Spawn Method\n\n### Swarm (Research/Explore)\n```python\nswarm = Swarm(\n    perspectives=[\n        \"Security expert analyzing for vulnerabilities\",\n        \"Performance expert optimizing for speed\",\n        \"Architecture expert reviewing design\"\n    ],\n    aggregate_mode=AggregateMode.MERGE,\n)\nresult = await swarm.execute(task_description)\n```\n\n### Hierarchical (Build/Implement)\n```python\nhierarchical = Hierarchical(\n    coordinator_premise=\"You break tasks into subtasks\",\n    specialist_premises={\n        \"planner\": \"You create implementation plans\",\n        \"implementer\": \"You write code\",\n        \"reviewer\": \"You review code for issues\"\n    },\n)\nresult = await hierarchical.execute(task_description)\n```\n\n### Generator/Critic (Iterate/Refine)\n```python\ngc = GeneratorCritic(\n    generator_premise=\"You generate solutions\",\n    critic_premise=\"You critique and suggest improvements\",\n    max_rounds=3,\n)\nresult = await gc.run(task_description)\n```\n\n### Jury (Validate/Verify)\n```python\njury = Jury(\n    num_jurors=5,\n    consensus_mode=ConsensusMode.MAJORITY,\n    premise=\"You evaluate the solution\"\n)\nverdict = await jury.decide(bool, question)\n```\n\n## Environment Variables\n\nAll spawned agents receive:\n- `SWARM_ID`: Unique identifier for this swarm run\n- `AGENT_ROLE`: Role within the pattern (coordinator, specialist, etc.)\n- `PATTERN_TYPE`: Which pattern is running","createdAt":"2026-09-25T11:51:52.706Z","updatedAt":"2026-09-25T11:51:52.706Z"},{"id":"cmugwhpcc01aqqu06af167jdo","slug":"parcadei-continuous-claude-v3-ast-grep-find","name":"ast-grep-find","description":"AST-based code search and refactoring via ast-grep MCP","authorId":"gh:parcadei","authorName":"parcadei","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":3942,"pricePerCall":0,"manifest":{"name":"ast-grep-find","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"AST-based code search and refactoring via ast-grep MCP","permissions":["shell"],"systemPrompt":"# AST-Grep Find\n\nStructural code search that understands syntax. Find patterns like function calls, imports, class definitions - not just text.\n\n## When to Use\n\n- Find code patterns (ignores strings/comments)\n- Search for function calls, class definitions, imports\n- Refactor code with AST precision\n- Rename variables/functions across codebase\n\n## Usage\n\n### Search for a pattern\n```bash\nuv run python -m runtime.harness scripts/ast_grep_find.py \\\n    --pattern \"import asyncio\" --language python\n```\n\n### Search in specific directory\n```bash\nuv run python -m runtime.harness scripts/ast_grep_find.py \\\n    --pattern \"async def \\$FUNC(\\$\\$\\$)\" --language python --path \"./src\"\n```\n\n### Refactor/replace pattern\n```bash\nuv run python -m runtime.harness scripts/ast_grep_find.py \\\n    --pattern \"console.log(\\$MSG)\" --replace \"logger.info(\\$MSG)\" \\\n    --language javascript\n```\n\n### Dry run (preview changes)\n```bash\nuv run python -m runtime.harness scripts/ast_grep_find.py \\\n    --pattern \"print(\\$X)\" --replace \"logger.info(\\$X)\" \\\n    --language python --dry-run\n```\n\n## Parameters\n\n| Parameter | Description |\n|-----------|-------------|\n| `--pattern` | AST pattern to search (required) |\n| `--language` | Language: `python`, `javascript`, `typescript`, `go`, etc. |\n| `--path` | Directory to search (default: `.`) |\n| `--glob` | File glob pattern (e.g., `**/*.py`) |\n| `--replace` | Replacement pattern for refactoring |\n| `--dry-run` | Preview changes without applying |\n| `--context` | Lines of context (default: 2) |\n\n## Pattern Syntax\n\n| Syntax | Meaning |\n|--------|---------|\n| `$NAME` | Match single node (variable, expression) |\n| `$$$` | Match multiple nodes (arguments, statements) |\n| `$_` | Match any single node (wildcard) |\n\n## Examples\n\n```bash\n# Find all function definitions\nuv run python -m runtime.harness scripts/ast_grep_find.py \\\n    --pattern \"def \\$FUNC(\\$\\$\\$):\" --language python\n\n# Find console.log calls\nuv run python -m runtime.harness scripts/ast_grep_find.py \\\n    --pattern \"console.log(\\$\\$\\$)\" --language javascript\n\n# Replace print with logging\nuv run python -m runtime.harness scripts/ast_grep_find.py \\\n    --pattern \"print(\\$X)\" --replace \"logging.info(\\$X)\" \\\n    --language python --dry-run\n```\n\n## vs morph/warpgrep\n\n| Tool | Best For |\n|------|----------|\n| **ast-grep** | Structural patterns (understands code syntax) |\n| **warpgrep** | Fast text/regex search (20x faster grep) |\n\nUse ast-grep when you need syntax-aware matching. Use warpgrep for raw speed.\n\n## MCP Server Required\n\nRequires `ast-grep` server in mcp_config.json.","schemaVersion":1},"repoUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/ast-grep-find","tags":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Continuous-Claude-v3","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:51:52.595Z","lockfiles":[]},"forks":303,"owner":"parcadei","stars":3942,"topics":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp"],"license":"MIT","fullName":"parcadei/Continuous-Claude-v3","homepage":null,"language":"Python","pushedAt":"2026-01-26T15:27:49Z","avatarUrl":"https://avatars.githubusercontent.com/u/227596144?v=4","crawledAt":"2026-09-25T11:51:43.697Z","openIssues":46,"manifestFile":"SKILL.md","manifestPath":".claude/skills/ast-grep-find/SKILL.md","defaultBranch":"main"},"readme":"# AST-Grep Find\n\nStructural code search that understands syntax. Find patterns like function calls, imports, class definitions - not just text.\n\n## When to Use\n\n- Find code patterns (ignores strings/comments)\n- Search for function calls, class definitions, imports\n- Refactor code with AST precision\n- Rename variables/functions across codebase\n\n## Usage\n\n### Search for a pattern\n```bash\nuv run python -m runtime.harness scripts/ast_grep_find.py \\\n    --pattern \"import asyncio\" --language python\n```\n\n### Search in specific directory\n```bash\nuv run python -m runtime.harness scripts/ast_grep_find.py \\\n    --pattern \"async def \\$FUNC(\\$\\$\\$)\" --language python --path \"./src\"\n```\n\n### Refactor/replace pattern\n```bash\nuv run python -m runtime.harness scripts/ast_grep_find.py \\\n    --pattern \"console.log(\\$MSG)\" --replace \"logger.info(\\$MSG)\" \\\n    --language javascript\n```\n\n### Dry run (preview changes)\n```bash\nuv run python -m runtime.harness scripts/ast_grep_find.py \\\n    --pattern \"print(\\$X)\" --replace \"logger.info(\\$X)\" \\\n    --language python --dry-run\n```\n\n## Parameters\n\n| Parameter | Description |\n|-----------|-------------|\n| `--pattern` | AST pattern to search (required) |\n| `--language` | Language: `python`, `javascript`, `typescript`, `go`, etc. |\n| `--path` | Directory to search (default: `.`) |\n| `--glob` | File glob pattern (e.g., `**/*.py`) |\n| `--replace` | Replacement pattern for refactoring |\n| `--dry-run` | Preview changes without applying |\n| `--context` | Lines of context (default: 2) |\n\n## Pattern Syntax\n\n| Syntax | Meaning |\n|--------|---------|\n| `$NAME` | Match single node (variable, expression) |\n| `$$$` | Match multiple nodes (arguments, statements) |\n| `$_` | Match any single node (wildcard) |\n\n## Examples\n\n```bash\n# Find all function definitions\nuv run python -m runtime.harness scripts/ast_grep_find.py \\\n    --pattern \"def \\$FUNC(\\$\\$\\$):\" --language python\n\n# Find console.log calls\nuv run python -m runtime.harness scripts/ast_grep_find.py \\\n    --pattern \"console.log(\\$\\$\\$)\" --language javascript\n\n# Replace print with logging\nuv run python -m runtime.harness scripts/ast_grep_find.py \\\n    --pattern \"print(\\$X)\" --replace \"logging.info(\\$X)\" \\\n    --language python --dry-run\n```\n\n## vs morph/warpgrep\n\n| Tool | Best For |\n|------|----------|\n| **ast-grep** | Structural patterns (understands code syntax) |\n| **warpgrep** | Fast text/regex search (20x faster grep) |\n\nUse ast-grep when you need syntax-aware matching. Use warpgrep for raw speed.\n\n## MCP Server Required\n\nRequires `ast-grep` server in mcp_config.json.","createdAt":"2026-09-25T11:51:52.717Z","updatedAt":"2026-09-25T11:51:52.717Z"},{"id":"cmugwhpcl01atqu063fvm7nti","slug":"parcadei-continuous-claude-v3-async-repl-protocol","name":"async-repl-protocol","description":"Async REPL Protocol","authorId":"gh:parcadei","authorName":"parcadei","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":3942,"pricePerCall":0,"manifest":{"name":"async-repl-protocol","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Async REPL Protocol","permissions":[],"systemPrompt":"# Async REPL Protocol\n\nWhen working with Agentica's async REPL harness for testing.\n\n## Rules\n\n### 1. Use `await` for Future-returning tools\n\n```python\ncontent = await view_file(path)  # NOT view_file(path)\nanswer = await ask_memory(\"...\")\n```\n\n### 2. Single code block per response\n\nCompute AND return in ONE block. Multiple blocks means only first executes.\n\n```python\n# GOOD: Single block\ncontent = await view_file(path)\nreturn any(c.isdigit() for c in content)\n\n# BAD: Split blocks (second block never runs)\ncontent = await view_file(path)","schemaVersion":1},"repoUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/async-repl-protocol","tags":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Continuous-Claude-v3","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:51:52.595Z","lockfiles":[]},"forks":303,"owner":"parcadei","stars":3942,"topics":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp"],"license":"MIT","fullName":"parcadei/Continuous-Claude-v3","homepage":null,"language":"Python","pushedAt":"2026-01-26T15:27:49Z","avatarUrl":"https://avatars.githubusercontent.com/u/227596144?v=4","crawledAt":"2026-09-25T11:51:43.697Z","openIssues":46,"manifestFile":"SKILL.md","manifestPath":".claude/skills/async-repl-protocol/SKILL.md","defaultBranch":"main"},"readme":"# Async REPL Protocol\n\nWhen working with Agentica's async REPL harness for testing.\n\n## Rules\n\n### 1. Use `await` for Future-returning tools\n\n```python\ncontent = await view_file(path)  # NOT view_file(path)\nanswer = await ask_memory(\"...\")\n```\n\n### 2. Single code block per response\n\nCompute AND return in ONE block. Multiple blocks means only first executes.\n\n```python\n# GOOD: Single block\ncontent = await view_file(path)\nreturn any(c.isdigit() for c in content)\n\n# BAD: Split blocks (second block never runs)\ncontent = await view_file(path)","createdAt":"2026-09-25T11:51:52.725Z","updatedAt":"2026-09-25T11:51:52.725Z"},{"id":"cmugwhpcs01awqu06e4al4r8a","slug":"parcadei-continuous-claude-v3-background-agent-pings","name":"background-agent-pings","description":"Background Agent Pings","authorId":"gh:parcadei","authorName":"parcadei","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":3942,"pricePerCall":0,"manifest":{"name":"background-agent-pings","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Background Agent Pings","permissions":[],"systemPrompt":"# Background Agent Pings\n\nTrust system reminders as agent progress notifications. Don't poll.\n\n## Pattern\n\nWhen you launch a background agent, **continue working on other tasks**. The system will notify you via reminders when:\n- Agent makes progress: `Agent <id> progress: X new tools used, Y new tokens`\n- Agent writes output file (check the path you specified)\n\n## DO\n\n```\n1. Task(run_in_background=true, prompt=\"... Output to: .claude/cache/agents/<type>/output.md\")\n2. Continue with next task immediately\n3. When system reminder shows agent activity, check if output file exists\n4. Read output file only when agent signals completion\n```\n\n## DON'T\n\n```\n# BAD: Polling wastes tokens and time\nTask(run_in_background=true)\nBash(\"sleep 5 && ls ...\")  # polling\nBash(\"tail /tmp/claude/.../tasks/<id>.output\")  # polling\nTaskOutput(task_id=\"...\")  # floods context\n```\n\n## Why This Matters\n\n- Polling burns tokens on repeated checks\n- `TaskOutput` floods main context with full agent transcript\n- System reminders are free - they're pushed to you automatically\n- Continue productive work while waiting\n\n## Source\n\n- This session: Realized polling for agent output wasted time when system reminders already provide progress updates","schemaVersion":1},"repoUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/background-agent-pings","tags":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Continuous-Claude-v3","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:51:52.595Z","lockfiles":[]},"forks":303,"owner":"parcadei","stars":3942,"topics":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp"],"license":"MIT","fullName":"parcadei/Continuous-Claude-v3","homepage":null,"language":"Python","pushedAt":"2026-01-26T15:27:49Z","avatarUrl":"https://avatars.githubusercontent.com/u/227596144?v=4","crawledAt":"2026-09-25T11:51:43.697Z","openIssues":46,"manifestFile":"SKILL.md","manifestPath":".claude/skills/background-agent-pings/SKILL.md","defaultBranch":"main"},"readme":"# Background Agent Pings\n\nTrust system reminders as agent progress notifications. Don't poll.\n\n## Pattern\n\nWhen you launch a background agent, **continue working on other tasks**. The system will notify you via reminders when:\n- Agent makes progress: `Agent <id> progress: X new tools used, Y new tokens`\n- Agent writes output file (check the path you specified)\n\n## DO\n\n```\n1. Task(run_in_background=true, prompt=\"... Output to: .claude/cache/agents/<type>/output.md\")\n2. Continue with next task immediately\n3. When system reminder shows agent activity, check if output file exists\n4. Read output file only when agent signals completion\n```\n\n## DON'T\n\n```\n# BAD: Polling wastes tokens and time\nTask(run_in_background=true)\nBash(\"sleep 5 && ls ...\")  # polling\nBash(\"tail /tmp/claude/.../tasks/<id>.output\")  # polling\nTaskOutput(task_id=\"...\")  # floods context\n```\n\n## Why This Matters\n\n- Polling burns tokens on repeated checks\n- `TaskOutput` floods main context with full agent transcript\n- System reminders are free - they're pushed to you automatically\n- Continue productive work while waiting\n\n## Source\n\n- This session: Realized polling for agent output wasted time when system reminders already provide progress updates","createdAt":"2026-09-25T11:51:52.732Z","updatedAt":"2026-09-25T11:51:52.732Z"},{"id":"cmugwhpcz01azqu06nif9aosz","slug":"parcadei-continuous-claude-v3-braintrust-analyze","name":"braintrust-analyze","description":"Analyze Claude Code sessions via Braintrust","authorId":"gh:parcadei","authorName":"parcadei","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":3942,"pricePerCall":0,"manifest":{"name":"braintrust-analyze","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Analyze Claude Code sessions via Braintrust","permissions":[],"systemPrompt":"# Braintrust Analysis\n\nAnalyze your Claude Code sessions for patterns, issues, and insights using Braintrust tracing data.\n\n## When to Use\n\n- After completing a complex task (retrospective)\n- When debugging why something failed\n- Weekly review of productivity patterns\n- Finding opportunities to create new skills\n- Understanding token usage trends\n\n## Commands\n\nRun from the project directory:\n\n```bash\n# Analyze last session - summary with tool/agent/skill breakdown\nuv run python -m runtime.harness scripts/braintrust_analyze.py --last-session\n\n# List recent sessions\nuv run python -m runtime.harness scripts/braintrust_analyze.py --sessions 5\n\n# Agent usage statistics (last 7 days)\nuv run python -m runtime.harness scripts/braintrust_analyze.py --agent-stats\n\n# Skill usage statistics (last 7 days)\nuv run python -m runtime.harness scripts/braintrust_analyze.py --skill-stats\n\n# Detect loops - find repeated tool patterns (>5 same tool calls)\nuv run python -m runtime.harness scripts/braintrust_analyze.py --detect-loops\n\n# Replay specific session - show full sequence of actions\nuv run python -m runtime.harness scripts/braintrust_analyze.py --replay <session-id>\n\n# Weekly summary - daily activity breakdown\nuv run python -m runtime.harness scripts/braintrust_analyze.py --weekly-summary\n\n# Token trends - usage over time\nuv run python -m runtime.harness scripts/braintrust_analyze.py --token-trends\n```\n\n## Options\n\n- `--project NAME` - Braintrust project name (default: agentica)\n\n## What You'll Learn\n\n### Session Analysis\n- Tool usage breakdown\n- Agent spawns (plan-agent, debug-agent, etc.)\n- Skill activations (/commit, /research, etc.)\n- Token consumption estimates\n\n### Loop Detection\nFind sessions where the same tool was called repeatedly, which may indicate:\n- Stuck in a search loop\n- Inefficient approach\n- Opportunity for better tooling\n\n### Usage Patterns\n- Which agents you use most\n- Which skills get activated\n- Daily/weekly activity trends\n\n## Examples\n\n### Quick Retrospective\n```bash\n# What happened in my last session?\nuv run python -m runtime.harness scripts/braintrust_analyze.py --last-session\n```\n\nOutput:\n```\n## Session Analysis\n**ID:** `92940b91...`\n**Started:** 2025-12-24T01:31:05Z\n**Spans:** 14\n\n### Tool Usage\n- Read: 4\n- Bash: 2\n- Edit: 2\n...\n```\n\n### Find Loops\n```bash\nuv run python -m runtime.harness scripts/braintrust_analyze.py --detect-loops\n```\n\n### Weekly Review\n```bash\nuv run python -m runtime.harness scripts/braintrust_analyze.py --weekly-summary\n```\n\n## Requirements\n\n- BRAINTRUST_API_KEY in ~/.claude/.env or project .env\n- Braintrust tracing enabled (via braintrust-claude-plugin)","schemaVersion":1},"repoUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/braintrust-analyze","tags":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Continuous-Claude-v3","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:51:52.595Z","lockfiles":[]},"forks":303,"owner":"parcadei","stars":3942,"topics":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp"],"license":"MIT","fullName":"parcadei/Continuous-Claude-v3","homepage":null,"language":"Python","pushedAt":"2026-01-26T15:27:49Z","avatarUrl":"https://avatars.githubusercontent.com/u/227596144?v=4","crawledAt":"2026-09-25T11:51:43.697Z","openIssues":46,"manifestFile":"SKILL.md","manifestPath":".claude/skills/braintrust-analyze/SKILL.md","defaultBranch":"main"},"readme":"# Braintrust Analysis\n\nAnalyze your Claude Code sessions for patterns, issues, and insights using Braintrust tracing data.\n\n## When to Use\n\n- After completing a complex task (retrospective)\n- When debugging why something failed\n- Weekly review of productivity patterns\n- Finding opportunities to create new skills\n- Understanding token usage trends\n\n## Commands\n\nRun from the project directory:\n\n```bash\n# Analyze last session - summary with tool/agent/skill breakdown\nuv run python -m runtime.harness scripts/braintrust_analyze.py --last-session\n\n# List recent sessions\nuv run python -m runtime.harness scripts/braintrust_analyze.py --sessions 5\n\n# Agent usage statistics (last 7 days)\nuv run python -m runtime.harness scripts/braintrust_analyze.py --agent-stats\n\n# Skill usage statistics (last 7 days)\nuv run python -m runtime.harness scripts/braintrust_analyze.py --skill-stats\n\n# Detect loops - find repeated tool patterns (>5 same tool calls)\nuv run python -m runtime.harness scripts/braintrust_analyze.py --detect-loops\n\n# Replay specific session - show full sequence of actions\nuv run python -m runtime.harness scripts/braintrust_analyze.py --replay <session-id>\n\n# Weekly summary - daily activity breakdown\nuv run python -m runtime.harness scripts/braintrust_analyze.py --weekly-summary\n\n# Token trends - usage over time\nuv run python -m runtime.harness scripts/braintrust_analyze.py --token-trends\n```\n\n## Options\n\n- `--project NAME` - Braintrust project name (default: agentica)\n\n## What You'll Learn\n\n### Session Analysis\n- Tool usage breakdown\n- Agent spawns (plan-agent, debug-agent, etc.)\n- Skill activations (/commit, /research, etc.)\n- Token consumption estimates\n\n### Loop Detection\nFind sessions where the same tool was called repeatedly, which may indicate:\n- Stuck in a search loop\n- Inefficient approach\n- Opportunity for better tooling\n\n### Usage Patterns\n- Which agents you use most\n- Which skills get activated\n- Daily/weekly activity trends\n\n## Examples\n\n### Quick Retrospective\n```bash\n# What happened in my last session?\nuv run python -m runtime.harness scripts/braintrust_analyze.py --last-session\n```\n\nOutput:\n```\n## Session Analysis\n**ID:** `92940b91...`\n**Started:** 2025-12-24T01:31:05Z\n**Spans:** 14\n\n### Tool Usage\n- Read: 4\n- Bash: 2\n- Edit: 2\n...\n```\n\n### Find Loops\n```bash\nuv run python -m runtime.harness scripts/braintrust_analyze.py --detect-loops\n```\n\n### Weekly Review\n```bash\nuv run python -m runtime.harness scripts/braintrust_analyze.py --weekly-summary\n```\n\n## Requirements\n\n- BRAINTRUST_API_KEY in ~/.claude/.env or project .env\n- Braintrust tracing enabled (via braintrust-claude-plugin)","createdAt":"2026-09-25T11:51:52.739Z","updatedAt":"2026-09-25T11:51:52.739Z"},{"id":"cmugwhpd601b2qu065ksq7yzy","slug":"parcadei-continuous-claude-v3-braintrust-tracing","name":"braintrust-tracing","description":"Braintrust tracing for Claude Code - hook architecture, sub-agent correlation, debugging","authorId":"gh:parcadei","authorName":"parcadei","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":3942,"pricePerCall":0,"manifest":{"name":"braintrust-tracing","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Braintrust tracing for Claude Code - hook architecture, sub-agent correlation, debugging","permissions":[],"systemPrompt":"# Braintrust Tracing for Claude Code\n\nComprehensive guide to tracing Claude Code sessions in Braintrust, including sub-agent correlation.\n\n## Architecture Overview\n\n```\n                         PARENT SESSION\n                    +---------------------+\n                    |  SessionStart       |\n                    |  (creates root)     |\n                    +----------+----------+\n                               |\n                    +----------v----------+\n                    |  UserPromptSubmit   |\n                    |  (creates Turn)     |\n                    +----------+----------+\n                               |\n          +--------------------+--------------------+\n          |                    |                    |\n+---------v--------+  +--------v--------+  +--------v--------+\n| PostToolUse      |  | PostToolUse     |  | PreToolUse      |\n| (Read span)      |  | (Edit span)     |  | (Task - inject) |\n+------------------+  +-----------------+  +--------+--------+\n                                                    |\n                                         +----------v----------+\n                                         |   SUB-AGENT         |\n                                         |   SessionStart      |\n                                         |   (NEW root_span_id)|\n                                         +----------+----------+\n                                                    |\n                                         +----------v----------+\n                                         |   SubagentStop      |\n                                         |   (has session_id)  |\n                                         +---------------------+\n```\n\n## Hook Event Flow\n\n| Hook | Trigger | Creates | Key Fields |\n|------|---------|---------|------------|\n| **SessionStart** | Session begins | Root span | `session_id`, `root_span_id` |\n| **UserPromptSubmit** | User sends prompt | Turn span | `prompt`, `turn_number` |\n| **PreToolUse** | Before tool runs | (modifies Task prompts) | `tool_input.prompt` |\n| **PostToolUse** | After tool runs | Tool span | `tool_name`, `input`, `output` |\n| **Stop** | Turn completes | LLM spans | `model`, `tokens`, `tool_calls` |\n| **SubagentStop** | Sub-agent finishes | (no span) | `session_id` of sub-agent |\n| **SessionEnd** | Session ends | (finalizes root) | `turn_count`, `tool_count` |\n\n## Trace Hierarchy\n\n```\nSession (task span) - root_span_id = session_id\n|\n+-- Turn 1 (task span)\n|   |\n|   +-- claude-sonnet (llm span) - model call with tool_use\n|   +-- Read (tool span)\n|   +-- Edit (tool span)\n|   +-- claude-sonnet (llm span) - response after tools\n|\n+-- Turn 2 (task span)\n|   |\n|   +-- claude-sonnet (llm span)\n|   +-- Task (tool span) -----> [Sub-agent session - SEPARATE trace]\n|   +-- claude-sonnet (llm span)\n|\n+-- Turn 3 ...\n```\n\n## Sub-Agent Tracing: What Works and What Doesn't\n\n### What Doesn't Work\n\n**SessionStart doesn't receive the Task prompt.**\n\nWe tried injecting trace context into Task prompts via PreToolUse:\n\n```bash\n# PreToolUse hook injects:\n[BRAINTRUST_TRACE_CONTEXT]\n{\"root_span_id\": \"abc\", \"parent_span_id\": \"xyz\", \"project_id\": \"123\"}\n[/BRAINTRUST_TRACE_CONTEXT]\n```\n\nBut SessionStart only receives session metadata, not the modified prompt. The injected context is lost.\n\n### What DOES Work\n\n**Task spans in parent session contain everything:**\n- `agentId` - identifier for the sub-agent run\n- `totalTokens`, `totalToolUseCount` - metrics\n- `content` - full agent response/summary\n- `tool_input.prompt` - original task prompt\n- `tool_input.subagent_type` - agent type (e.g., \"oracle\")\n\n**SubagentStop hook receives the sub-agent's `session_id`:**\n- This equals the sub-agent's orphaned trace `root_span_id`\n- Allows correlation between parent Task span and child trace\n\n### The Correlation Pattern\n\n**Current state:** Sub-agents create orphaned traces (new `root_span_id`).\n\n**Correlation method:**\n1. Query parent session's Task spans for agent metadata\n2. Match `agentId` or timing with orphaned traces\n3. Sub-agent's `session_id` = its trace's `root_span_id`\n\n**Future solution (not yet implemented):**\n```\nSubagentStop fires -> writes session_id to temp file\nPostToolUse (Task) -> reads temp file -> adds child_session_id to Task span metadata\n```\n\nThis would link: `Task.agentId` + `Task.child_session_id` -> orphaned trace `root_span_id`\n\n## State Management\n\n### Per-Session State Files\n\n```\n~/.claude/state/braintrust_sessions/\n  {session_id}.json       # Per-session state\n```\n\nEach session file contains:\n```json\n{\n  \"root_span_id\": \"abc-123\",\n  \"project_id\": \"proj-456\",\n  \"turn_count\": 5,\n  \"tool_count\": 23,\n  \"current_turn_span_id\": \"turn-789\",\n  \"current_turn_start\": 1703456789,\n  \"started\": \"2025-12-24T10:00:00.000Z\",\n  \"is_subagent\": false\n}\n```\n\n### Global State\n```\n~/.claude/state/braintrust_global.json   # Cached project_id\n~/.claude/state/braintrust_hook.log      # Debug log\n```\n\n## Debugging Commands\n\n### Check if Tracing is Active\n```bash\n# View hook logs in real-time\ntail -f ~/.claude/state/braintrust_hook.log\n\n# Check if session has state\ncat ~/.claude/state/braintrust_sessions/*.json | jq -s '.'\n\n# Verify environment\necho \"TRACE_TO_BRAINTRUST=$TRACE_TO_BRAINTRUST\"\necho \"BRAINTRUST_API_KEY=${BRAINTRUST_API_KEY:+set}\"\n```\n\n### Query Braintrust Directly\n```bash\n# List recent sessions\nuv run python -m runtime.harness scripts/braintrust_analyze.py --sessions 5\n\n# Analyze last session\nuv run python -m runtime.harness scripts/braintrust_analyze.py --last-session\n\n# Replay specific session\nuv run python -m runtime.harness scripts/braintrust_analyze.py --replay <session-id>\n\n# Find sub-agent traces (orphaned roots)\nuv run python -m runtime.harness scripts/braintrust_analyze.py --agent-stats\n```\n\n### Debug Hook Execution\n```bash\n# Enable verbose logging\nexport BRAINTRUST_CC_DEBUG=true\n\n# Test hooks manually\necho '{\"session_id\":\"test-123\",\"type\":\"resume\"}' | \\\n  bash \"$CLAUDE_PROJECT_DIR/.claude/plugins/braintrust-tracing/hooks/session_start.sh\"\n\n# Test PreToolUse (Task injection)\necho '{\"session_id\":\"test-123\",\"tool_name\":\"Task\",\"tool_input\":{\"prompt\":\"test\"}}' | \\\n  bash \"$CLAUDE_PROJECT_DIR/.claude/plugins/braintrust-tracing/hooks/pre_tool_use.sh\"\n```\n\n### Troubleshooting Checklist\n\n1. **No traces appearing:**\n   - Check `TRACE_TO_BRAINTRUST=true` in `.claude/settings.local.json`\n   - Verify API key: `echo $BRAINTRUST_API_KEY`\n   - Check logs: `tail -20 ~/.claude/state/braintrust_hook.log`\n\n2. **Sub-agents not linking:**\n   - This is expected - sub-agents create orphaned traces\n   - Use `--agent-stats` to find agent activity\n   - Correlate via timing or `agentId` in parent Task span\n\n3. **Missing spans:**\n   - Check `current_turn_span_id` in session state\n   - Ensure Stop hook runs (turn finalization)\n   - Look for \"Failed to create\" errors in log\n\n4. **State corruption:**\n   - Remove session state: `rm ~/.claude/state/braintrust_sessions/*.json`\n   - Clear global cache: `rm ~/.claude/state/braintrust_global.json`\n\n## Key Files\n\n| File | Purpose |\n|------|---------|\n| `.claude/plugins/braintrust-tracing/hooks/common.sh` | Shared utilities, API, state management |\n| `.claude/plugins/braintrust-tracing/hooks/session_start.sh` | Creates root span, handles sub-agent context |\n| `.claude/plugins/braintrust-tracing/hooks/user_prompt_submit.sh` | Creates Turn spans per user message |\n| `.claude/plugins/braintrust-tracing/hooks/pre_tool_use.sh` | Injects trace context into Task prompts |\n| `.claude/plugins/braintrust-tracing/hooks/post_tool_use.sh` | Creates tool spans, captures agent/skill metadata |\n| `.claude/plugins/braintrust-tracing/hooks/stop_hook.sh` | Creates LLM spans, finalizes Turns |\n| `.claude/plugins/braintrust-tracing/hooks/session_end.sh` | Finalizes session, triggers learning extraction |\n| `scripts/braintrust_analyze.py` | Query and analyze traced sessions |\n| `~/.claude/state/braintrust_sessions/` | Per-session state files |\n| `~/.claude/state/braintrust_hook.log` | Debug log |\n\n## Environment Variables\n\n| Variable | Required | Default | Description |\n|----------|----------|---------|-------------|\n| `TRACE_TO_BRAINTRUST` | Yes | - | Set to `\"true\"` to enable |\n| `BRAINTRUST_API_KEY` | Yes | - | API key for Braintrust |\n| `BRAINTRUST_CC_PROJECT` | No | `claude-code` | Project name |\n| `BRAINTRUST_CC_DEBUG` | No | `false` | Verbose logging |\n| `BRAINTRUST_API_URL` | No | `https://api.braintrust.dev` | API endpoint |\n\n## Session Learnings\n\n### What We Learned About Sub-Agent Tracing (Dec 2025)\n\n**Attempted:** Inject trace context via PreToolUse into Task prompts.\n\n**Result:** Failed - SessionStart only receives session metadata, not the prompt.\n\n**Discovery:** Task spans already contain rich sub-agent data:\n- `metadata.agent_type` - agent type from `subagent_type`\n- `metadata.skill_name` - skill from Skill tool\n- `tool_input` - full prompt sent to agent\n- `tool_output` - agent response\n\n**Current correlation path:**\n1. Parent session Task span has `agentId` and timing\n2. Sub-agent creates orphaned trace with `root_span_id = session_id`\n3. SubagentStop provides the sub-agent's `session_id`\n4. Manual correlation: match timing or use `session_id` link\n\n**Future work:** Write `child_session_id` to Task span metadata from PostToolUse after SubagentStop.\n\n## What We Learned About Sub-Agent Correlation\n\n### The Problem\n\n- Sub-agents spawned via Task tool create orphaned Braintrust traces\n- Parent session has Task spans with `agentId`, sub-agent has separate `session_id`\n- No built-in link between them\n\n### What DOESN'T Work\n\n**1. Prompt injection via PreToolUse**\n\nSessionStart hook only receives session metadata (`session_id`, `type`, `cwd`), NOT the prompt. Injected trace context is never seen.\n\nThe hook receives:\n```json\n{\n  \"session_id\": \"...\",\n  \"type\": \"start|resume|compact|clear\",\n  \"cwd\": \"...\",\n  \"env\": {...}\n}\n```\n\nNo prompt field exists - context injection is impossible at SessionStart.\n\n**2. SubagentStop → PostToolUse file handoff**\n\nRace condition. These are independent async hooks with no timing guarantees:\n- SubagentStop fires when sub-agent session ends\n- PostToolUse (Task) fires when Task tool completes\n- No ordering guarantee between them\n- Writing to a correlation file creates a race\n\n**3. PreToolUse correlation files**\n\nSessionStart can't access the `task_span_id` because it has no context about which Task spawned it. PreToolUse modifies prompts but doesn't create a reliably accessible state file that SessionStart can find.\n\n### What DOES Work\n\n**Post-hoc matching for dataset building:**\n\nParent session Task spans contain:\n- `agentId` - identifier for the sub-agent run\n- `totalTokens`, `totalToolUseCount` - aggregated metrics\n- `content` - full agent response/summary\n- `tool_input.prompt` - original task prompt\n- `tool_input.subagent_type` - agent type (e.g., \"oracle\")\n- Start/end timestamps\n\nSub-agent sessions contain:\n- `session_id` (equals orphaned trace `root_span_id`)\n- Start/end timestamps\n- All internal spans and tool calls\n\n**Correlation strategy:**\n1. Export parent session traces (query parent `root_span_id`)\n2. Export sub-agent traces (query all sessions created within parent's time window)\n3. Match by:\n   - Timing: Task span end ≈ sub-agent session end\n   - Metadata: `subagent_type` from Task prompt\n   - IDs: SubagentStop hook provides `session_id` (can be captured and logged)\n\n### Architecture Insight\n\nSessionStart input is intentionally minimal - it contains no prompt or tool context:\n\n```typescript\ninterface SessionStartInput {\n  session_id: string;\n  type: \"start\" | \"resume\" | \"compact\" | \"clear\";\n  cwd: string;\n  env: { [key: string]: string };\n  // NO: prompt, tool_context, task_span_id, parent_span_id\n}\n```\n\nThis design boundary prevents real-time correlation at hook time.\n\n### Recommendation\n\nFor building agent run datasets with sub-agent correlation:\n\n1. **In-session logging:** Capture SubagentStop `session_id` in logs or state\n2. **Post-session export:** Query Braintrust API for parent and sub-agent traces\n3. **Offline correlation:** Match traces by timing and metadata in a script\n4. **Don't try real-time linking:** Hooks don't have necessary context\n\nExample script pattern:\n```bash\n# 1. Export parent session\nbraintrust_analyze.py --replay <parent-session-id> > parent_traces.json\n\n# 2. Query for orphaned sub-agent traces (those created during parent's time window)\nbraintrust_analyze.py --agent-stats > all_agent_traces.json\n\n# 3. Correlate in Python:\n#    - Parent Task spans -> agentId, timestamps, subagent_type\n#    - Orphaned traces -> root_span_id, timestamps\n#    - Match by timing and type\n```\n\nThis approach is reliable, testable, and doesn't require hooks to maintain implicit state.","schemaVersion":1},"repoUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/braintrust-tracing","tags":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Continuous-Claude-v3","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:51:52.595Z","lockfiles":[]},"forks":303,"owner":"parcadei","stars":3942,"topics":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp"],"license":"MIT","fullName":"parcadei/Continuous-Claude-v3","homepage":null,"language":"Python","pushedAt":"2026-01-26T15:27:49Z","avatarUrl":"https://avatars.githubusercontent.com/u/227596144?v=4","crawledAt":"2026-09-25T11:51:43.697Z","openIssues":46,"manifestFile":"SKILL.md","manifestPath":".claude/skills/braintrust-tracing/SKILL.md","defaultBranch":"main"},"readme":"# Braintrust Tracing for Claude Code\n\nComprehensive guide to tracing Claude Code sessions in Braintrust, including sub-agent correlation.\n\n## Architecture Overview\n\n```\n                         PARENT SESSION\n                    +---------------------+\n                    |  SessionStart       |\n                    |  (creates root)     |\n                    +----------+----------+\n                               |\n                    +----------v----------+\n                    |  UserPromptSubmit   |\n                    |  (creates Turn)     |\n                    +----------+----------+\n                               |\n          +--------------------+--------------------+\n          |                    |                    |\n+---------v--------+  +--------v--------+  +--------v--------+\n| PostToolUse      |  | PostToolUse     |  | PreToolUse      |\n| (Read span)      |  | (Edit span)     |  | (Task - inject) |\n+------------------+  +-----------------+  +--------+--------+\n                                                    |\n                                         +----------v----------+\n                                         |   SUB-AGENT         |\n                                         |   SessionStart      |\n                                         |   (NEW root_span_id)|\n                                         +----------+----------+\n                                                    |\n                                         +----------v----------+\n                                         |   SubagentStop      |\n                                         |   (has session_id)  |\n                                         +---------------------+\n```\n\n## Hook Event Flow\n\n| Hook | Trigger | Creates | Key Fields |\n|------|---------|---------|------------|\n| **SessionStart** | Session begins | Root span | `session_id`, `root_span_id` |\n| **UserPromptSubmit** | User sends prompt | Turn span | `prompt`, `turn_number` |\n| **PreToolUse** | Before tool runs | (modifies Task prompts) | `tool_input.prompt` |\n| **PostToolUse** | After tool runs | Tool span | `tool_name`, `input`, `output` |\n| **Stop** | Turn completes | LLM spans | `model`, `tokens`, `tool_calls` |\n| **SubagentStop** | Sub-agent finishes | (no span) | `session_id` of sub-agent |\n| **SessionEnd** | Session ends | (finalizes root) | `turn_count`, `tool_count` |\n\n## Trace Hierarchy\n\n```\nSession (task span) - root_span_id = session_id\n|\n+-- Turn 1 (task span)\n|   |\n|   +-- claude-sonnet (llm span) - model call with tool_use\n|   +-- Read (tool span)\n|   +-- Edit (tool span)\n|   +-- claude-sonnet (llm span) - response after tools\n|\n+-- Turn 2 (task span)\n|   |\n|   +-- claude-sonnet (llm span)\n|   +-- Task (tool span) -----> [Sub-agent session - SEPARATE trace]\n|   +-- claude-sonnet (llm span)\n|\n+-- Turn 3 ...\n```\n\n## Sub-Agent Tracing: What Works and What Doesn't\n\n### What Doesn't Work\n\n**SessionStart doesn't receive the Task prompt.**\n\nWe tried injecting trace context into Task prompts via PreToolUse:\n\n```bash\n# PreToolUse hook injects:\n[BRAINTRUST_TRACE_CONTEXT]\n{\"root_span_id\": \"abc\", \"parent_span_id\": \"xyz\", \"project_id\": \"123\"}\n[/BRAINTRUST_TRACE_CONTEXT]\n```\n\nBut SessionStart only receives session metadata, not the modified prompt. The injected context is lost.\n\n### What DOES Work\n\n**Task spans in parent session contain everything:**\n- `agentId` - identifier for the sub-agent run\n- `totalTokens`, `totalToolUseCount` - metrics\n- `content` - full agent response/summary\n- `tool_input.prompt` - original task prompt\n- `tool_input.subagent_type` - agent type (e.g., \"oracle\")\n\n**SubagentStop hook receives the sub-agent's `session_id`:**\n- This equals the sub-agent's orphaned trace `root_span_id`\n- Allows correlation between parent Task span and child trace\n\n### The Correlation Pattern\n\n**Current state:** Sub-agents create orphaned traces (new `root_span_id`).\n\n**Correlation method:**\n1. Query parent session's Task spans for agent metadata\n2. Match `agentId` or timing with ","createdAt":"2026-09-25T11:51:52.746Z","updatedAt":"2026-09-25T11:51:52.746Z"},{"id":"cmugwhpde01b5qu063y8badrb","slug":"parcadei-continuous-claude-v3-cli-reference","name":"cli-reference","description":"Claude Code CLI commands, flags, headless mode, and automation patterns","authorId":"gh:parcadei","authorName":"parcadei","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":3942,"pricePerCall":0,"manifest":{"name":"cli-reference","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Claude Code CLI commands, flags, headless mode, and automation patterns","permissions":[],"systemPrompt":"# CLI Reference\n\nComplete reference for Claude Code command-line interface.\n\n## When to Use\n\n- \"What CLI flags are available?\"\n- \"How do I use headless mode?\"\n- \"Claude in automation/CI/CD\"\n- \"Output format options\"\n- \"System prompt via CLI\"\n- \"How do I spawn agents properly?\"\n\n## Core Commands\n\n| Command | Description | Example |\n|---------|-------------|---------|\n| `claude` | Start interactive REPL | `claude` |\n| `claude \"query\"` | REPL with initial prompt | `claude \"explain this project\"` |\n| `claude -p \"query\"` | Headless mode (SDK) | `claude -p \"explain function\"` |\n| `cat file \\| claude -p` | Process piped content | `cat logs.txt \\| claude -p \"explain\"` |\n| `claude -c` | Continue most recent | `claude -c` |\n| `claude -c -p \"query\"` | Continue via SDK | `claude -c -p \"check types\"` |\n| `claude -r \"id\" \"query\"` | Resume session | `claude -r \"auth\" \"finish PR\"` |\n| `claude update` | Update version | `claude update` |\n| `claude mcp` | Configure MCP servers | See MCP docs |\n\n## Session Control\n\n| Flag | Description | Example |\n|------|-------------|---------|\n| `--continue, -c` | Load most recent conversation | `claude --continue` |\n| `--resume, -r` | Resume session by ID/name | `claude --resume auth-refactor` |\n| `--session-id` | Use specific UUID | `claude --session-id \"550e8400-...\"` |\n| `--fork-session` | Create new session on resume | `claude --resume abc --fork-session` |\n\n## Headless Mode (Critical for Agents)\n\n| Flag | Description | Example |\n|------|-------------|---------|\n| `--print, -p` | Non-interactive, exit after | `claude -p \"query\"` |\n| `--output-format` | `text`, `json`, `stream-json` | `claude -p --output-format json` |\n| `--max-turns` | Limit agentic turns | `claude -p --max-turns 100 \"query\"` |\n| `--verbose` | Full turn-by-turn output | `claude --verbose` |\n| `--dangerously-skip-permissions` | Skip permission prompts | `claude -p --dangerously-skip-permissions` |\n| `--include-partial-messages` | Include streaming events | `claude -p --output-format stream-json --include-partial-messages` |\n| `--input-format` | Input format (text/stream-json) | `claude -p --input-format stream-json` |\n\n## Tool Control\n\n| Flag | Description | Example |\n|------|-------------|---------|\n| `--allowedTools` | Auto-approve these tools | `\"Bash(git log:*)\" \"Read\"` |\n| `--disallowedTools` | Block these tools | `\"Bash(rm:*)\" \"Edit\"` |\n| `--tools` | Only allow these tools | `--tools \"Bash,Edit,Read\"` |\n\n## Subagent Definition (--agents flag)\n\nDefine custom subagents inline via JSON:\n\n```bash\nclaude --agents '{\n  \"code-reviewer\": {\n    \"description\": \"Expert code reviewer. Use proactively after code changes.\",\n    \"prompt\": \"You are a senior code reviewer. Focus on code quality and security.\",\n    \"tools\": [\"Read\", \"Grep\", \"Glob\", \"Bash\"],\n    \"model\": \"sonnet\"\n  },\n  \"debugger\": {\n    \"description\": \"Debugging specialist for errors and test failures.\",\n    \"prompt\": \"You are an expert debugger. Analyze errors and provide fixes.\"\n  }\n}'\n```\n\n### Agent Fields\n\n| Field | Required | Description |\n|-------|----------|-------------|\n| `description` | Yes | When to invoke this agent |\n| `prompt` | Yes | System prompt for behavior |\n| `tools` | No | Allowed tools (inherits all if omitted) |\n| `model` | No | `sonnet`, `haiku`, or `claude-opus-4-5-20251101` |\n\n### Key Insight\nWhen Lead uses Task tool, it auto-spawns from these definitions. No manual spawn needed.\n\n## System Prompt Customization\n\n| Flag | Behavior | Modes |\n|------|----------|-------|\n| `--system-prompt` | **Replace** entire prompt | Interactive + Print |\n| `--system-prompt-file` | **Replace** from file | Print only |\n| `--append-system-prompt` | **Append** to default (recommended) | Interactive + Print |\n\n**Use `--append-system-prompt`** for most cases - preserves Claude Code capabilities.\n\n## Model Selection\n\n| Flag | Description | Example |\n|------|-------------|---------|\n| `--model` | Set model for session | `--model claude-sonnet-4-5` |\n| `--fallback-model` | Fallback if default overloaded | `--fallback-model sonnet` |\n\nAliases: `sonnet`, `opus`, `haiku`\n\n## MCP Configuration\n\n| Flag | Description | Example |\n|------|-------------|---------|\n| `--mcp-config` | Load MCP servers from JSON | `--mcp-config ./mcp.json` |\n| `--strict-mcp-config` | Only use these MCP servers | `--strict-mcp-config --mcp-config ./mcp.json` |\n\n## Advanced Flags\n\n| Flag | Description | Example |\n|------|-------------|---------|\n| `--add-dir` | Add working directories | `--add-dir ../apps ../lib` |\n| `--agent` | Specify agent for session | `--agent my-custom-agent` |\n| `--permission-mode` | Start in permission mode | `--permission-mode plan` |\n| `--permission-prompt-tool` | MCP tool for permissions | `--permission-prompt-tool mcp_auth` |\n| `--plugin-dir` | Load plugins from directory | `--plugin-dir ./my-plugins` |\n| `--settings` | Load settings from file/JSON | `--settings ./settings.json` |\n| `--setting-sources` | Which settings to load | `--setting-sources user,project` |\n| `--betas` | Beta API headers | `--betas interleaved-thinking` |\n| `--debug` | Enable debug mode | `--debug \"api,hooks\"` |\n| `--ide` | Auto-connect to IDE | `--ide` |\n| `--chrome` | Enable Chrome integration | `--chrome` |\n| `--no-chrome` | Disable Chrome for session | `--no-chrome` |\n| `--enable-lsp-logging` | Verbose LSP debugging | `--enable-lsp-logging` |\n| `--version, -v` | Output version | `claude -v` |\n\n## Output Formats\n\n### JSON (for parsing)\n```bash\nclaude -p \"query\" --output-format json\n# {\"result\": \"...\", \"session_id\": \"...\", \"usage\": {...}}\n```\n\n### Streaming (for real-time monitoring)\n```bash\nclaude -p \"query\" --output-format stream-json\n# Newline-delimited JSON events\n```\n\n### Structured Output (schema validation)\n```bash\nclaude -p \"Extract data\" \\\n  --output-format json \\\n  --json-schema '{\"type\":\"object\",\"properties\":{...}}'\n```\n\n## Headless Agent Pattern (CRITICAL)\n\nProper headless agent spawn:\n\n```bash\nclaude -p \"$TASK_PROMPT\" \\\n  --session-id \"$UUID\" \\\n  --dangerously-skip-permissions \\\n  --max-turns 100 \\\n  --output-format stream-json \\\n  --agents '{...}' \\\n  --append-system-prompt \"Context: ...\"\n```\n\n**Missing any of these causes hangs:**\n- `--session-id` - Track the session\n- `--dangerously-skip-permissions` - Headless requires this\n- `--max-turns` - Prevents infinite loops\n\n## Common Patterns\n\n### CI/CD Automation\n```bash\nclaude -p \"Run tests and fix failures\" \\\n  --dangerously-skip-permissions \\\n  --max-turns 50 \\\n  --output-format json | jq '.result'\n```\n\n### Piped Input\n```bash\ncat error.log | claude -p \"Find root cause\"\ngh pr diff | claude -p \"Review for security\"\n```\n\n### Multi-turn Session\n```bash\nid=$(claude -p \"Start task\" --output-format json | jq -r '.session_id')\nclaude -p \"Continue\" --resume \"$id\"\n```\n\n### Stream Monitoring\n```bash\nclaude -p \"Long task\" \\\n  --output-format stream-json \\\n  --include-partial-messages | while read -r line; do\n    echo \"$line\" | jq '.type'\ndone\n```\n\n## Keyboard Shortcuts (Interactive)\n\n| Shortcut | Action |\n|----------|--------|\n| `Ctrl+C` | Cancel current |\n| `Ctrl+D` | Exit |\n| `Ctrl+R` | Reverse search history |\n| `Esc Esc` | Rewind changes |\n| `Shift+Tab` | Toggle permission mode |\n\n## Quick Commands\n\n| Prefix | Action |\n|--------|--------|\n| `/` | Slash command |\n| `!` | Bash mode |\n| `#` | Add to memory |\n| `@` | File mention |","schemaVersion":1},"repoUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/cli-reference","tags":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Continuous-Claude-v3","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:51:52.595Z","lockfiles":[]},"forks":303,"owner":"parcadei","stars":3942,"topics":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp"],"license":"MIT","fullName":"parcadei/Continuous-Claude-v3","homepage":null,"language":"Python","pushedAt":"2026-01-26T15:27:49Z","avatarUrl":"https://avatars.githubusercontent.com/u/227596144?v=4","crawledAt":"2026-09-25T11:51:43.697Z","openIssues":46,"manifestFile":"SKILL.md","manifestPath":".claude/skills/cli-reference/SKILL.md","defaultBranch":"main"},"readme":"# CLI Reference\n\nComplete reference for Claude Code command-line interface.\n\n## When to Use\n\n- \"What CLI flags are available?\"\n- \"How do I use headless mode?\"\n- \"Claude in automation/CI/CD\"\n- \"Output format options\"\n- \"System prompt via CLI\"\n- \"How do I spawn agents properly?\"\n\n## Core Commands\n\n| Command | Description | Example |\n|---------|-------------|---------|\n| `claude` | Start interactive REPL | `claude` |\n| `claude \"query\"` | REPL with initial prompt | `claude \"explain this project\"` |\n| `claude -p \"query\"` | Headless mode (SDK) | `claude -p \"explain function\"` |\n| `cat file \\| claude -p` | Process piped content | `cat logs.txt \\| claude -p \"explain\"` |\n| `claude -c` | Continue most recent | `claude -c` |\n| `claude -c -p \"query\"` | Continue via SDK | `claude -c -p \"check types\"` |\n| `claude -r \"id\" \"query\"` | Resume session | `claude -r \"auth\" \"finish PR\"` |\n| `claude update` | Update version | `claude update` |\n| `claude mcp` | Configure MCP servers | See MCP docs |\n\n## Session Control\n\n| Flag | Description | Example |\n|------|-------------|---------|\n| `--continue, -c` | Load most recent conversation | `claude --continue` |\n| `--resume, -r` | Resume session by ID/name | `claude --resume auth-refactor` |\n| `--session-id` | Use specific UUID | `claude --session-id \"550e8400-...\"` |\n| `--fork-session` | Create new session on resume | `claude --resume abc --fork-session` |\n\n## Headless Mode (Critical for Agents)\n\n| Flag | Description | Example |\n|------|-------------|---------|\n| `--print, -p` | Non-interactive, exit after | `claude -p \"query\"` |\n| `--output-format` | `text`, `json`, `stream-json` | `claude -p --output-format json` |\n| `--max-turns` | Limit agentic turns | `claude -p --max-turns 100 \"query\"` |\n| `--verbose` | Full turn-by-turn output | `claude --verbose` |\n| `--dangerously-skip-permissions` | Skip permission prompts | `claude -p --dangerously-skip-permissions` |\n| `--include-partial-messages` | Include streaming events | `claude -p --output-format stream-json --include-partial-messages` |\n| `--input-format` | Input format (text/stream-json) | `claude -p --input-format stream-json` |\n\n## Tool Control\n\n| Flag | Description | Example |\n|------|-------------|---------|\n| `--allowedTools` | Auto-approve these tools | `\"Bash(git log:*)\" \"Read\"` |\n| `--disallowedTools` | Block these tools | `\"Bash(rm:*)\" \"Edit\"` |\n| `--tools` | Only allow these tools | `--tools \"Bash,Edit,Read\"` |\n\n## Subagent Definition (--agents flag)\n\nDefine custom subagents inline via JSON:\n\n```bash\nclaude --agents '{\n  \"code-reviewer\": {\n    \"description\": \"Expert code reviewer. Use proactively after code changes.\",\n    \"prompt\": \"You are a senior code reviewer. Focus on code quality and security.\",\n    \"tools\": [\"Read\", \"Grep\", \"Glob\", \"Bash\"],\n    \"model\": \"sonnet\"\n  },\n  \"debugger\": {\n    \"description\": \"Debugging specialist for errors and test failures.\",\n    \"prompt\": \"You are an expert debugger. Analyze errors and provide fixes.\"\n  }\n}'\n```\n\n### Agent Fields\n\n| Field | Required | Description |\n|-------|----------|-------------|\n| `description` | Yes | When to invoke this agent |\n| `prompt` | Yes | System prompt for behavior |\n| `tools` | No | Allowed tools (inherits all if omitted) |\n| `model` | No | `sonnet`, `haiku`, or `claude-opus-4-5-20251101` |\n\n### Key Insight\nWhen Lead uses Task tool, it auto-spawns from these definitions. No manual spawn needed.\n\n## System Prompt Customization\n\n| Flag | Behavior | Modes |\n|------|----------|-------|\n| `--system-prompt` | **Replace** entire prompt | Interactive + Print |\n| `--system-prompt-file` | **Replace** from file | Print only |\n| `--append-system-prompt` | **Append** to default (recommended) | Interactive + Print |\n\n**Use `--append-system-prompt`** for most cases - preserves Claude Code capabilities.\n\n## Model Selection\n\n| Flag | Description | Example |\n|------|-------------|---------|\n| `--model` | Set model for session | `--model claude-sonnet-4-5` |\n| `--fallback-model` | Fallback i","createdAt":"2026-09-25T11:51:52.754Z","updatedAt":"2026-09-25T11:51:52.754Z"},{"id":"cmugwhpdl01b8qu06edlhycql","slug":"parcadei-continuous-claude-v3-commit","name":"commit","description":"Create git commits with user approval and no Claude attribution","authorId":"gh:parcadei","authorName":"parcadei","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":3942,"pricePerCall":0,"manifest":{"name":"commit","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Create git commits with user approval and no Claude attribution","permissions":[],"systemPrompt":"# Commit Changes\n\nYou are tasked with creating git commits for the changes made during this session.\n\n## Process:\n\n1. **Think about what changed:**\n   - Review the conversation history and understand what was accomplished\n   - Run `git status` to see current changes\n   - Run `git diff` to understand the modifications\n   - Consider whether changes should be one commit or multiple logical commits\n\n2. **Plan your commit(s):**\n   - Identify which files belong together\n   - Draft clear, descriptive commit messages\n   - Use imperative mood in commit messages\n   - Focus on why the changes were made, not just what\n\n3. **Present your plan to the user:**\n   - List the files you plan to add for each commit\n   - Show the commit message(s) you'll use\n   - Ask: \"I plan to create [N] commit(s) with these changes. Shall I proceed?\"\n\n4. **Execute upon confirmation:**\n   - Use `git add` with specific files (never use `-A` or `.`)\n   - Create commits with your planned messages\n   - Show the result with `git log --oneline -n [number]`\n\n5. **Generate reasoning (after each commit):**\n   - Run: `bash \"$CLAUDE_PROJECT_DIR/.claude/scripts/generate-reasoning.sh\" <commit-hash> \"<commit-message>\"`\n   - This captures what was tried during development (build failures, fixes)\n   - The reasoning file helps future sessions understand past decisions\n   - Stored in `.git/claude/commits/<hash>/reasoning.md`\n\n## Important:\n- **NEVER add co-author information or Claude attribution**\n- Commits should be authored solely by the user\n- Do not include any \"Generated with Claude\" messages\n- Do not add \"Co-Authored-By\" lines\n- Write commit messages as if the user wrote them\n\n## Remember:\n- You have the full context of what was done in this session\n- Group related changes together\n- Keep commits focused and atomic when possible\n- The user trusts your judgment - they asked you to commit","schemaVersion":1},"repoUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/commit","tags":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Continuous-Claude-v3","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:51:52.595Z","lockfiles":[]},"forks":303,"owner":"parcadei","stars":3942,"topics":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp"],"license":"MIT","fullName":"parcadei/Continuous-Claude-v3","homepage":null,"language":"Python","pushedAt":"2026-01-26T15:27:49Z","avatarUrl":"https://avatars.githubusercontent.com/u/227596144?v=4","crawledAt":"2026-09-25T11:51:43.697Z","openIssues":46,"manifestFile":"SKILL.md","manifestPath":".claude/skills/commit/SKILL.md","defaultBranch":"main"},"readme":"# Commit Changes\n\nYou are tasked with creating git commits for the changes made during this session.\n\n## Process:\n\n1. **Think about what changed:**\n   - Review the conversation history and understand what was accomplished\n   - Run `git status` to see current changes\n   - Run `git diff` to understand the modifications\n   - Consider whether changes should be one commit or multiple logical commits\n\n2. **Plan your commit(s):**\n   - Identify which files belong together\n   - Draft clear, descriptive commit messages\n   - Use imperative mood in commit messages\n   - Focus on why the changes were made, not just what\n\n3. **Present your plan to the user:**\n   - List the files you plan to add for each commit\n   - Show the commit message(s) you'll use\n   - Ask: \"I plan to create [N] commit(s) with these changes. Shall I proceed?\"\n\n4. **Execute upon confirmation:**\n   - Use `git add` with specific files (never use `-A` or `.`)\n   - Create commits with your planned messages\n   - Show the result with `git log --oneline -n [number]`\n\n5. **Generate reasoning (after each commit):**\n   - Run: `bash \"$CLAUDE_PROJECT_DIR/.claude/scripts/generate-reasoning.sh\" <commit-hash> \"<commit-message>\"`\n   - This captures what was tried during development (build failures, fixes)\n   - The reasoning file helps future sessions understand past decisions\n   - Stored in `.git/claude/commits/<hash>/reasoning.md`\n\n## Important:\n- **NEVER add co-author information or Claude attribution**\n- Commits should be authored solely by the user\n- Do not include any \"Generated with Claude\" messages\n- Do not add \"Co-Authored-By\" lines\n- Write commit messages as if the user wrote them\n\n## Remember:\n- You have the full context of what was done in this session\n- Group related changes together\n- Keep commits focused and atomic when possible\n- The user trusts your judgment - they asked you to commit","createdAt":"2026-09-25T11:51:52.761Z","updatedAt":"2026-09-25T11:51:52.761Z"},{"id":"cmugwhpf101btqu06m99f9int","slug":"parcadei-continuous-claude-v3-debug-hooks","name":"debug-hooks","description":"Systematic hook debugging workflow. Use when hooks aren't firing, producing wrong output, or behaving unexpectedly.","authorId":"gh:parcadei","authorName":"parcadei","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":3942,"pricePerCall":0,"manifest":{"name":"debug-hooks","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Systematic hook debugging workflow. Use when hooks aren't firing, producing wrong output, or behaving unexpectedly.","permissions":["shell"],"systemPrompt":"# Debug Hooks\n\nSystematic workflow for debugging Claude Code hooks.\n\n## When to Use\n\n- \"Hook isn't firing\"\n- \"Hook produces wrong output\"\n- \"SessionEnd not working\"\n- \"PostToolUse hook not triggering\"\n- \"Why didn't my hook run?\"\n\n## Workflow\n\n### 1. Check Outputs First (Observe Before Editing)\n\n```bash\n# Check project cache\nls -la $CLAUDE_PROJECT_DIR/.claude/cache/\n\n# Check specific outputs\nls -la $CLAUDE_PROJECT_DIR/.claude/cache/learnings/\n\n# Check for debug logs\ntail $CLAUDE_PROJECT_DIR/.claude/cache/*.log 2>/dev/null\n\n# Also check global (common mistake: wrong path)\nls -la ~/.claude/cache/ 2>/dev/null\n```\n\n### 2. Verify Hook Registration\n\n```bash\n# Project settings\ncat $CLAUDE_PROJECT_DIR/.claude/settings.json | grep -A 20 '\"SessionEnd\"\\|\"PostToolUse\"\\|\"UserPromptSubmit\"'\n\n# Global settings (hooks merge from both)\ncat ~/.claude/settings.json | grep -A 20 '\"SessionEnd\"\\|\"PostToolUse\"\\|\"UserPromptSubmit\"'\n```\n\n### 3. Check Hook Files Exist\n\n```bash\n# Shell wrappers\nls -la $CLAUDE_PROJECT_DIR/.claude/hooks/*.sh\n\n# Compiled bundles (if using TypeScript)\nls -la $CLAUDE_PROJECT_DIR/.claude/hooks/dist/*.mjs\n```\n\n### 4. Test Hook Manually\n\n```bash\n# SessionEnd hook\necho '{\"session_id\": \"test-123\", \"reason\": \"clear\", \"transcript_path\": \"/tmp/test\"}' | \\\n  $CLAUDE_PROJECT_DIR/.claude/hooks/session-end-cleanup.sh\n\n# PostToolUse hook (Write tool example)\necho '{\"tool_name\": \"Write\", \"tool_input\": {\"file_path\": \"test.md\"}, \"session_id\": \"test-123\"}' | \\\n  $CLAUDE_PROJECT_DIR/.claude/hooks/handoff-index.sh\n```\n\n### 5. Check for Silent Failures\n\nIf using detached spawn with `stdio: 'ignore'`:\n\n```typescript\n// This pattern hides errors!\nspawn(cmd, args, { detached: true, stdio: 'ignore' })\n```\n\n**Fix:** Add temporary logging:\n\n```typescript\nconst logFile = fs.openSync('.claude/cache/debug.log', 'a');\nspawn(cmd, args, {\n  detached: true,\n  stdio: ['ignore', logFile, logFile]  // capture stdout/stderr\n});\n```\n\n### 6. Rebuild After Edits\n\nIf you edited TypeScript source, you MUST rebuild:\n\n```bash\ncd $CLAUDE_PROJECT_DIR/.claude/hooks\nnpx esbuild src/session-end-cleanup.ts \\\n  --bundle --platform=node --format=esm \\\n  --outfile=dist/session-end-cleanup.mjs\n```\n\nSource edits alone don't take effect - the shell wrapper runs the bundled `.mjs`.\n\n## Common Issues\n\n| Symptom | Likely Cause | Fix |\n|---------|--------------|-----|\n| Hook never runs | Not registered in settings.json | Add to correct event in settings |\n| Hook runs but no output | Detached spawn hiding errors | Add logging, check manually |\n| Wrong session ID | Using \"most recent\" query | Pass ID explicitly |\n| Works locally, not in CI | Missing dependencies | Check npx/node availability |\n| Runs twice | Registered in both global + project | Remove duplicate |\n\n## Debug Checklist\n\n- [ ] Outputs exist? (`ls -la .claude/cache/`)\n- [ ] Registered? (`grep -A10 '\"hooks\"' .claude/settings.json`)\n- [ ] Files exist? (`ls .claude/hooks/*.sh`)\n- [ ] Bundle current? (`ls -la .claude/hooks/dist/`)\n- [ ] Manual test works? (`echo '{}' | ./hook.sh`)\n- [ ] No silent failures? (check for `stdio: 'ignore'`)\n\n## Source Sessions\n\nDerived from 10 sessions (83% of all learnings):\n- a541f08a, 1c21e6c8, 6a9f2d7a, a8bd5cea, 2ca1a178, 657ce0b2, 3998f3a2, 2a829f12, 0b46cfd7, 862f6e2c","schemaVersion":1},"repoUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/debug-hooks","tags":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Continuous-Claude-v3","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:51:52.595Z","lockfiles":[]},"forks":303,"owner":"parcadei","stars":3942,"topics":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp"],"license":"MIT","fullName":"parcadei/Continuous-Claude-v3","homepage":null,"language":"Python","pushedAt":"2026-01-26T15:27:49Z","avatarUrl":"https://avatars.githubusercontent.com/u/227596144?v=4","crawledAt":"2026-09-25T11:51:43.697Z","openIssues":46,"manifestFile":"SKILL.md","manifestPath":".claude/skills/debug-hooks/SKILL.md","defaultBranch":"main"},"readme":"# Debug Hooks\n\nSystematic workflow for debugging Claude Code hooks.\n\n## When to Use\n\n- \"Hook isn't firing\"\n- \"Hook produces wrong output\"\n- \"SessionEnd not working\"\n- \"PostToolUse hook not triggering\"\n- \"Why didn't my hook run?\"\n\n## Workflow\n\n### 1. Check Outputs First (Observe Before Editing)\n\n```bash\n# Check project cache\nls -la $CLAUDE_PROJECT_DIR/.claude/cache/\n\n# Check specific outputs\nls -la $CLAUDE_PROJECT_DIR/.claude/cache/learnings/\n\n# Check for debug logs\ntail $CLAUDE_PROJECT_DIR/.claude/cache/*.log 2>/dev/null\n\n# Also check global (common mistake: wrong path)\nls -la ~/.claude/cache/ 2>/dev/null\n```\n\n### 2. Verify Hook Registration\n\n```bash\n# Project settings\ncat $CLAUDE_PROJECT_DIR/.claude/settings.json | grep -A 20 '\"SessionEnd\"\\|\"PostToolUse\"\\|\"UserPromptSubmit\"'\n\n# Global settings (hooks merge from both)\ncat ~/.claude/settings.json | grep -A 20 '\"SessionEnd\"\\|\"PostToolUse\"\\|\"UserPromptSubmit\"'\n```\n\n### 3. Check Hook Files Exist\n\n```bash\n# Shell wrappers\nls -la $CLAUDE_PROJECT_DIR/.claude/hooks/*.sh\n\n# Compiled bundles (if using TypeScript)\nls -la $CLAUDE_PROJECT_DIR/.claude/hooks/dist/*.mjs\n```\n\n### 4. Test Hook Manually\n\n```bash\n# SessionEnd hook\necho '{\"session_id\": \"test-123\", \"reason\": \"clear\", \"transcript_path\": \"/tmp/test\"}' | \\\n  $CLAUDE_PROJECT_DIR/.claude/hooks/session-end-cleanup.sh\n\n# PostToolUse hook (Write tool example)\necho '{\"tool_name\": \"Write\", \"tool_input\": {\"file_path\": \"test.md\"}, \"session_id\": \"test-123\"}' | \\\n  $CLAUDE_PROJECT_DIR/.claude/hooks/handoff-index.sh\n```\n\n### 5. Check for Silent Failures\n\nIf using detached spawn with `stdio: 'ignore'`:\n\n```typescript\n// This pattern hides errors!\nspawn(cmd, args, { detached: true, stdio: 'ignore' })\n```\n\n**Fix:** Add temporary logging:\n\n```typescript\nconst logFile = fs.openSync('.claude/cache/debug.log', 'a');\nspawn(cmd, args, {\n  detached: true,\n  stdio: ['ignore', logFile, logFile]  // capture stdout/stderr\n});\n```\n\n### 6. Rebuild After Edits\n\nIf you edited TypeScript source, you MUST rebuild:\n\n```bash\ncd $CLAUDE_PROJECT_DIR/.claude/hooks\nnpx esbuild src/session-end-cleanup.ts \\\n  --bundle --platform=node --format=esm \\\n  --outfile=dist/session-end-cleanup.mjs\n```\n\nSource edits alone don't take effect - the shell wrapper runs the bundled `.mjs`.\n\n## Common Issues\n\n| Symptom | Likely Cause | Fix |\n|---------|--------------|-----|\n| Hook never runs | Not registered in settings.json | Add to correct event in settings |\n| Hook runs but no output | Detached spawn hiding errors | Add logging, check manually |\n| Wrong session ID | Using \"most recent\" query | Pass ID explicitly |\n| Works locally, not in CI | Missing dependencies | Check npx/node availability |\n| Runs twice | Registered in both global + project | Remove duplicate |\n\n## Debug Checklist\n\n- [ ] Outputs exist? (`ls -la .claude/cache/`)\n- [ ] Registered? (`grep -A10 '\"hooks\"' .claude/settings.json`)\n- [ ] Files exist? (`ls .claude/hooks/*.sh`)\n- [ ] Bundle current? (`ls -la .claude/hooks/dist/`)\n- [ ] Manual test works? (`echo '{}' | ./hook.sh`)\n- [ ] No silent failures? (check for `stdio: 'ignore'`)\n\n## Source Sessions\n\nDerived from 10 sessions (83% of all learnings):\n- a541f08a, 1c21e6c8, 6a9f2d7a, a8bd5cea, 2ca1a178, 657ce0b2, 3998f3a2, 2a829f12, 0b46cfd7, 862f6e2c","createdAt":"2026-09-25T11:51:52.814Z","updatedAt":"2026-09-25T11:51:52.814Z"},{"id":"cmugwhpdr01bbqu06fxaeviph","slug":"parcadei-continuous-claude-v3-complete-skill","name":"complete-skill","description":"A complete skill for E2E testing","authorId":"gh:parcadei","authorName":"parcadei","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":3942,"pricePerCall":0,"manifest":{"name":"complete-skill","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"A complete skill for E2E testing","permissions":["shell"],"systemPrompt":"# complete-skill\n\n## When to Use\n\nTest the entire persistence pipeline\n\n## Instructions\n\n1. Do this\n2. Then that","schemaVersion":1},"repoUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/complete-skill","tags":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Continuous-Claude-v3","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:51:52.595Z","lockfiles":[]},"forks":303,"owner":"parcadei","stars":3942,"topics":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp"],"license":"MIT","fullName":"parcadei/Continuous-Claude-v3","homepage":null,"language":"Python","pushedAt":"2026-01-26T15:27:49Z","avatarUrl":"https://avatars.githubusercontent.com/u/227596144?v=4","crawledAt":"2026-09-25T11:51:43.697Z","openIssues":46,"manifestFile":"SKILL.md","manifestPath":".claude/skills/complete-skill/SKILL.md","defaultBranch":"main"},"readme":"# complete-skill\n\n## When to Use\n\nTest the entire persistence pipeline\n\n## Instructions\n\n1. Do this\n2. Then that","createdAt":"2026-09-25T11:51:52.767Z","updatedAt":"2026-09-25T11:51:52.767Z"},{"id":"cmugwhpdy01bequ060qsa03nr","slug":"parcadei-continuous-claude-v3-completion-check","name":"completion-check","description":"Completion Check: Verify Infrastructure Is Wired","authorId":"gh:parcadei","authorName":"parcadei","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":3942,"pricePerCall":0,"manifest":{"name":"completion-check","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Completion Check: Verify Infrastructure Is Wired","permissions":[],"systemPrompt":"# Completion Check: Verify Infrastructure Is Wired\n\nWhen building infrastructure, verify it's actually connected to the system before marking as complete.\n\n## Pattern\n\nInfrastructure is not done when the code is written - it's done when it's wired into the system and actively used. Dead code (built but never called) is wasted effort.\n\n## DO\n\n1. **Trace the execution path** - Follow from user intent to actual code execution:\n   ```bash\n   # Example: Verify Task tool spawns correctly\n   grep -r \"claude -p\" src/\n   grep -r \"Task(\" src/\n   ```\n\n2. **Check hooks are registered**, not just implemented:\n   ```bash\n   # Hook exists?\n   ls -la .claude/hooks/my-hook.sh\n\n   # Hook registered in settings?\n   grep \"my-hook\" .claude/settings.json\n   ```\n\n3. **Verify database connections** - Ensure infrastructure uses the right backend:\n   ```bash\n   # Check connection strings\n   grep -r \"postgresql://\" src/\n   grep -r \"sqlite:\" src/  # Should NOT find if PostgreSQL expected\n   ```\n\n4. **Test end-to-end** - Run the feature and verify infrastructure is invoked:\n   ```bash\n   # Add debug logging\n   echo \"DEBUG: DAG spawn invoked\" >> /tmp/debug.log\n\n   # Trigger feature\n   uv run python -m my_feature\n\n   # Verify infrastructure was called\n   cat /tmp/debug.log\n   ```\n\n5. **Search for orphaned implementations**:\n   ```bash\n   # Find functions defined but never called\n   ast-grep --pattern 'async function $NAME() { $$$ }' | \\\n     xargs -I {} grep -r \"{}\" src/\n   ```\n\n## DON'T\n\n- Mark infrastructure \"complete\" without testing execution path\n- Assume code is wired just because it exists\n- Build parallel systems (Task tool vs claude -p spawn)\n- Use wrong backends (SQLite when PostgreSQL is architected)\n- Skip end-to-end testing (\"it compiles\" ≠ \"it runs\")\n\n## Completion Checklist\n\nBefore declaring infrastructure complete:\n\n- [ ] Traced execution path from entry point to infrastructure\n- [ ] Verified hooks are registered in .claude/settings.json\n- [ ] Confirmed correct database/backend in use\n- [ ] Ran end-to-end test showing infrastructure invoked\n- [ ] Searched for dead code or parallel implementations\n- [ ] Checked configuration files match implementation\n\n## Example: DAG Task Graph\n\n**Wrong approach:**\n```\n✓ Built BeadsTaskGraph class\n✓ Implemented DAG dependencies\n✓ Added spawn logic\n✗ Never wired - Task tool still runs instead\n✗ Used SQLite instead of PostgreSQL\n```\n\n**Right approach:**\n```\n✓ Built BeadsTaskGraph class\n✓ Wired into Task tool execution path\n✓ Verified claude -p spawn is called\n✓ Confirmed PostgreSQL backend in use\n✓ Tested: user calls Task() → DAG spawns → beads execute\n✓ No parallel implementations found\n```\n\n## Source Sessions\n\n- This session: Architecture gap discovery - DAG built but not wired, Task tool runs instead of spawn, SQLite used instead of PostgreSQL","schemaVersion":1},"repoUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/completion-check","tags":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Continuous-Claude-v3","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:51:52.595Z","lockfiles":[]},"forks":303,"owner":"parcadei","stars":3942,"topics":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp"],"license":"MIT","fullName":"parcadei/Continuous-Claude-v3","homepage":null,"language":"Python","pushedAt":"2026-01-26T15:27:49Z","avatarUrl":"https://avatars.githubusercontent.com/u/227596144?v=4","crawledAt":"2026-09-25T11:51:43.697Z","openIssues":46,"manifestFile":"SKILL.md","manifestPath":".claude/skills/completion-check/SKILL.md","defaultBranch":"main"},"readme":"# Completion Check: Verify Infrastructure Is Wired\n\nWhen building infrastructure, verify it's actually connected to the system before marking as complete.\n\n## Pattern\n\nInfrastructure is not done when the code is written - it's done when it's wired into the system and actively used. Dead code (built but never called) is wasted effort.\n\n## DO\n\n1. **Trace the execution path** - Follow from user intent to actual code execution:\n   ```bash\n   # Example: Verify Task tool spawns correctly\n   grep -r \"claude -p\" src/\n   grep -r \"Task(\" src/\n   ```\n\n2. **Check hooks are registered**, not just implemented:\n   ```bash\n   # Hook exists?\n   ls -la .claude/hooks/my-hook.sh\n\n   # Hook registered in settings?\n   grep \"my-hook\" .claude/settings.json\n   ```\n\n3. **Verify database connections** - Ensure infrastructure uses the right backend:\n   ```bash\n   # Check connection strings\n   grep -r \"postgresql://\" src/\n   grep -r \"sqlite:\" src/  # Should NOT find if PostgreSQL expected\n   ```\n\n4. **Test end-to-end** - Run the feature and verify infrastructure is invoked:\n   ```bash\n   # Add debug logging\n   echo \"DEBUG: DAG spawn invoked\" >> /tmp/debug.log\n\n   # Trigger feature\n   uv run python -m my_feature\n\n   # Verify infrastructure was called\n   cat /tmp/debug.log\n   ```\n\n5. **Search for orphaned implementations**:\n   ```bash\n   # Find functions defined but never called\n   ast-grep --pattern 'async function $NAME() { $$$ }' | \\\n     xargs -I {} grep -r \"{}\" src/\n   ```\n\n## DON'T\n\n- Mark infrastructure \"complete\" without testing execution path\n- Assume code is wired just because it exists\n- Build parallel systems (Task tool vs claude -p spawn)\n- Use wrong backends (SQLite when PostgreSQL is architected)\n- Skip end-to-end testing (\"it compiles\" ≠ \"it runs\")\n\n## Completion Checklist\n\nBefore declaring infrastructure complete:\n\n- [ ] Traced execution path from entry point to infrastructure\n- [ ] Verified hooks are registered in .claude/settings.json\n- [ ] Confirmed correct database/backend in use\n- [ ] Ran end-to-end test showing infrastructure invoked\n- [ ] Searched for dead code or parallel implementations\n- [ ] Checked configuration files match implementation\n\n## Example: DAG Task Graph\n\n**Wrong approach:**\n```\n✓ Built BeadsTaskGraph class\n✓ Implemented DAG dependencies\n✓ Added spawn logic\n✗ Never wired - Task tool still runs instead\n✗ Used SQLite instead of PostgreSQL\n```\n\n**Right approach:**\n```\n✓ Built BeadsTaskGraph class\n✓ Wired into Task tool execution path\n✓ Verified claude -p spawn is called\n✓ Confirmed PostgreSQL backend in use\n✓ Tested: user calls Task() → DAG spawns → beads execute\n✓ No parallel implementations found\n```\n\n## Source Sessions\n\n- This session: Architecture gap discovery - DAG built but not wired, Task tool runs instead of spawn, SQLite used instead of PostgreSQL","createdAt":"2026-09-25T11:51:52.774Z","updatedAt":"2026-09-25T11:51:52.774Z"},{"id":"cmugwhpe401bhqu061tp9knjs","slug":"parcadei-continuous-claude-v3-compound-learnings","name":"compound-learnings","description":"Transform session learnings into permanent capabilities (skills, rules, agents). Use when asked to \"improve setup\", \"learn from sessions\", \"compound learnings\", or \"what patterns should become skills\".","authorId":"gh:parcadei","authorName":"parcadei","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":3942,"pricePerCall":0,"manifest":{"name":"compound-learnings","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Transform session learnings into permanent capabilities (skills, rules, agents). Use when asked to \"improve setup\", \"learn from sessions\", \"compound learnings\", or \"what patterns should become skills\".","permissions":["shell"],"systemPrompt":"# Compound Learnings\n\nTransform ephemeral session learnings into permanent, compounding capabilities.\n\n## When to Use\n\n- \"What should I learn from recent sessions?\"\n- \"Improve my setup based on recent work\"\n- \"Turn learnings into skills/rules\"\n- \"What patterns should become permanent?\"\n- \"Compound my learnings\"\n\n## Process\n\n### Step 1: Gather Learnings\n\n```bash\n# List learnings (most recent first)\nls -t $CLAUDE_PROJECT_DIR/.claude/cache/learnings/*.md | head -20\n\n# Count total\nls $CLAUDE_PROJECT_DIR/.claude/cache/learnings/*.md | wc -l\n```\n\nRead the most recent 5-10 files (or specify a date range).\n\n### Step 2: Extract Patterns (Structured)\n\nFor each learnings file, extract entries from these specific sections:\n\n| Section Header | What to Extract |\n|----------------|-----------------|\n| `## Patterns` or `Reusable techniques` | Direct candidates for rules |\n| `**Takeaway:**` or `**Actionable takeaway:**` | Decision heuristics |\n| `## What Worked` | Success patterns |\n| `## What Failed` | Anti-patterns (invert to rules) |\n| `## Key Decisions` | Design principles |\n\nBuild a frequency table as you go:\n\n```markdown\n| Pattern | Sessions | Category |\n|---------|----------|----------|\n| \"Check artifacts before editing\" | abc, def, ghi | debugging |\n| \"Pass IDs explicitly\" | abc, def, ghi, jkl | reliability |\n```\n\n### Step 2b: Consolidate Similar Patterns\n\nBefore counting, merge patterns that express the same principle:\n\n**Example consolidation:**\n- \"Artifact-first debugging\"\n- \"Verify hook output by inspecting files\"\n- \"Filesystem-first debugging\"\n→ All express: **\"Observe outputs before editing code\"**\n\nUse the most general formulation. Update the frequency table.\n\n### Step 3: Detect Meta-Patterns\n\n**Critical step:** Look at what the learnings cluster around.\n\nIf >50% of patterns relate to one topic (e.g., \"hooks\", \"tracing\", \"async\"):\n→ That topic may need a **dedicated skill** rather than multiple rules\n→ One skill compounds better than five rules\n\nAsk yourself: *\"Is there a skill that would make all these rules unnecessary?\"*\n\n### Step 4: Categorize (Decision Tree)\n\nFor each pattern, determine artifact type:\n\n```\nIs it a sequence of commands/steps?\n  → YES → SKILL (executable > declarative)\n  → NO ↓\n\nShould it run automatically on an event (SessionEnd, PostToolUse, etc.)?\n  → YES → HOOK (automatic > manual)\n  → NO ↓\n\nIs it \"when X, do Y\" or \"never do X\"?\n  → YES → RULE\n  → NO ↓\n\nDoes it enhance an existing agent workflow?\n  → YES → AGENT UPDATE\n  → NO → Skip (not worth capturing)\n```\n\n**Artifact Type Examples:**\n\n| Pattern | Type | Why |\n|---------|------|-----|\n| \"Run linting before commit\" | Hook (PreToolUse) | Automatic gate |\n| \"Extract learnings on session end\" | Hook (SessionEnd) | Automatic trigger |\n| \"Debug hooks step by step\" | Skill | Manual sequence |\n| \"Always pass IDs explicitly\" | Rule | Heuristic |\n\n### Step 5: Apply Signal Thresholds\n\n| Occurrences | Action |\n|-------------|--------|\n| 1 | Note but skip (unless critical failure) |\n| 2 | Consider - present to user |\n| 3+ | Strong signal - recommend creation |\n| 4+ | Definitely create |\n\n### Step 6: Propose Artifacts\n\nPresent each proposal in this format:\n\n```markdown\n---\n\n## Pattern: [Generalized Name]\n\n**Signal:** [N] sessions ([list session IDs])\n\n**Category:** [debugging / reliability / workflow / etc.]\n\n**Artifact Type:** Rule / Skill / Agent Update\n\n**Rationale:** [Why this artifact type, why worth creating]\n\n**Draft Content:**\n\\`\\`\\`markdown\n[Actual content that would be written to file]\n\\`\\`\\`\n\n**File:** `.claude/rules/[name].md` or `.claude/skills/[name]/SKILL.md`\n\n---\n```\n\nUse `AskUserQuestion` to get approval for each artifact (or batch approval).\n\n### Step 7: Create Approved Artifacts\n\n#### For Rules:\n```bash\n# Write to rules directory\ncat > $CLAUDE_PROJECT_DIR/.claude/rules/<name>.md << 'EOF'\n# Rule Name\n\n[Context: why this rule exists, based on N sessions]\n\n## Pattern\n[The reusable principle]\n\n## DO\n- [Concrete action]\n\n## DON'T\n- [Anti-pattern]\n\n## Source Sessions\n- [session-id-1]: [what happened]\n- [session-id-2]: [what happened]\nEOF\n```\n\n#### For Skills:\nCreate `.claude/skills/<name>/SKILL.md` with:\n- Frontmatter (name, description, allowed-tools)\n- When to Use\n- Step-by-step instructions (executable)\n- Examples from the learnings\n\nAdd triggers to `skill-rules.json` if appropriate.\n\n#### For Hooks:\nCreate shell wrapper + TypeScript handler:\n\n```bash\n# Shell wrapper\ncat > $CLAUDE_PROJECT_DIR/.claude/hooks/<name>.sh << 'EOF'\n#!/bin/bash\nset -e\ncd \"$CLAUDE_PROJECT_DIR/.claude/hooks\"\ncat | node dist/<name>.mjs\nEOF\nchmod +x $CLAUDE_PROJECT_DIR/.claude/hooks/<name>.sh\n```\n\nThen create `src/<name>.ts`, build with esbuild, and register in `settings.json`:\n\n```json\n{\n  \"hooks\": {\n    \"EventName\": [{\n      \"hooks\": [{\n        \"type\": \"command\",\n        \"command\": \"$CLAUDE_PROJECT_DIR/.claude/hooks/<name>.sh\"\n      }]\n    }]\n  }\n}\n```\n\n#### For Agent Updates:\nEdit existing agent in `.claude/agents/<name>.md` to add the learned capability.\n\n### Step 8: Summary Report\n\n```markdown\n## Compounding Complete\n\n**Learnings Analyzed:** [N] sessions\n**Patterns Found:** [M]\n**Artifacts Created:** [K]\n\n### Created:\n- Rule: `explicit-identity.md` - Pass IDs explicitly across boundaries\n- Skill: `debug-hooks` - Hook debugging workflow\n\n### Skipped (insufficient signal):\n- \"Pattern X\" (1 occurrence)\n\n**Your setup is now permanently improved.**\n```\n\n## Quality Checks\n\nBefore creating any artifact:\n\n1. **Is it general enough?** Would it apply in other projects?\n2. **Is it specific enough?** Does it give concrete guidance?\n3. **Does it already exist?** Check `.claude/rules/` and `.claude/skills/` first\n4. **Is it the right type?** Sequences → skills, heuristics → rules\n\n## Files Reference\n\n- Learnings: `.claude/cache/learnings/*.md`\n- Skills: `.claude/skills/<name>/SKILL.md`\n- Rules: `.claude/rules/<name>.md`\n- Hooks: `.claude/hooks/<name>.sh` + `src/<name>.ts` + `dist/<name>.mjs`\n- Agents: `.claude/agents/<name>.md`\n- Skill triggers: `.claude/skills/skill-rules.json`\n- Hook registration: `.claude/settings.json` → `hooks` section","schemaVersion":1},"repoUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/compound-learnings","tags":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Continuous-Claude-v3","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:51:52.595Z","lockfiles":[]},"forks":303,"owner":"parcadei","stars":3942,"topics":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp"],"license":"MIT","fullName":"parcadei/Continuous-Claude-v3","homepage":null,"language":"Python","pushedAt":"2026-01-26T15:27:49Z","avatarUrl":"https://avatars.githubusercontent.com/u/227596144?v=4","crawledAt":"2026-09-25T11:51:43.697Z","openIssues":46,"manifestFile":"SKILL.md","manifestPath":".claude/skills/compound-learnings/SKILL.md","defaultBranch":"main"},"readme":"# Compound Learnings\n\nTransform ephemeral session learnings into permanent, compounding capabilities.\n\n## When to Use\n\n- \"What should I learn from recent sessions?\"\n- \"Improve my setup based on recent work\"\n- \"Turn learnings into skills/rules\"\n- \"What patterns should become permanent?\"\n- \"Compound my learnings\"\n\n## Process\n\n### Step 1: Gather Learnings\n\n```bash\n# List learnings (most recent first)\nls -t $CLAUDE_PROJECT_DIR/.claude/cache/learnings/*.md | head -20\n\n# Count total\nls $CLAUDE_PROJECT_DIR/.claude/cache/learnings/*.md | wc -l\n```\n\nRead the most recent 5-10 files (or specify a date range).\n\n### Step 2: Extract Patterns (Structured)\n\nFor each learnings file, extract entries from these specific sections:\n\n| Section Header | What to Extract |\n|----------------|-----------------|\n| `## Patterns` or `Reusable techniques` | Direct candidates for rules |\n| `**Takeaway:**` or `**Actionable takeaway:**` | Decision heuristics |\n| `## What Worked` | Success patterns |\n| `## What Failed` | Anti-patterns (invert to rules) |\n| `## Key Decisions` | Design principles |\n\nBuild a frequency table as you go:\n\n```markdown\n| Pattern | Sessions | Category |\n|---------|----------|----------|\n| \"Check artifacts before editing\" | abc, def, ghi | debugging |\n| \"Pass IDs explicitly\" | abc, def, ghi, jkl | reliability |\n```\n\n### Step 2b: Consolidate Similar Patterns\n\nBefore counting, merge patterns that express the same principle:\n\n**Example consolidation:**\n- \"Artifact-first debugging\"\n- \"Verify hook output by inspecting files\"\n- \"Filesystem-first debugging\"\n→ All express: **\"Observe outputs before editing code\"**\n\nUse the most general formulation. Update the frequency table.\n\n### Step 3: Detect Meta-Patterns\n\n**Critical step:** Look at what the learnings cluster around.\n\nIf >50% of patterns relate to one topic (e.g., \"hooks\", \"tracing\", \"async\"):\n→ That topic may need a **dedicated skill** rather than multiple rules\n→ One skill compounds better than five rules\n\nAsk yourself: *\"Is there a skill that would make all these rules unnecessary?\"*\n\n### Step 4: Categorize (Decision Tree)\n\nFor each pattern, determine artifact type:\n\n```\nIs it a sequence of commands/steps?\n  → YES → SKILL (executable > declarative)\n  → NO ↓\n\nShould it run automatically on an event (SessionEnd, PostToolUse, etc.)?\n  → YES → HOOK (automatic > manual)\n  → NO ↓\n\nIs it \"when X, do Y\" or \"never do X\"?\n  → YES → RULE\n  → NO ↓\n\nDoes it enhance an existing agent workflow?\n  → YES → AGENT UPDATE\n  → NO → Skip (not worth capturing)\n```\n\n**Artifact Type Examples:**\n\n| Pattern | Type | Why |\n|---------|------|-----|\n| \"Run linting before commit\" | Hook (PreToolUse) | Automatic gate |\n| \"Extract learnings on session end\" | Hook (SessionEnd) | Automatic trigger |\n| \"Debug hooks step by step\" | Skill | Manual sequence |\n| \"Always pass IDs explicitly\" | Rule | Heuristic |\n\n### Step 5: Apply Signal Thresholds\n\n| Occurrences | Action |\n|-------------|--------|\n| 1 | Note but skip (unless critical failure) |\n| 2 | Consider - present to user |\n| 3+ | Strong signal - recommend creation |\n| 4+ | Definitely create |\n\n### Step 6: Propose Artifacts\n\nPresent each proposal in this format:\n\n```markdown\n---\n\n## Pattern: [Generalized Name]\n\n**Signal:** [N] sessions ([list session IDs])\n\n**Category:** [debugging / reliability / workflow / etc.]\n\n**Artifact Type:** Rule / Skill / Agent Update\n\n**Rationale:** [Why this artifact type, why worth creating]\n\n**Draft Content:**\n\\`\\`\\`markdown\n[Actual content that would be written to file]\n\\`\\`\\`\n\n**File:** `.claude/rules/[name].md` or `.claude/skills/[name]/SKILL.md`\n\n---\n```\n\nUse `AskUserQuestion` to get approval for each artifact (or batch approval).\n\n### Step 7: Create Approved Artifacts\n\n#### For Rules:\n```bash\n# Write to rules directory\ncat > $CLAUDE_PROJECT_DIR/.claude/rules/<name>.md << 'EOF'\n# Rule Name\n\n[Context: why this rule exists, based on N sessions]\n\n## Pattern\n[The reusable principle]\n\n## DO\n- [Concrete action]\n\n## DON'T\n- [Anti-pattern]\n\n## So","createdAt":"2026-09-25T11:51:52.781Z","updatedAt":"2026-09-25T11:51:52.781Z"},{"id":"cmugwhpee01bkqu06gm3kiuw5","slug":"parcadei-continuous-claude-v3-continuity-ledger","name":"continuity-ledger","description":"Create or update continuity ledger for state preservation across clears","authorId":"gh:parcadei","authorName":"parcadei","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":3942,"pricePerCall":0,"manifest":{"name":"continuity-ledger","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Create or update continuity ledger for state preservation across clears","permissions":[],"systemPrompt":"# Continuity Ledger\n\n> **Note:** This skill is now an alias for `/create_handoff`. Both output the same YAML format.\n\nCreate a YAML handoff document for state preservation across `/clear`. This is the same as `/create_handoff`.\n\n## Process\n\n### 1. Filepath & Metadata\n\n**First, determine the session name from existing handoffs:**\n```bash\nls -td thoughts/shared/handoffs/*/ 2>/dev/null | head -1 | xargs basename\n```\n\nThis returns the most recently modified handoff folder name (e.g., `open-source-release`). Use this as the handoff folder name.\n\nIf no handoffs exist, use `general` as the folder name.\n\n**Create your file under:** `thoughts/shared/handoffs/{session-name}/YYYY-MM-DD_HH-MM_description.yaml`, where:\n- `{session-name}` is from existing handoffs (e.g., `open-source-release`) or `general` if none exist\n- `YYYY-MM-DD` is today's date\n- `HH-MM` is the current time in 24-hour format (no seconds needed)\n- `description` is a brief kebab-case description\n\n**Examples:**\n- `thoughts/shared/handoffs/open-source-release/2026-01-08_16-30_memory-system-fix.yaml`\n- `thoughts/shared/handoffs/general/2026-01-08_16-30_bug-investigation.yaml`\n\n### 2. Write YAML handoff (~400 tokens)\n\n**CRITICAL: Use EXACTLY this YAML format. Do NOT deviate or use alternative field names.**\n\nThe `goal:` and `now:` fields are shown in the statusline - they MUST be named exactly this.\n\n```yaml\n---\nsession: {session-name from ledger}\ndate: YYYY-MM-DD\nstatus: complete|partial|blocked\noutcome: SUCCEEDED|PARTIAL_PLUS|PARTIAL_MINUS|FAILED\n---\n\ngoal: {What this session accomplished - shown in statusline}\nnow: {What next session should do first - shown in statusline}\ntest: {Command to verify this work, e.g., pytest tests/test_foo.py}\n\ndone_this_session:\n  - task: {First completed task}\n    files: [{file1.py}, {file2.py}]\n  - task: {Second completed task}\n    files: [{file3.py}]\n\nblockers: [{any blocking issues}]\n\nquestions: [{unresolved questions for next session}]\n\ndecisions:\n  - {decision_name}: {rationale}\n\nfindings:\n  - {key_finding}: {details}\n\nworked: [{approaches that worked}]\nfailed: [{approaches that failed and why}]\n\nnext:\n  - {First next step}\n  - {Second next step}\n\nfiles:\n  created: [{new files}]\n  modified: [{changed files}]\n```\n\n**Field guide:**\n- `goal:` + `now:` - REQUIRED, shown in statusline\n- `done_this_session:` - What was accomplished with file references\n- `decisions:` - Important choices and rationale\n- `findings:` - Key learnings\n- `worked:` / `failed:` - What to repeat vs avoid\n- `next:` - Action items for next session\n\n**DO NOT use alternative field names like `session_goal`, `objective`, `focus`, `current`, etc.**\n**The statusline parser looks for EXACTLY `goal:` and `now:` - nothing else works.**\n\n### 3. Mark Session Outcome (REQUIRED)\n\n**IMPORTANT:** Before responding to the user, you MUST ask about the session outcome.\n\nUse the AskUserQuestion tool with these exact options:\n\n```\nQuestion: \"How did this session go?\"\nOptions:\n  - SUCCEEDED: Task completed successfully\n  - PARTIAL_PLUS: Mostly done, minor issues remain\n  - PARTIAL_MINUS: Some progress, major issues remain\n  - FAILED: Task abandoned or blocked\n```\n\nAfter the user responds, mark the outcome:\n```bash\n# Mark the most recent handoff (works with PostgreSQL or SQLite)\nPROJECT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo \"${CLAUDE_PROJECT_DIR:-.}\")\ncd \"$PROJECT_ROOT/opc\" && uv run python scripts/core/artifact_mark.py --latest --outcome <USER_CHOICE>\n```\n\n### 4. Confirm completion\n\nAfter marking the outcome, respond to the user:\n\n```\nHandoff created! Outcome marked as [OUTCOME].\n\nResume in a new session with:\n/resume_handoff path/to/handoff.yaml\n```\n\n## When to Use\n\n- Before running `/clear`\n- Context usage approaching 70%+\n- Multi-day implementations\n- Complex refactors you pick up/put down\n- Any session expected to hit 85%+ context\n\n## When NOT to Use\n\n- Quick tasks (< 30 min)\n- Simple bug fixes\n- Single-file changes\n\n## Why Clear Instead of Compact?\n\nEach compaction is lossy compression—after several compactions, you're working with degraded context. Clearing + loading the handoff gives you fresh context with full signal.","schemaVersion":1},"repoUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/continuity_ledger","tags":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Continuous-Claude-v3","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:51:52.595Z","lockfiles":[]},"forks":303,"owner":"parcadei","stars":3942,"topics":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp"],"license":"MIT","fullName":"parcadei/Continuous-Claude-v3","homepage":null,"language":"Python","pushedAt":"2026-01-26T15:27:49Z","avatarUrl":"https://avatars.githubusercontent.com/u/227596144?v=4","crawledAt":"2026-09-25T11:51:43.697Z","openIssues":46,"manifestFile":"SKILL.md","manifestPath":".claude/skills/continuity_ledger/SKILL.md","defaultBranch":"main"},"readme":"# Continuity Ledger\n\n> **Note:** This skill is now an alias for `/create_handoff`. Both output the same YAML format.\n\nCreate a YAML handoff document for state preservation across `/clear`. This is the same as `/create_handoff`.\n\n## Process\n\n### 1. Filepath & Metadata\n\n**First, determine the session name from existing handoffs:**\n```bash\nls -td thoughts/shared/handoffs/*/ 2>/dev/null | head -1 | xargs basename\n```\n\nThis returns the most recently modified handoff folder name (e.g., `open-source-release`). Use this as the handoff folder name.\n\nIf no handoffs exist, use `general` as the folder name.\n\n**Create your file under:** `thoughts/shared/handoffs/{session-name}/YYYY-MM-DD_HH-MM_description.yaml`, where:\n- `{session-name}` is from existing handoffs (e.g., `open-source-release`) or `general` if none exist\n- `YYYY-MM-DD` is today's date\n- `HH-MM` is the current time in 24-hour format (no seconds needed)\n- `description` is a brief kebab-case description\n\n**Examples:**\n- `thoughts/shared/handoffs/open-source-release/2026-01-08_16-30_memory-system-fix.yaml`\n- `thoughts/shared/handoffs/general/2026-01-08_16-30_bug-investigation.yaml`\n\n### 2. Write YAML handoff (~400 tokens)\n\n**CRITICAL: Use EXACTLY this YAML format. Do NOT deviate or use alternative field names.**\n\nThe `goal:` and `now:` fields are shown in the statusline - they MUST be named exactly this.\n\n```yaml\n---\nsession: {session-name from ledger}\ndate: YYYY-MM-DD\nstatus: complete|partial|blocked\noutcome: SUCCEEDED|PARTIAL_PLUS|PARTIAL_MINUS|FAILED\n---\n\ngoal: {What this session accomplished - shown in statusline}\nnow: {What next session should do first - shown in statusline}\ntest: {Command to verify this work, e.g., pytest tests/test_foo.py}\n\ndone_this_session:\n  - task: {First completed task}\n    files: [{file1.py}, {file2.py}]\n  - task: {Second completed task}\n    files: [{file3.py}]\n\nblockers: [{any blocking issues}]\n\nquestions: [{unresolved questions for next session}]\n\ndecisions:\n  - {decision_name}: {rationale}\n\nfindings:\n  - {key_finding}: {details}\n\nworked: [{approaches that worked}]\nfailed: [{approaches that failed and why}]\n\nnext:\n  - {First next step}\n  - {Second next step}\n\nfiles:\n  created: [{new files}]\n  modified: [{changed files}]\n```\n\n**Field guide:**\n- `goal:` + `now:` - REQUIRED, shown in statusline\n- `done_this_session:` - What was accomplished with file references\n- `decisions:` - Important choices and rationale\n- `findings:` - Key learnings\n- `worked:` / `failed:` - What to repeat vs avoid\n- `next:` - Action items for next session\n\n**DO NOT use alternative field names like `session_goal`, `objective`, `focus`, `current`, etc.**\n**The statusline parser looks for EXACTLY `goal:` and `now:` - nothing else works.**\n\n### 3. Mark Session Outcome (REQUIRED)\n\n**IMPORTANT:** Before responding to the user, you MUST ask about the session outcome.\n\nUse the AskUserQuestion tool with these exact options:\n\n```\nQuestion: \"How did this session go?\"\nOptions:\n  - SUCCEEDED: Task completed successfully\n  - PARTIAL_PLUS: Mostly done, minor issues remain\n  - PARTIAL_MINUS: Some progress, major issues remain\n  - FAILED: Task abandoned or blocked\n```\n\nAfter the user responds, mark the outcome:\n```bash\n# Mark the most recent handoff (works with PostgreSQL or SQLite)\nPROJECT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo \"${CLAUDE_PROJECT_DIR:-.}\")\ncd \"$PROJECT_ROOT/opc\" && uv run python scripts/core/artifact_mark.py --latest --outcome <USER_CHOICE>\n```\n\n### 4. Confirm completion\n\nAfter marking the outcome, respond to the user:\n\n```\nHandoff created! Outcome marked as [OUTCOME].\n\nResume in a new session with:\n/resume_handoff path/to/handoff.yaml\n```\n\n## When to Use\n\n- Before running `/clear`\n- Context usage approaching 70%+\n- Multi-day implementations\n- Complex refactors you pick up/put down\n- Any session expected to hit 85%+ context\n\n## When NOT to Use\n\n- Quick tasks (< 30 min)\n- Simple bug fixes\n- Single-file changes\n\n## Why Clear Instead of Compact?\n\nEach compaction","createdAt":"2026-09-25T11:51:52.791Z","updatedAt":"2026-09-25T11:51:52.791Z"},{"id":"cmugwhpem01bnqu06joqi3vbd","slug":"parcadei-continuous-claude-v3-create-handoff","name":"create-handoff","description":"Create handoff document for transferring work to another session","authorId":"gh:parcadei","authorName":"parcadei","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":3942,"pricePerCall":0,"manifest":{"name":"create-handoff","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Create handoff document for transferring work to another session","permissions":[],"systemPrompt":"# Create Handoff\n\nYou are tasked with writing a handoff document to hand off your work to another agent in a new session. You will create a handoff document that is thorough, but also **concise**. The goal is to compact and summarize your context without losing any of the key details of what you're working on.\n\n\n## Process\n### 1. Filepath & Metadata\nUse the following information to understand how to create your document:\n\n**First, determine the session name from existing handoffs:**\n```bash\nls -td thoughts/shared/handoffs/*/ 2>/dev/null | head -1 | xargs basename\n```\n\nThis returns the most recently modified handoff folder name (e.g., `open-source-release`). Use this as the handoff folder name.\n\nIf no handoffs exist, use `general` as the folder name.\n\n**Create your file under:** `thoughts/shared/handoffs/{session-name}/YYYY-MM-DD_HH-MM_description.yaml`, where:\n- `{session-name}` is from existing handoffs (e.g., `open-source-release`) or `general` if none exist\n- `YYYY-MM-DD` is today's date\n- `HH-MM` is the current time in 24-hour format (no seconds needed)\n- `description` is a brief kebab-case description\n\n**Examples:**\n- `thoughts/shared/handoffs/open-source-release/2026-01-08_16-30_memory-system-fix.yaml`\n- `thoughts/shared/handoffs/general/2026-01-08_16-30_bug-investigation.yaml`\n\n### 2. Write YAML handoff (~400 tokens vs ~2000 for markdown)\n\n**CRITICAL: Use EXACTLY this YAML format. Do NOT deviate or use alternative field names.**\n\nThe `goal:` and `now:` fields are shown in the statusline - they MUST be named exactly this.\n\n```yaml\n---\nsession: {session-name from ledger}\ndate: YYYY-MM-DD\nstatus: complete|partial|blocked\noutcome: SUCCEEDED|PARTIAL_PLUS|PARTIAL_MINUS|FAILED\n---\n\ngoal: {What this session accomplished - shown in statusline}\nnow: {What next session should do first - shown in statusline}\ntest: {Command to verify this work, e.g., pytest tests/test_foo.py}\n\ndone_this_session:\n  - task: {First completed task}\n    files: [{file1.py}, {file2.py}]\n  - task: {Second completed task}\n    files: [{file3.py}]\n\nblockers: [{any blocking issues}]\n\nquestions: [{unresolved questions for next session}]\n\ndecisions:\n  - {decision_name}: {rationale}\n\nfindings:\n  - {key_finding}: {details}\n\nworked: [{approaches that worked}]\nfailed: [{approaches that failed and why}]\n\nnext:\n  - {First next step}\n  - {Second next step}\n\nfiles:\n  created: [{new files}]\n  modified: [{changed files}]\n```\n\n**Field guide:**\n- `goal:` + `now:` - REQUIRED, shown in statusline\n- `done_this_session:` - What was accomplished with file references\n- `decisions:` - Important choices and rationale\n- `findings:` - Key learnings\n- `worked:` / `failed:` - What to repeat vs avoid\n- `next:` - Action items for next session\n\n**DO NOT use alternative field names like `session_goal`, `objective`, `focus`, `current`, etc.**\n**The statusline parser looks for EXACTLY `goal:` and `now:` - nothing else works.**\n---\n\n### 3. Mark Session Outcome (REQUIRED)\n\n**IMPORTANT:** Before responding to the user, you MUST ask about the session outcome.\n\nUse the AskUserQuestion tool with these exact options:\n\n```\nQuestion: \"How did this session go?\"\nOptions:\n  - SUCCEEDED: Task completed successfully\n  - PARTIAL_PLUS: Mostly done, minor issues remain\n  - PARTIAL_MINUS: Some progress, major issues remain\n  - FAILED: Task abandoned or blocked\n```\n\nAfter the user responds, index and mark the outcome:\n```bash\n# Mark the most recent handoff (works with PostgreSQL or SQLite)\n# Use git root to find project, then opc/scripts/core/\nPROJECT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo \"${CLAUDE_PROJECT_DIR:-.}\")\n\n# First, index the handoff into the database\ncd \"$PROJECT_ROOT/opc\" && uv run python scripts/core/artifact_index.py --file thoughts/shared/handoffs/{session_name}/{filename}.yaml\n\n# Then mark the outcome\ncd \"$PROJECT_ROOT/opc\" && uv run python scripts/core/artifact_mark.py --latest --outcome <USER_CHOICE>\n```\n\n**IMPORTANT:** Replace `{session_name}` and `{filename}` with the actual values from step 1.\n\nThese commands auto-detect the database (PostgreSQL if configured, SQLite fallback).\n\n**Note:** If indexing fails, the marking step will show \"Database marking was not available\" - this is acceptable for the first handoff but indicates the indexing step was skipped.\n\n### 4. Confirm completion\n\nAfter marking the outcome, respond to the user:\n\n```\nHandoff created! Outcome marked as [OUTCOME].\n\nResume in a new session with:\n/resume_handoff path/to/handoff.yaml\n```\n\n---\n##.  Additional Notes & Instructions\n- **more information, not less**. This is a guideline that defines the minimum of what a handoff should be. Always feel free to include more information if necessary.\n- **be thorough and precise**. include both top-level objectives, and lower-level details as necessary.\n- **avoid excessive code snippets**. While a brief snippet to describe some key change is important, avoid large code blocks or diffs; do not include one unless it's necessary (e.g. pertains to an error you're debugging). Prefer using `/path/to/file.ext:line` references that an agent can follow later when it's ready, e.g. `packages/dashboard/src/app/dashboard/page.tsx:12-24`","schemaVersion":1},"repoUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/create_handoff","tags":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Continuous-Claude-v3","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:51:52.595Z","lockfiles":[]},"forks":303,"owner":"parcadei","stars":3942,"topics":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp"],"license":"MIT","fullName":"parcadei/Continuous-Claude-v3","homepage":null,"language":"Python","pushedAt":"2026-01-26T15:27:49Z","avatarUrl":"https://avatars.githubusercontent.com/u/227596144?v=4","crawledAt":"2026-09-25T11:51:43.697Z","openIssues":46,"manifestFile":"SKILL.md","manifestPath":".claude/skills/create_handoff/SKILL.md","defaultBranch":"main"},"readme":"# Create Handoff\n\nYou are tasked with writing a handoff document to hand off your work to another agent in a new session. You will create a handoff document that is thorough, but also **concise**. The goal is to compact and summarize your context without losing any of the key details of what you're working on.\n\n\n## Process\n### 1. Filepath & Metadata\nUse the following information to understand how to create your document:\n\n**First, determine the session name from existing handoffs:**\n```bash\nls -td thoughts/shared/handoffs/*/ 2>/dev/null | head -1 | xargs basename\n```\n\nThis returns the most recently modified handoff folder name (e.g., `open-source-release`). Use this as the handoff folder name.\n\nIf no handoffs exist, use `general` as the folder name.\n\n**Create your file under:** `thoughts/shared/handoffs/{session-name}/YYYY-MM-DD_HH-MM_description.yaml`, where:\n- `{session-name}` is from existing handoffs (e.g., `open-source-release`) or `general` if none exist\n- `YYYY-MM-DD` is today's date\n- `HH-MM` is the current time in 24-hour format (no seconds needed)\n- `description` is a brief kebab-case description\n\n**Examples:**\n- `thoughts/shared/handoffs/open-source-release/2026-01-08_16-30_memory-system-fix.yaml`\n- `thoughts/shared/handoffs/general/2026-01-08_16-30_bug-investigation.yaml`\n\n### 2. Write YAML handoff (~400 tokens vs ~2000 for markdown)\n\n**CRITICAL: Use EXACTLY this YAML format. Do NOT deviate or use alternative field names.**\n\nThe `goal:` and `now:` fields are shown in the statusline - they MUST be named exactly this.\n\n```yaml\n---\nsession: {session-name from ledger}\ndate: YYYY-MM-DD\nstatus: complete|partial|blocked\noutcome: SUCCEEDED|PARTIAL_PLUS|PARTIAL_MINUS|FAILED\n---\n\ngoal: {What this session accomplished - shown in statusline}\nnow: {What next session should do first - shown in statusline}\ntest: {Command to verify this work, e.g., pytest tests/test_foo.py}\n\ndone_this_session:\n  - task: {First completed task}\n    files: [{file1.py}, {file2.py}]\n  - task: {Second completed task}\n    files: [{file3.py}]\n\nblockers: [{any blocking issues}]\n\nquestions: [{unresolved questions for next session}]\n\ndecisions:\n  - {decision_name}: {rationale}\n\nfindings:\n  - {key_finding}: {details}\n\nworked: [{approaches that worked}]\nfailed: [{approaches that failed and why}]\n\nnext:\n  - {First next step}\n  - {Second next step}\n\nfiles:\n  created: [{new files}]\n  modified: [{changed files}]\n```\n\n**Field guide:**\n- `goal:` + `now:` - REQUIRED, shown in statusline\n- `done_this_session:` - What was accomplished with file references\n- `decisions:` - Important choices and rationale\n- `findings:` - Key learnings\n- `worked:` / `failed:` - What to repeat vs avoid\n- `next:` - Action items for next session\n\n**DO NOT use alternative field names like `session_goal`, `objective`, `focus`, `current`, etc.**\n**The statusline parser looks for EXACTLY `goal:` and `now:` - nothing else works.**\n---\n\n### 3. Mark Session Outcome (REQUIRED)\n\n**IMPORTANT:** Before responding to the user, you MUST ask about the session outcome.\n\nUse the AskUserQuestion tool with these exact options:\n\n```\nQuestion: \"How did this session go?\"\nOptions:\n  - SUCCEEDED: Task completed successfully\n  - PARTIAL_PLUS: Mostly done, minor issues remain\n  - PARTIAL_MINUS: Some progress, major issues remain\n  - FAILED: Task abandoned or blocked\n```\n\nAfter the user responds, index and mark the outcome:\n```bash\n# Mark the most recent handoff (works with PostgreSQL or SQLite)\n# Use git root to find project, then opc/scripts/core/\nPROJECT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo \"${CLAUDE_PROJECT_DIR:-.}\")\n\n# First, index the handoff into the database\ncd \"$PROJECT_ROOT/opc\" && uv run python scripts/core/artifact_index.py --file thoughts/shared/handoffs/{session_name}/{filename}.yaml\n\n# Then mark the outcome\ncd \"$PROJECT_ROOT/opc\" && uv run python scripts/core/artifact_mark.py --latest --outcome <USER_CHOICE>\n```\n\n**IMPORTANT:** Replace `{session_name}` and `{filename}` with the actu","createdAt":"2026-09-25T11:51:52.798Z","updatedAt":"2026-09-25T11:51:52.798Z"},{"id":"cmugwhpfe01bwqu06ywm5e587","slug":"parcadei-continuous-claude-v3-debug","name":"debug","description":"Debug issues by investigating logs, database state, and git history","authorId":"gh:parcadei","authorName":"parcadei","version":"0.1.0","category":"Prompt","securityLevel":"Community","downloadsCount":0,"githubStars":3942,"pricePerCall":0,"manifest":{"name":"debug","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Debug issues by investigating logs, database state, and git history","permissions":[],"systemPrompt":"# Debug\n\nYou are tasked with helping debug issues during manual testing or implementation. This command allows you to investigate problems by examining logs, database state, and git history without editing files. Think of this as a way to bootstrap a debugging session without using the primary window's context.\n\n## Initial Response\n\nWhen invoked WITH a plan/ticket file:\n```\nI'll help debug issues with [file name]. Let me understand the current state.\n\nWhat specific problem are you encountering?\n- What were you trying to test/implement?\n- What went wrong?\n- Any error messages?\n\nI'll investigate the logs, database, and git state to help figure out what's happening.\n```\n\nWhen invoked WITHOUT parameters:\n```\nI'll help debug your current issue.\n\nPlease describe what's going wrong:\n- What are you working on?\n- What specific problem occurred?\n- When did it last work?\n\nI can investigate logs, database state, and recent changes to help identify the issue.\n```\n\n## Environment Information\n\nYou have access to these key locations and tools:\n\n**Logs**:\n- Application logs (check project-specific locations)\n- Common locations: `./logs/`, `~/.local/share/{app}/`, `/var/log/`\n\n**Database** (if applicable):\n- SQLite databases can be queried with `sqlite3`\n- Check project config for database locations\n\n**Git State**:\n- Check current branch, recent commits, uncommitted changes\n- Similar to how `commit` and `describe_pr` commands work\n\n**Service Status**:\n- Check running processes: `ps aux | grep {service}`\n- Check listening ports: `lsof -i :{port}`\n\n## Process Steps\n\n### Step 1: Understand the Problem\n\nAfter the user describes the issue:\n\n1. **Read any provided context** (plan or ticket file):\n   - Understand what they're implementing/testing\n   - Note which phase or step they're on\n   - Identify expected vs actual behavior\n\n2. **Quick state check**:\n   - Current git branch and recent commits\n   - Any uncommitted changes\n   - When the issue started occurring\n\n### Step 2: Investigate the Issue\n\nSpawn parallel Task agents for efficient investigation:\n\n```\nTask 1 - Check Recent Logs:\nFind and analyze the most recent logs for errors:\n1. Find latest logs: ls -t ./logs/*.log | head -1 (or project-specific location)\n2. Search for errors, warnings, or issues around the problem timeframe\n3. Note the working directory if shown\n4. Look for stack traces or repeated errors\nReturn: Key errors/warnings with timestamps\n```\n\n```\nTask 2 - Database State (if applicable):\nCheck the current database state:\n1. Locate database file (check project config)\n2. Connect: sqlite3 {database_path}\n3. Check schema: .tables and .schema for relevant tables\n4. Query recent data based on the issue\n5. Look for stuck states or anomalies\nReturn: Relevant database findings\n```\n\n```\nTask 3 - Git and File State:\nUnderstand what changed recently:\n1. Check git status and current branch\n2. Look at recent commits: git log --oneline -10\n3. Check uncommitted changes: git diff\n4. Verify expected files exist\n5. Look for any file permission issues\nReturn: Git state and any file issues\n```\n\n### Step 3: Present Findings\n\nBased on the investigation, present a focused debug report:\n\n```markdown\n## Debug Report\n\n### What's Wrong\n[Clear statement of the issue based on evidence]\n\n### Evidence Found\n\n**From Logs**:\n- [Error/warning with timestamp]\n- [Pattern or repeated issue]\n\n**From Database** (if applicable):\n```sql\n-- Relevant query and result\n[Finding from database]\n```\n\n**From Git/Files**:\n- [Recent changes that might be related]\n- [File state issues]\n\n### Root Cause\n[Most likely explanation based on evidence]\n\n### Next Steps\n\n1. **Try This First**:\n   ```bash\n   [Specific command or action]\n   ```\n\n2. **If That Doesn't Work**:\n   - Restart relevant services\n   - Check browser console for frontend errors\n   - Run with debug flags enabled\n\n### Can't Access?\nSome issues might be outside my reach:\n- Browser console errors (F12 in browser)\n- MCP server internal state\n- System-level issues\n\nWould you like me to investigate something specific further?\n```\n\n## Important Notes\n\n- **Focus on manual testing scenarios** - This is for debugging during implementation\n- **Always require problem description** - Can't debug without knowing what's wrong\n- **Read files completely** - No limit/offset when reading context\n- **Think like `commit` or `describe_pr`** - Understand git state and changes\n- **Guide back to user** - Some issues (browser console, MCP internals) are outside reach\n- **No file editing** - Pure investigation only\n\n## Quick Reference\n\n**Find Latest Logs**:\n```bash\nls -t ./logs/*.log | head -1\n# Or check project-specific log locations\n```\n\n**Database Queries** (SQLite):\n```bash\nsqlite3 {database_path} \".tables\"\nsqlite3 {database_path} \".schema {table}\"\nsqlite3 {database_path} \"SELECT * FROM {table} ORDER BY created_at DESC LIMIT 5;\"\n```\n\n**Service Check**:\n```bash\nps aux | grep {service_name}\nlsof -i :{port}\n```\n\n**Git State**:\n```bash\ngit status\ngit log --oneline -10\ngit diff\n```\n\nRemember: This command helps you investigate without burning the primary window's context. Perfect for when you hit an issue during manual testing and need to dig into logs, database, or git state.","schemaVersion":1},"repoUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/debug","tags":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp","prompt"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Continuous-Claude-v3","audit":{"files":[],"binaries":[],"findings":[],"packages":0,"auditedAt":"2026-09-25T11:51:52.595Z","lockfiles":[]},"forks":303,"owner":"parcadei","stars":3942,"topics":["agents","claude-code","claude-code-cli","claude-code-hooks","claude-code-mcp","claude-code-skills","claude-code-subagents","claude-skills","mcp"],"license":"MIT","fullName":"parcadei/Continuous-Claude-v3","homepage":null,"language":"Python","pushedAt":"2026-01-26T15:27:49Z","avatarUrl":"https://avatars.githubusercontent.com/u/227596144?v=4","crawledAt":"2026-09-25T11:51:43.697Z","openIssues":46,"manifestFile":"SKILL.md","manifestPath":".claude/skills/debug/SKILL.md","defaultBranch":"main"},"readme":"# Debug\n\nYou are tasked with helping debug issues during manual testing or implementation. This command allows you to investigate problems by examining logs, database state, and git history without editing files. Think of this as a way to bootstrap a debugging session without using the primary window's context.\n\n## Initial Response\n\nWhen invoked WITH a plan/ticket file:\n```\nI'll help debug issues with [file name]. Let me understand the current state.\n\nWhat specific problem are you encountering?\n- What were you trying to test/implement?\n- What went wrong?\n- Any error messages?\n\nI'll investigate the logs, database, and git state to help figure out what's happening.\n```\n\nWhen invoked WITHOUT parameters:\n```\nI'll help debug your current issue.\n\nPlease describe what's going wrong:\n- What are you working on?\n- What specific problem occurred?\n- When did it last work?\n\nI can investigate logs, database state, and recent changes to help identify the issue.\n```\n\n## Environment Information\n\nYou have access to these key locations and tools:\n\n**Logs**:\n- Application logs (check project-specific locations)\n- Common locations: `./logs/`, `~/.local/share/{app}/`, `/var/log/`\n\n**Database** (if applicable):\n- SQLite databases can be queried with `sqlite3`\n- Check project config for database locations\n\n**Git State**:\n- Check current branch, recent commits, uncommitted changes\n- Similar to how `commit` and `describe_pr` commands work\n\n**Service Status**:\n- Check running processes: `ps aux | grep {service}`\n- Check listening ports: `lsof -i :{port}`\n\n## Process Steps\n\n### Step 1: Understand the Problem\n\nAfter the user describes the issue:\n\n1. **Read any provided context** (plan or ticket file):\n   - Understand what they're implementing/testing\n   - Note which phase or step they're on\n   - Identify expected vs actual behavior\n\n2. **Quick state check**:\n   - Current git branch and recent commits\n   - Any uncommitted changes\n   - When the issue started occurring\n\n### Step 2: Investigate the Issue\n\nSpawn parallel Task agents for efficient investigation:\n\n```\nTask 1 - Check Recent Logs:\nFind and analyze the most recent logs for errors:\n1. Find latest logs: ls -t ./logs/*.log | head -1 (or project-specific location)\n2. Search for errors, warnings, or issues around the problem timeframe\n3. Note the working directory if shown\n4. Look for stack traces or repeated errors\nReturn: Key errors/warnings with timestamps\n```\n\n```\nTask 2 - Database State (if applicable):\nCheck the current database state:\n1. Locate database file (check project config)\n2. Connect: sqlite3 {database_path}\n3. Check schema: .tables and .schema for relevant tables\n4. Query recent data based on the issue\n5. Look for stuck states or anomalies\nReturn: Relevant database findings\n```\n\n```\nTask 3 - Git and File State:\nUnderstand what changed recently:\n1. Check git status and current branch\n2. Look at recent commits: git log --oneline -10\n3. Check uncommitted changes: git diff\n4. Verify expected files exist\n5. Look for any file permission issues\nReturn: Git state and any file issues\n```\n\n### Step 3: Present Findings\n\nBased on the investigation, present a focused debug report:\n\n```markdown\n## Debug Report\n\n### What's Wrong\n[Clear statement of the issue based on evidence]\n\n### Evidence Found\n\n**From Logs**:\n- [Error/warning with timestamp]\n- [Pattern or repeated issue]\n\n**From Database** (if applicable):\n```sql\n-- Relevant query and result\n[Finding from database]\n```\n\n**From Git/Files**:\n- [Recent changes that might be related]\n- [File state issues]\n\n### Root Cause\n[Most likely explanation based on evidence]\n\n### Next Steps\n\n1. **Try This First**:\n   ```bash\n   [Specific command or action]\n   ```\n\n2. **If That Doesn't Work**:\n   - Restart relevant services\n   - Check browser console for frontend errors\n   - Run with debug flags enabled\n\n### Can't Access?\nSome issues might be outside my reach:\n- Browser console errors (F12 in browser)\n- MCP server internal state\n- System-level issues\n\nWould you lik","createdAt":"2026-09-25T11:51:52.826Z","updatedAt":"2026-09-25T11:51:52.826Z"}],"total":40,"limit":24,"offset":0}