prompt-builder
БесплатноЗапускает вложенные скриптыНе проверенBuild complete agent prompts deterministically via Python script. Use BEFORE spawning any BAZINGA agent (Developer, QA, Tech Lead, PM, etc.).
Об этом скилле
Prompt Builder Skill
You are the prompt-builder skill. Your role is to build complete agent prompts by calling prompt_builder.py, which handles everything deterministically.
Overview
This skill builds complete agent prompts by calling a Python script that:
- Reads specializations from database (task_groups.specializations)
- Reads context from database (context_packages, error_patterns, reasoning)
- Reads full agent definition files from filesystem
- Applies token budgets per model
- Validates required markers are present
- Saves prompt to file and returns JSON result
Prerequisites
- Database must be initialized (
bazinga/bazinga.dbexists) - Config must be seeded (run
config-seederskill first at session start) - Agent files must exist in
agents/directory
When to Invoke This Skill
- RIGHT BEFORE spawning any BAZINGA agent
- When orchestrator needs a complete prompt for Developer, QA Expert, Tech Lead, PM, Investigator, or Requirements Engineer
- Called ON-DEMAND to get the latest context from database
Your Task
When invoked, you must:
Step 1: Read Parameters File
The orchestrator writes a params JSON file before invoking this skill. Look for it at:
bazinga/prompts/{session_id}/params_{agent_type}_{group_id}.json
Example: bazinga/prompts/bazinga_20251217_120000/params_developer_CALC.json
Params file format:
{
"agent_type": "developer",
"session_id": "bazinga_20251217_120000",
"group_id": "CALC",
"task_title": "Implement calculator",
"task_requirements": "Create add/subtract functions",
"branch": "main",
"mode": "simple",
"testing_mode": "full",
"model": "haiku",
"output_file": "bazinga/prompts/bazinga_20251217_120000/developer_CALC.md"
}
Additional fields for retries:
{
"qa_feedback": "Tests failed: test_add expected 4, got 5",
"tl_feedback": "Error handling needs improvement"
}
Additional fields for CRP (Compact Return Protocol):
{
"prior_handoff_file": "bazinga/artifacts/bazinga_20251217_120000/CALC/handoff_developer.json"
}
Additional fields for PM spawns:
{
"pm_state": "{...json...}",
"resume_context": "Resuming after developer completion"
}
Step 2: Call the Python Script
Run the prompt builder with the params file:
python3 .claude/skills/prompt-builder/scripts/prompt_builder.py --params-file "bazinga/prompts/{session_id}/params_{agent_type}_{group_id}.json"
The script will:
- Read all parameters from the JSON file
- Build the complete prompt
- Save prompt to
output_filepath - Output JSON result to stdout
Step 3: Return JSON Result to Orchestrator
The script outputs JSON to stdout:
Success response:
{
"success": true,
"prompt_file": "bazinga/prompts/bazinga_20251217_120000/developer_CALC.md",
"tokens_estimate": 10728,
"lines": 1406,
"markers_ok": true,
"missing_markers": [],
"error": null
}
Error response:
{
"success": false,
"prompt_file": null,
"tokens_estimate": 0,
"lines": 0,
"markers_ok": false,
"missing_markers": ["READY_FOR_QA"],
"error": "Prompt validation failed - missing required markers"
}
Return this JSON to the orchestrator so it can:
- Verify
successistrue - Read prompt from
prompt_filefor the Task spawn - Check
markers_okistrue
Step 4: IMMEDIATELY Spawn Agent (CRITICAL - SAME TURN)
🔴 DO NOT STOP after receiving JSON. IMMEDIATELY call Task() to spawn the agent.
After verifying success: true, spawn the agent in the SAME assistant turn:
Task(
subagent_type: "general-purpose",
model: "{haiku|sonnet|opus}",
description: "{agent_type} working on {group_id}",
prompt: "FIRST: Read {prompt_file} which contains your complete instructions.
THEN: Execute ALL instructions in that file.
Do NOT proceed without reading the file first."
)
🚫 ANTI-PATTERN:
❌ WRONG: "Prompt built successfully. JSON result: {...}" [STOPS - turn ends]
→ Agent never spawns. Workflow hangs until user says "continue".
✅ CORRECT: "Prompt built successfully." [IMMEDIATELY calls Task() with prompt_file]
→ Agent spawns automatically. Workflow continues.
The entire sequence (params file → prompt-builder → Task spawn) MUST complete in ONE assistant turn.
Params File Reference
| Field | Required | Example | Description |
|---|---|---|---|
agent_type |
Yes | developer |
developer, qa_expert, tech_lead, project_manager, etc. |
session_id |
Yes | bazinga_20251217_120000 |
Current session ID |
group_id |
Non-PM | CALC |
Task group ID |
task_title |
No | Implement calculator |
Brief title |
task_requirements |
No | Create functions... |
Detailed requirements |
branch |
Yes | main |
Git branch name |
mode |
Yes | simple |
simple or parallel |
testing_mode |
Yes | full |
full, minimal, or disabled |
model |
No | haiku |
haiku, sonnet, or o |
Установить prompt-builder в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadWriteВложенные файлы
FAQ
Что делает скилл prompt-builder?
Build complete agent prompts deterministically via Python script. Use BEFORE spawning any BAZINGA agent (Developer, QA, Tech Lead, PM, etc.).
Как установить скилл prompt-builder?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл prompt-builder запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic