---
npx claudepluginhub a5c-ai/babysitterThis skill inherits all available tools. When active, it can use any tool Claude has access to.
process/README.mdprocess/SPEC-KIT.mdprocess/cradle/bug-report.jsprocess/cradle/bugfix.jsprocess/cradle/contribute.jsprocess/cradle/documentation-contribute-answer.jsprocess/cradle/documentation-question.jsprocess/cradle/feature-harness-integration-contribute.jsprocess/cradle/feature-implementation-contribute.jsprocess/cradle/feature-request.jsprocess/cradle/library-contribution.jsprocess/cradle/project-install.jsprocess/cradle/user-install.jsprocess/examples/spec-kit-examples.jsonprocess/examples/tdd-quality-convergence-example.jsonprocess/methodologies/adversarial-spec-debates.jsprocess/methodologies/agile.jsprocess/methodologies/ai-workflows-backlog.mdprocess/methodologies/atdd-tdd/README.mdprocess/methodologies/atdd-tdd/atdd-tdd.jsOrchestrate .a5c/runs/<runId>/ through iterative execution. Use the SDK CLI to drive the orchestration loop.
Read the SDK version from the plugin manifest to ensure version compatibility:
SDK_VERSION=$(node -e "try{console.log(JSON.parse(require('fs').readFileSync('${CLAUDE_PLUGIN_ROOT}/plugin.json','utf8')).sdkVersion||'latest')}catch{console.log('latest')}")
sudo npm i -g @a5c-ai/babysitter-sdk@$SDK_VERSION
# sudo is depending on the env and system
then use the CLI alias: CLI="babysitter"
Alternatively, use the CLI alias: CLI="npx -y @a5c-ai/babysitter-sdk@$SDK_VERSION"
make sure you have jq installed and available in the path. if not, install it.
The babysitter workflow has 4 steps:
Interview the user for the intent, requirements, goal, scope, etc. using AskUserQuestion tool (before setting the in-session loop).
A multi-step phase to understand the intent and perspective to approach the process building after researching the repo, short research online if needed, short research in the target repo, additional instructions, intent and library (processes, specializations, skills, subagents, methodologies, references, etc.) / guide for methodology building. (clarifications regarding the intent, requirements, goal, scope, etc.) - the library is at [skill-root]/process/specializations///** and [skill-root]/process/methodologies/ and under [skill-root]/process/contrib/[contributer-username]/]
The first step should be the look at the state of the repo, then find the most relevant processes, specializations, skills, subagents, methodologies, references, etc. to use as a reference. use the babysitter cli discover command to find the relevant processes, skills, subagents, etc at various stages.
Then this phase can have: research online, research the repo, user questions, and other steps one after the other until the intent, requirements, goal, scope, etc. are clear and the user is satisfied with the understanding. after each step, decide the type of next step to take. do not plan more than 1 step ahead in this phase. and the same step type can be used more than once in this phase.
When running non-interactively, skip the interview phase entirely. Instead:
Before building the process, check for an existing user profile to personalize the orchestration:
Read user profile: Run babysitter profile:read --user --json to load the user profile from ~/.a5c/user-profile.json. Always use the CLI for profile operations — never import or call SDK profile functions directly.
Pre-fill context: Use the profile to understand the user's specialties, expertise levels, preferences, and communication style. This informs how you conduct the interview (skip questions the profile already answers) and how you build the process.
Breakpoint density: Use the breakpointTolerance field to calibrate breakpoint placement in the generated process:
minimal/low (expert users): Fewer breakpoints — only at critical decision points (architecture choices, deployment, destructive operations)moderate (intermediate users): Standard breakpoints at phase boundarieshigh/maximum (novice users): More breakpoints — add review gates after each implementation step, before each integration, and at every quality gatealwaysBreakOn for operations that must always pause (e.g., destructive-git, deploy)skipBreakpointsForKnownPatterns is true, reduce breakpoints for operations the user has previously approvedTool preferences: Use toolPreferences and installedSkills/installedAgents to prioritize which agents and skills to use in the process. Prefer tools the user is familiar with.
Communication style: Adapt process descriptions and breakpoint questions to match the user's communicationStyle preferences (tone, explanationDepth, preferredResponseFormat).
If no profile exists: Proceed normally with the interview phase. Consider suggesting the user run /user-install first to create a profile for better personalization.
CLI profile commands (mandatory): All profile operations MUST use the babysitter CLI — never import SDK profile functions directly. This applies to the babysit skill itself, all generated processes, and all agent task instructions:
babysitter profile:read --user --json — Read user profile as JSONbabysitter profile:read --project --json — Read project profile as JSONbabysitter profile:write --user --input <file> --json — Write user profile from filebabysitter profile:write --project --input <file> --json — Write project profile from filebabysitter profile:merge --user --input <file> --json — Merge partial updates into user profilebabysitter profile:merge --project --input <file> --json — Merge partial updates into project profilebabysitter profile:render --user — Render user profile as readable markdownbabysitter profile:render --project — Render project profile as readable markdownUse --dir <dir> to override the default profile directory when needed.
after the interview phase, create the complete custom process files (js and jsons) for the run according to the Process Creation Guidelines and methodologies section. also install the babysitter-sdk inside .a5c if it is not already installed. (install it in .a5c/package.json if it is not already installed, make sure to use the latest version) you must abide the syntax and structure of the process files from the process library.
IMPORTANT — Path resolution: Always use absolute paths for --entry when calling run:create, and always run the CLI from the project root directory (not from .a5c/). Using relative paths while CWD is inside .a5c/ causes doubled paths like .a5c/.a5c/runs/ or .a5c/.a5c/processes/.
User profile awareness: If a user profile was loaded in the User Profile Integration step, use it to inform process design — adjust breakpoint density per the user's tolerance level, select agents/skills the user prefers, and match the process complexity to the user's expertise.
IMPORTANT — Profile I/O in processes: When generating process files, all profile read/write/merge operations MUST use the babysitter CLI commands (babysitter profile:read, profile:write, profile:merge, profile:render). Never instruct agents to import or call SDK profile functions (readUserProfile, writeUserProfile, etc.) directly. The CLI handles atomic writes, directory creation, and markdown generation automatically.
After the process is created and before creating the run:
For new runs:
$CLI run:create \
--process-id <id> \
--entry <path>#<export> \
--inputs <file> \
--prompt "$PROMPT" \
--harness claude-code \
--plugin-root "${CLAUDE_PLUGIN_ROOT}" \
--json
Required flags:
--process-id <id> — unique identifier for the process definition--entry <path>#<export> — path to the process JS file and its named export (e.g., ./my-process.js#process)--prompt "$PROMPT" — the user's initial prompt/request text--harness claude-code — activates Claude Code session binding (init + associate in one step). The session ID is auto-detected from CLAUDE_ENV_FILE (written by the session-start hook) or CLAUDE_SESSION_ID env var.--plugin-root "${CLAUDE_PLUGIN_ROOT}" — plugin root directory for state file resolutionOptional flags:
--session-id <id> — explicitly provide session ID (normally auto-detected by --harness claude-code)--inputs <file> — path to a JSON file with process inputs--run-id <id> — override auto-generated run ID--runs-dir <dir> — override runs directory (default: .a5c/runs)This single command creates the run AND binds the session (initializing the stop-hook loop). The JSON output includes runId, runDir, and session binding status.
For resuming existing runs:
$CLI session:resume \
--state-dir "${CLAUDE_PLUGIN_ROOT}/skills/babysit/state" \
--run-id <runId> --runs-dir .a5c/runs --json
$CLI run:iterate .a5c/runs/<runId> --json --iteration <n> --plugin-root "${CLAUDE_PLUGIN_ROOT}"
Output:
{
"iteration": 1,
"status": "executed|waiting|completed|failed|none",
"action": "executed-tasks|waiting|none",
"reason": "auto-runnable-tasks|breakpoint-waiting|terminal-state",
"count": 3,
"completionProof": "only-present-when-completed",
"metadata": { "runId": "...", "processId": "..." }
}
Status values:
"executed" - Tasks executed, continue looping
"waiting" - Breakpoint/sleep, pause until released
"completed" - Run finished successfully
"failed" - Run failed with error
"none" - No pending effects
Common mistake to avoid: ❌ WRONG: Calling run:iterate, performing the effect, posting the result, then calling run:iterate again in the same session ✅ CORRECT: Calling run:iterate, performing the effect, posting the result, then STOPPING the session so the hook triggers the next iteration
$CLI task:list .a5c/runs/<runId> --pending --json
Output:
{
"tasks": [
{
"effectId": "effect-abc123",
"kind": "node|agent|skill|breakpoint",
"label": "auto",
"status": "requested"
}
]
}
Run the effect externally to the SDK (by you, your hook, or another worker). After execution (by delegation to an agent or skill), post the outcome summary into the run by calling task:post, which:
tasks/<effectId>/result.jsonEFFECT_RESOLVED event to the journalIMPORTANT:
If running in interactive mode, use AskUserQuestion tool to ask the user the breakpoint question.
CRITICAL: Response validation rules:
After receiving an explicit approval or rejection from the user, post the result of the breakpoint to the run by calling task:post.
Breakpoints are meant for human approval. NEVER prompt directly and never release or approve breakpoints yourself. Once the user responds via the AskUserQuestion tool, post the result of the breakpoint to the run by calling task:post when the breakpoint is resolved.
Never user AskUserQuestion tool to offer an options like: "chat about this" or "i'll provide an answer in the chat" or anything that implies that the user will provide the answer in the chat. use either explicit options (and optionally one open option that the user can just write a free text answer to).
Otherwise:
If running in non-interactive mode, skip the AskUserQuestion tool as it is not available. resolve the breakpoint by selecting the best option according to the context and the intent of the user. then post the result of the breakpoint to the run by calling task:post when the breakpoint is resolved.
IMPORTANT: Do NOT write result.json directly. The SDK owns that file.
Workflow:
output.json or value.json):{
"score": 85,
"details": { ... }
}
$CLI task:post .a5c/runs/<runId> <effectId> \
--status ok \
--value tasks/<effectId>/output.json \
--json
The task:post command will:
result.json (including schema, metadata, and your value)EFFECT_RESOLVED event to the journalAvailable flags:
--status <ok|error> (required)--value <file> - Result value (for status=ok)--error <file> - Error payload (for status=error)--stdout-file <file> - Capture stdout--stderr-file <file> - Capture stderr--started-at <iso8601> - Task start time--finished-at <iso8601> - Task end time--metadata <file> - Additional metadata JSONCommon mistake to avoid:
# ❌ WRONG: Writing result.json directly
echo '{"result": {...}}' > tasks/<effectId>/result.json
$CLI task:post <runId> <effectId> --status ok
# ✅ CORRECT: Write value to separate file, let SDK create result.json
echo '{"score": 85}' > tasks/<effectId>/output.json
$CLI task:post <runId> <effectId> --status ok --value tasks/<effectId>/output.json
you will be called by the stop-hook and you will be asked to repeat the orchestration loop or exit the loop by posting the completion proof. Repeat orchestration loop by calling run:iterate or doing the next right thing.
common mistake to avoid:
❌ WRONG: Stopping the session before run-session association
✅ CORRECT: Stopping the session after run-session association, then after every iteration, letting the hook call you back to continue the loop until completion.
❌ WRONG: Calling run:iterate multiple times in the same session without stopping and letting the hook call you back.
✅ CORRECT: Calling run:iterate once, then stopping and letting the hook call you back for the next iteration until completion.
When the run is completed, the CLI will emit a completionProof value in the output of run:iterate and run:status. You must return that exact value wrapped in a <promise>...</promise> tag to signal completion to the stop-hook loop.
After you ran run:create, progress through the phases above by Stopping the session, which will trigger the stop-hook and call you with the next phase. After you finish each phase after run:create, stop the session and return the control to the user until you are called again by the hook.
| Kind | Description | Executor |
|---|---|---|
node | Node.js script | Local node process |
shell | Shell script | Local shell process |
agent | LLM agent | Agent runtime |
skill | Claude Code skill | Skill system |
breakpoint | Human approval | UI/CLI |
sleep | Time gate | Scheduler |
Important: Check which subagents and agents are actually available before assigning the name. if none, pass the general-purpose subagent. check the subagents and agents in the plugin (in nested folders) and to find relevant subagents and agents to use as a reference. specifically check subagents and agents in folders next to the reference process file. when executing the agent task, use the Task tool. never use the Babysitter skill or agent to execute the task. if the subagent or agent is not installed for the project before running the process, install it first.
export const agentTask = defineTask('agent-scorer', (args, taskCtx) => ({
kind: 'agent', // ← Use "agent" not "node"
title: 'Agent scoring',
agent: {
name: 'quality-scorer',
prompt: {
role: 'QA engineer',
task: 'Score results 0-100',
context: { ...args },
instructions: ['Review', 'Score', 'Recommend'],
outputFormat: 'JSON'
},
outputSchema: {
type: 'object',
required: ['score']
}
},
io: {
inputJsonPath: `tasks/${taskCtx.effectId}/input.json`,
outputJsonPath: `tasks/${taskCtx.effectId}/result.json`
}
}));
Important: Check which skills are actually available before assigning the skill name. check the skills in the plugin (in nested folders) and to find relevant skills to use as a reference. specifically check skills in folders next to the reference process file.
Never use the Babysitter skill or agent to execute the task. if the skill or subagent is not installed for the project before running the process, install it first. skills are prefered over subagents for executing tasks, especially if you can find the right skill for the task. you can convert a agent call to a skill call even if the reference process mentions an agent call.
export const skillTask = defineTask('analyzer-skill', (args, taskCtx) => ({
kind: 'skill', // ← Use "skill" not "node"
title: 'Analyze codebase',
skill: {
name: 'codebase-analyzer',
context: {
scope: args.scope,
depth: args.depth,
analysisType: args.type,
criteria: ['Code consistency', 'Naming conventions', 'Error handling'],
instructions: [
'Scan specified paths for code patterns',
'Analyze consistency across the codebase',
'Check naming conventions',
'Review error handling patterns',
'Generate structured analysis report'
]
}
},
io: {
inputJsonPath: `tasks/${taskCtx.effectId}/input.json`,
outputJsonPath: `tasks/${taskCtx.effectId}/result.json`
}
}));
Create run (with session binding):
$CLI run:create --process-id <id> --entry <path>#<export> --inputs <file> \
--prompt "$PROMPT" --harness claude-code \
--plugin-root "${CLAUDE_PLUGIN_ROOT}" --json
Check status:
$CLI run:status <runId> --json
When the run completes, run:iterate and run:status emit completionProof. Use that exact value in a <promise>...</promise> tag to end the loop.
View events:
$CLI run:events <runId> --limit 20 --reverse
List tasks:
$CLI task:list <runId> --pending --json
Post task result:
$CLI task:post <runId> <effectId> --status <ok|error> --json
Iterate:
$CLI run:iterate <runId> --json --iteration <n> --plugin-root "${CLAUDE_PLUGIN_ROOT}"
If at any point the run fails due to SDK issues or corrupted state or journal. analyze the error and the journal events. recover the state to the state and journal to the last known good state and adapt and try to continue the run.
When building ux and full stack applications, integrate/link the main pages of the frontend with functionality created for every phase of the development process (where relevant). so that is a way to test the functionality of the app as we go.
Unless otherwise specified, prefer quality gated iterative development loops in the process.
You can change the process after the run is created or during the run (and adapt the process accordingly and journal accordingly) in case you discovered new information or requirements that were not previously known that changes the approach or the process.
The process should be a comprehensive and complete solution to the user request. it should not be a partial solution or a work in progress. it should be a complete and working solution that can be used to test the functionality of the app as we go.
the process should usally be a composition (in code) of multiple processes from the process library (not just one), for multiple phases and parts of the process, each utilizing a different process from the library as a reference. in order to perform the user request in the most accurate and robust process that utilizes the best-practices from the library in every part.
include verification and refinement steps (and loops) for planning phases and integration phases, debugging phases, refactoring phases, etc. as well.
Create the process with (and around) the available skills and subagents. (check which are available first and use discover to allow)
Prefer incremental work that allows testing and experimentation with the new functionality of the work or app as we go. for example, when building a new feature, prefer building it in a way that allows testing it with a simple script or a simple page in the frontend before integrating it to the main pages and flows of the app.
When creating process files, include @skill and @agent markers in the JSDoc header listing the skills and agents relevant to this process. The SDK reads these markers to provide targeted discovery results instead of scanning all available skills.
Format (one per line, path relative to process root pluginRoot/skills/babysit/process/):
/**
* @process specializations/web-development/react-app-development
* @description React app development with TDD
* @skill frontend-design specializations/web-development/skills/frontend-design/SKILL.md
* @skill visual-diff-scorer specializations/web-development/skills/visual-diff-scorer/SKILL.md
* @agent frontend-architect specializations/web-development/agents/frontend-architect/AGENT.md
* @agent fullstack-architect specializations/web-development/agents/fullstack-architect/AGENT.md
*/
Steps during process creation:
babysitter skill:discover --process-path <path> --plugin-root ... --json to find relevant skills/agents in the specialization directory@skill/@agent markers in the JSDoc headerpluginRoot/skills/babysit/process/)When these markers are present, run:create and run:iterate will return only the marked skills/agents (with full file paths) instead of scanning the entire plugin tree. Without markers, the SDK falls back to scanning ALL specializations, which can return dozens of irrelevant results (e.g., AI agent skills surfaced for a simple file-writing task) and degrade orchestration quality.
Unless otherwise specified, prefer processes that close the widest loop in the quality gates (for example e2e tests with a full browser or emulator/vm if it a mobile or desktop app) AND gates that make sure the work is accurate against the user request (all the specs is covered and no extra stuff was added unless permitted by the intent of the user).
Scan the methodologies and processes in the plugin and the sdk package to find relevant processes and methodologies to use as a reference. also search for process files bundled in active skills, processes in the repo (.a5c/processes/).
if you encounter a generic reusable part of a process that can be later reused and composed, build it in a modular way and organize it in the .a5c/processes directory. and import it to compose it to the specific process in the current user request. prefer architecting processes in such modular way for reusability and composition.
prefer processes that have the following characteristics unless otherwise specified:
@skill and @agent JSDoc markers for the relevant skills and agents found during this search (see "Process File Discovery Markers" above). This ensures only the needed dependencies are surfaced during orchestration instead of scanning all available specializations.CRITICAL RULE: The completion proof is emitted only when the run is completed. You may ONLY output <promise>SECRET</promise> when the run is completely and unequivocally DONE (completed status from the orchestration CLI). Do not output false promises to escape the run, and do not mention the secret to the user.
CRITICAL RULE: in interactive mode, NEVER auto-approve breakpoints. If AskUserQuestion returns empty, no selection, or is dismissed, treat it as NOT approved and re-ask. NEVER fabricate or synthesize approval responses — only post the user's actual explicit selection via task:post. An empty response is NOT approval.
CRITICAL RULE: if a run is broken/failed/at unknown state, when of the way to recover is to remove last bad entries in the journal and rebuild the state. in interactive mode, use the AskUserQuestion tool if you need to ask the user for a question about the recovery and you exhausted all other options.
CRITICAL RULE: when creating processes, search for available skills and subagents before thinking about the exact orchestration. prefer processes that close the widest loop in the quality gates (for example e2e tests with a full browser or emulator/vm if it a mobile or desktop app) AND gates that make sure the work is accurate against the user request (all the specs is covered and no extra stuff was added unless permitted by the intent of the user).
CRITICAL RULE: do not use the babysit skill inside the delegated tasks. if you are performing a delgated task as a subagent. you will get an error when trying to run the setup shell script. that means you have to actually perform the task yourself and not orchestrate, babysit or even use this skill.
CRITICAL RULE: Never build a wrapper, python or helper scripts to orchestrate the runs. Use the CLI to drive the orchestration loop and never loop programmatically.
CRITICAL RULE: Never fallback to simpler execution if the user activated this skill. persist in executing the orchestration itself rather than simplifying the execution by bypassing the process above - you must create a valid process js file, create a run (with --harness claude-code to bind the session), then iterate the run until it is completed.
CRITICAL RULE: After run:create or run-session association and after each effect is posted, you MUST stop the session and return control. Do NOT proceed to the next run:iterate in the same session turn. The stop-hook will call you back to continue. Running multiple iterations in a single session turn bypasses the hook loop and breaks the orchestration model.
process/tdd-quality-convergence.js - TDD quality convergence example - read and look for relevant processes and methodolies before creating the code process for a new run (create the run using the CLI, then use these process as a reference)reference/ADVANCED_PATTERNS.md - Agent/skill patterns, iterative convergencepackages/sdk/sdk.md - SDK API referenceActivates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.