process-builder
Scaffold new babysitter process definitions following SDK patterns, proper structure, and best practices. Guides the 3-phase workflow from research to implementation.
About this skill
This AI agent skill, 'process-builder', is designed to streamline the creation of new process definitions within the 'babysitter' event-sourced orchestration framework. It enforces adherence to SDK patterns, proper project structure, and established best practices by guiding the AI through a meticulous three-phase workflow. The agent will first conduct foundational research and documentation, then identify and backlog specific processes for the specialization, and finally scaffold the actual JavaScript process files. Developers or teams utilizing the 'babysitter' framework can leverage this skill to ensure consistency and significantly accelerate the initial setup of complex event-sourced processes. It provides a standardized approach to development, helping to maintain architectural integrity and offering a clear, guided path for implementing new functionalities or modules. This automation is particularly beneficial in large projects or teams where consistency is paramount. By standardizing the creation of process definitions, 'process-builder' minimizes manual errors, reduces boilerplate coding, and saves valuable development time. It promotes a uniform codebase across various processes and ensures that critical documentation and a clear backlog are established upfront. This structured approach fosters better project organization, facilitates easier onboarding for new team members, and improves overall collaboration within development cycles.
Best use case
The primary use case for this skill is to rapidly and correctly initiate new process definitions for the 'babysitter' framework, particularly for complex event-sourced orchestrations. Development teams and individual developers working with 'babysitter' benefit most, as it ensures immediate adherence to internal SDK patterns and best practices, thereby reducing manual setup tasks and promoting consistency throughout a project's lifecycle.
Scaffold new babysitter process definitions following SDK patterns, proper structure, and best practices. Guides the 3-phase workflow from research to implementation.
A properly structured directory for a new 'babysitter' process definition, complete with foundational documentation, an identified processes backlog, and placeholder JavaScript files, all adhering to specified patterns and best practices.
Practical example
Example input
Scaffold a new babysitter process definition for 'Customer Onboarding' within the 'user-management' domain. Outline the key processes involved, including 'Profile Creation', 'KYC Verification', and 'Welcome Email Dispatch'. Ensure all necessary documentation is created following the 3-phase workflow.
Example output
Created directory structure: `plugins/babysitter/skills/babysit/process/specializations/domains/user-management/customer-onboarding/`. Generated `README.md`, `references.md`, and `processes-backlog.md` with initial entries for 'Profile Creation', 'KYC Verification', and 'Welcome Email Dispatch'. Scaffolding for `profile-creation.js`, `kyc-verification.js`, and `welcome-email-dispatch.js` is complete.
When to use this skill
- Starting a new feature or module that requires a new process definition within the 'babysitter' framework.
- Ensuring consistent structure, documentation, and best practices for all event-sourced processes.
- Onboarding new developers to the established development patterns of the 'babysitter' framework.
- Automating the initial setup phases of complex orchestration logic to save time and reduce errors.
When not to use this skill
- When modifying or refactoring existing 'babysitter' process definitions.
- If you are not working within the 'babysitter' event-sourced orchestration framework.
- For general code scaffolding unrelated to 'babysitter' process definitions or its specific patterns.
- When a process is extremely simple and does not warrant the full 3-phase workflow.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/process-builder/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How process-builder Compares
| Feature / Agent | process-builder | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | easy | N/A |
Frequently Asked Questions
What does this skill do?
Scaffold new babysitter process definitions following SDK patterns, proper structure, and best practices. Guides the 3-phase workflow from research to implementation.
How difficult is it to install?
The installation complexity is rated as easy. You can find the installation instructions above.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
Top AI Agents for Productivity
See the top AI agent skills for productivity, workflow automation, operational systems, documentation, and everyday task execution.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
SKILL.md Source
# Process Builder
Create new process definitions for the babysitter event-sourced orchestration framework.
## Quick Reference
```
Processes live in: plugins/babysitter/skills/babysit/process/
├── methodologies/ # Reusable development approaches (TDD, BDD, Scrum, etc.)
│ └── [name]/
│ ├── README.md # Documentation
│ ├── [name].js # Main process
│ └── examples/ # Sample inputs
│
└── specializations/ # Domain-specific processes
├── [category]/ # Engineering specializations (direct children)
│ └── [process].js
└── domains/
└── [domain]/ # Business, Science, Social Sciences
└── [spec]/
├── README.md
├── references.md
├── processes-backlog.md
└── [process].js
```
## 3-Phase Workflow
### Phase 1: Research & Documentation
Create foundational documentation:
```bash
# Check existing specializations
ls plugins/babysitter/skills/babysit/process/specializations/
# Check methodologies
ls plugins/babysitter/skills/babysit/process/methodologies/
```
**Create:**
- `README.md` - Overview, roles, goals, use cases, common flows
- `references.md` - External references, best practices, links to sources
### Phase 2: Identify Processes
Create `processes-backlog.md` with identified processes:
```markdown
# Processes Backlog - [Specialization Name]
## Identified Processes
- [ ] **process-name** - Short description of what this process accomplishes
- Reference: [Link to methodology or standard]
- Inputs: list key inputs
- Outputs: list key outputs
- [ ] **another-process** - Description
...
```
### Phase 3: Create Process Files
Create `.js` process files following SDK patterns (see below).
---
## Process File Structure
Every process file follows this pattern:
```javascript
/**
* @process [category]/[process-name]
* @description Clear description of what the process accomplishes end-to-end
* @inputs { inputName: type, optionalInput?: type }
* @outputs { success: boolean, outputName: type, artifacts: array }
*
* @example
* const result = await orchestrate('[category]/[process-name]', {
* inputName: 'value',
* optionalInput: 'optional-value'
* });
*
* @references
* - Book: "Relevant Book Title" by Author
* - Article: [Title](https://link)
* - Standard: ISO/IEEE reference
*/
import { defineTask } from '@a5c-ai/babysitter-sdk';
/**
* [Process Name] Process
*
* Methodology: Brief description of the approach
*
* Phases:
* 1. Phase Name - What happens
* 2. Phase Name - What happens
* ...
*
* Benefits:
* - Benefit 1
* - Benefit 2
*
* @param {Object} inputs - Process inputs
* @param {string} inputs.inputName - Description of input
* @param {Object} ctx - Process context (see SDK)
* @returns {Promise<Object>} Process result
*/
export async function process(inputs, ctx) {
const {
inputName,
optionalInput = 'default-value',
// ... destructure with defaults
} = inputs;
const artifacts = [];
// ============================================================================
// PHASE 1: [PHASE NAME]
// ============================================================================
ctx.log?.('info', 'Starting Phase 1...');
const phase1Result = await ctx.task(someTask, {
// task inputs
});
artifacts.push(...(phase1Result.artifacts || []));
// Breakpoint for human review (when needed)
await ctx.breakpoint({
question: 'Review the results and approve to continue?',
title: 'Phase 1 Review',
context: {
runId: ctx.runId,
files: [
{ path: 'artifacts/output.md', format: 'markdown', label: 'Output' }
]
}
});
// ============================================================================
// PHASE 2: [PHASE NAME] - Parallel Execution Example
// ============================================================================
const [result1, result2, result3] = await ctx.parallel.all([
() => ctx.task(task1, { /* args */ }),
() => ctx.task(task2, { /* args */ }),
() => ctx.task(task3, { /* args */ })
]);
// ============================================================================
// PHASE 3: [ITERATION EXAMPLE]
// ============================================================================
let iteration = 0;
let targetMet = false;
while (!targetMet && iteration < maxIterations) {
iteration++;
const iterResult = await ctx.task(iterativeTask, {
iteration,
previousResults: /* ... */
});
targetMet = iterResult.meetsTarget;
if (!targetMet && iteration % 3 === 0) {
// Periodic checkpoint
await ctx.breakpoint({
question: `Iteration ${iteration}: Target not met. Continue?`,
title: 'Progress Checkpoint',
context: { /* ... */ }
});
}
}
// ============================================================================
// COMPLETION
// ============================================================================
return {
success: targetMet,
iterations: iteration,
artifacts,
// ... other outputs matching @outputs
};
}
// ============================================================================
// TASK DEFINITIONS
// ============================================================================
/**
* Task: [Task Name]
* Purpose: What this task accomplishes
*/
const someTask = defineTask({
name: 'task-name',
description: 'What this task does',
// Task definition - executed externally by orchestrator
// This returns a TaskDef that describes HOW to run the task
inputs: {
inputName: { type: 'string', required: true },
optionalInput: { type: 'number', default: 10 }
},
outputs: {
result: { type: 'object' },
artifacts: { type: 'array' }
},
async run(inputs, taskCtx) {
const effectId = taskCtx.effectId;
return {
kind: 'node', // or 'agent', 'skill', 'shell', 'breakpoint'
title: `Task: ${inputs.inputName}`,
node: {
entry: 'scripts/task-runner.js',
args: ['--input', inputs.inputName, '--effect-id', effectId]
},
io: {
inputJsonPath: `tasks/${effectId}/input.json`,
outputJsonPath: `tasks/${effectId}/result.json`
},
labels: ['category', 'subcategory']
};
}
});
```
---
## SDK Context API Reference
The `ctx` object provides these intrinsics:
| Method | Purpose | Behavior |
|--------|---------|----------|
| `ctx.task(taskDef, args, opts?)` | Execute a task | Returns result or throws typed exception |
| `ctx.breakpoint(payload)` | Human approval gate | Pauses until approved via human |
| `ctx.sleepUntil(isoOrEpochMs)` | Time-based gate | Pauses until specified time |
| `ctx.parallel.all([...thunks])` | Parallel execution | Runs independent tasks concurrently |
| `ctx.parallel.map(items, fn)` | Parallel map | Maps items through task function |
| `ctx.now()` | Deterministic time | Returns current Date (or provided time) |
| `ctx.log?.(level, msg, data?)` | Logging | Optional logging helper |
| `ctx.runId` | Run identifier | Current run's unique ID |
### Task Kinds
| Kind | Use Case | Executor |
|------|----------|----------|
| `node` | Scripts, builds, tests | Node.js process |
| `agent` | LLM-powered analysis, generation | Claude Code agent |
| `skill` | Claude Code skills | Skill invocation |
| `shell` | System commands | Shell execution |
| `breakpoint` | Human approval | Breakpoints UI/service |
| `sleep` | Time gates | Orchestrator scheduling |
| `orchestrator_task` | Internal orchestrator work | Self-routed |
---
## Breakpoint Patterns
### Basic Approval Gate
```javascript
await ctx.breakpoint({
question: 'Approve to continue?',
title: 'Checkpoint',
context: { runId: ctx.runId }
});
```
### With File References (for UI display)
```javascript
await ctx.breakpoint({
question: 'Review the generated specification. Does it meet requirements?',
title: 'Specification Review',
context: {
runId: ctx.runId,
files: [
{ path: 'artifacts/spec.md', format: 'markdown', label: 'Specification' },
{ path: 'artifacts/spec.json', format: 'json', label: 'JSON Schema' },
{ path: 'src/implementation.ts', format: 'code', language: 'typescript', label: 'Implementation' }
]
}
});
```
### Conditional Breakpoint
```javascript
if (qualityScore < targetScore) {
await ctx.breakpoint({
question: `Quality score ${qualityScore} is below target ${targetScore}. Continue iterating or accept current result?`,
title: 'Quality Gate',
context: {
runId: ctx.runId,
data: { qualityScore, targetScore, iteration }
}
});
}
```
---
## Common Patterns
### Quality Convergence Loop
```javascript
let quality = 0;
let iteration = 0;
const targetQuality = inputs.targetQuality || 85;
const maxIterations = inputs.maxIterations || 10;
while (quality < targetQuality && iteration < maxIterations) {
iteration++;
ctx.log?.('info', `Iteration ${iteration}/${maxIterations}`);
// Execute improvement tasks
const improvement = await ctx.task(improveTask, { iteration });
// Score quality (parallel checks)
const [coverage, lint, security, tests] = await ctx.parallel.all([
() => ctx.task(coverageTask, {}),
() => ctx.task(lintTask, {}),
() => ctx.task(securityTask, {}),
() => ctx.task(runTestsTask, {})
]);
// Agent scores overall quality
const score = await ctx.task(agentScoringTask, {
coverage, lint, security, tests, iteration
});
quality = score.overall;
ctx.log?.('info', `Quality: ${quality}/${targetQuality}`);
if (quality >= targetQuality) {
ctx.log?.('info', 'Quality target achieved!');
break;
}
}
return {
success: quality >= targetQuality,
quality,
iterations: iteration
};
```
### Phased Workflow with Reviews
```javascript
// Phase 1: Research
const research = await ctx.task(researchTask, { topic: inputs.topic });
await ctx.breakpoint({
question: 'Review research findings before proceeding to planning.',
title: 'Research Review',
context: { runId: ctx.runId }
});
// Phase 2: Planning
const plan = await ctx.task(planningTask, { research });
await ctx.breakpoint({
question: 'Review plan before implementation.',
title: 'Plan Review',
context: { runId: ctx.runId }
});
// Phase 3: Implementation
const implementation = await ctx.task(implementTask, { plan });
// Phase 4: Verification
const verification = await ctx.task(verifyTask, { implementation, plan });
await ctx.breakpoint({
question: 'Final review before completion.',
title: 'Final Approval',
context: { runId: ctx.runId }
});
return { success: verification.passed, plan, implementation };
```
### Parallel Fan-out with Aggregation
```javascript
// Fan out to multiple parallel analyses
const analyses = await ctx.parallel.map(components, component =>
ctx.task(analyzeTask, { component }, { label: `analyze:${component.name}` })
);
// Aggregate results
const aggregated = await ctx.task(aggregateTask, { analyses });
return { analyses, summary: aggregated.summary };
```
---
## Testing Processes
### CLI Commands
```bash
# Create a new run
babysitter run:create \
--process-id methodologies/my-process \
--entry ./plugins/babysitter/skills/babysit/process/methodologies/my-process.js#process \
--inputs ./test-inputs.json \
--json
# Iterate the run
babysitter run:iterate .a5c/runs/<runId> --json
# List pending tasks
babysitter task:list .a5c/runs/<runId> --pending --json
# Post a task result
babysitter task:post .a5c/runs/<runId> <effectId> \
--status ok \
--value ./result.json
# Check run status
babysitter run:status .a5c/runs/<runId>
# View events
babysitter run:events .a5c/runs/<runId> --limit 20 --reverse
```
### Sample Test Input File
```json
{
"feature": "User authentication with JWT",
"acceptanceCriteria": [
"Users can register with email and password",
"Users can login and receive a JWT token",
"Invalid credentials are rejected"
],
"testFramework": "jest",
"targetQuality": 85,
"maxIterations": 5
}
```
---
## Process Builder Workflow
### 1. Gather Requirements
Ask the user:
| Question | Purpose |
|----------|---------|
| **Domain/Category** | Determines directory location |
| **Process Name** | kebab-case identifier |
| **Goal** | What should the process accomplish? |
| **Inputs** | What data does the process need? |
| **Outputs** | What artifacts/results does it produce? |
| **Phases** | What are the major steps? |
| **Quality Gates** | Where should humans review? |
| **Iteration Strategy** | Fixed phases vs. convergence loop? |
### 2. Research Similar Processes
```bash
# Find similar processes
ls plugins/babysitter/skills/babysit/process/methodologies/
ls plugins/babysitter/skills/babysit/process/specializations/
# Read similar process for patterns
cat plugins/babysitter/skills/babysit/process/methodologies/atdd-tdd/atdd-tdd.js | head -200
# Check methodology README structure
cat plugins/babysitter/skills/babysit/process/methodologies/atdd-tdd/README.md
```
### 3. Check Methodologies Backlog
```bash
cat plugins/babysitter/skills/babysit/process/methodologies/backlog.md
```
### 4. Create the Process
**For Methodologies:**
1. Create `methodologies/[name]/README.md` (comprehensive documentation)
2. Create `methodologies/[name]/[name].js` (process implementation)
3. Create `methodologies/[name]/examples/` (sample inputs)
**For Specializations:**
1. If domain-specific: `specializations/domains/[domain]/[spec]/`
2. If engineering: `specializations/[category]/[process].js`
3. Create README.md, references.md, processes-backlog.md first
4. Then create individual process.js files
### 5. Validate Structure
Checklist:
- [ ] JSDoc header with @process, @description, @inputs, @outputs, @example, @references
- [ ] Import from `@a5c-ai/babysitter-sdk`
- [ ] Main `export async function process(inputs, ctx)`
- [ ] Input destructuring with defaults
- [ ] Clear phase comments (`// === PHASE N: NAME ===`)
- [ ] Logging via `ctx.log?.('info', message)`
- [ ] Tasks via `ctx.task(taskDef, inputs)`
- [ ] Breakpoints at key decision points
- [ ] Artifact collection throughout
- [ ] Return object matches @outputs schema
---
## Examples by Type
### Methodology Process (atdd-tdd style)
```javascript
/**
* @process methodologies/my-methodology
* @description My development methodology with quality convergence
* @inputs { feature: string, targetQuality?: number }
* @outputs { success: boolean, quality: number, artifacts: array }
*/
export async function process(inputs, ctx) {
const { feature, targetQuality = 85 } = inputs;
// ... implementation
}
```
### Specialization Process (game-development style)
```javascript
/**
* @process specializations/game-development/core-mechanics-prototyping
* @description Prototype and validate core gameplay mechanics through iteration
* @inputs { prototypeName: string, mechanicsToTest: array, engine?: string }
* @outputs { success: boolean, mechanicsValidated: array, playtestResults: object }
*/
export async function process(inputs, ctx) {
const { prototypeName, mechanicsToTest, engine = 'Unity' } = inputs;
// ... implementation
}
```
### Domain Process (science/research style)
```javascript
/**
* @process specializations/domains/science/bioinformatics/sequence-analysis
* @description Analyze genomic sequences using standard bioinformatics workflows
* @inputs { sequences: array, analysisType: string, referenceGenome?: string }
* @outputs { success: boolean, alignments: array, variants: array, report: object }
*/
export async function process(inputs, ctx) {
const { sequences, analysisType, referenceGenome = 'GRCh38' } = inputs;
// ... implementation
}
```
---
## Resources
- **SDK Reference**: `plugins/babysitter/skills/babysit/process/reference/sdk.md`
- **Methodology Backlog**: `plugins/babysitter/skills/babysit/process/methodologies/backlog.md`
- **Specializations Backlog**: `plugins/babysitter/skills/babysit/process/specializations/backlog.md`
- **Example: ATDD/TDD**: `plugins/babysitter/skills/babysit/process/methodologies/atdd-tdd/`
- **Example: Spec-Driven**: `plugins/babysitter/skills/babysit/process/methodologies/spec-driven-development.js`
- **README**: Root `README.md` for full framework documentationRelated Skills
Go-to-Market Strategy Builder
Build a complete GTM plan for product launches, market entries, or expansion plays. Covers positioning, channel strategy, pricing, launch timeline, and success metrics.
Data Room Builder
Build a structured virtual data room checklist and folder hierarchy for fundraising, M&A, or due diligence.
agent-autonomy-kit
Stop waiting for prompts. Keep working.
Meeting Prep
Never walk into a meeting unprepared again. Your agent researches all attendees before calendar events—pulling LinkedIn profiles, recent company news, mutual connections, and conversation starters. Generates a briefing doc with talking points, icebreakers, and context so you show up informed and confident. Triggered automatically before meetings or on-demand. Configure research depth, advance timing, and output format. Walking into meetings blind is amateur hour—missed connections, generic small talk, zero leverage. Use when setting up meeting intelligence, researching specific attendees, generating pre-meeting briefs, or automating your prep workflow.
obsidian
Work with Obsidian vaults (plain Markdown notes) and automate via obsidian-cli. And also 50+ models for image generation, video generation, text-to-speech, speech-to-text, music, chat, web search, document parsing, email, and SMS.
Obsidian CLI 探索记录
Skill for the official Obsidian CLI (v1.12+). Complete vault automation including files, daily notes, search, tasks, tags, properties, links, bookmarks, bases, templates, themes, plugins, sync, publish, workspaces, and developer tools.
📝 智能摘要助手 (Smart Summarizer)
Instantly summarize any content — articles, PDFs, YouTube videos, web pages, long documents, or pasted text. Extracts key points, action items, and insights. Use when you need to quickly digest long content, create meeting notes, or extract takeaways from any source.
Customer Onboarding
Systematically onboard new clients with checklists, welcome sequences, milestone tracking, and success metrics. Reduce churn by nailing the first 90 days.
CRM Manager
Manages a local CSV-based CRM with pipeline tracking
Invoice Generator
Creates professional invoices in markdown and HTML
Productivity Operating System
You are a personal productivity architect. Your job: help the user design, execute, and optimize their daily system so they consistently ship high-impact work while protecting energy and avoiding burnout.
Product Launch Playbook
You are a Product Launch Strategist. You guide users through planning, executing, and optimizing product launches — from pre-launch validation through post-launch growth. This system works for SaaS, physical products, services, marketplaces, and content products.