process-generator

Generate process JS files following Babysitter SDK patterns including task definitions, quality gates, breakpoints, and proper io configuration.

509 stars

Best use case

process-generator is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Generate process JS files following Babysitter SDK patterns including task definitions, quality gates, breakpoints, and proper io configuration.

Teams using process-generator should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/process-generator/SKILL.md --create-dirs "https://raw.githubusercontent.com/a5c-ai/babysitter/main/library/specializations/meta/skills/process-generator/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/process-generator/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How process-generator Compares

Feature / Agentprocess-generatorStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Generate process JS files following Babysitter SDK patterns including task definitions, quality gates, breakpoints, and proper io configuration.

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

SKILL.md Source

# process-generator

You are **process-generator** - a specialized skill for generating Babysitter SDK process files with proper structure, task definitions, and quality gates.

## Overview

This skill generates complete process JS files including:
- JSDoc metadata headers
- Process function structure
- Task definitions with defineTask
- Quality gates and breakpoints
- Proper io configuration

## Capabilities

### 1. Process File Generation

Generate complete process files:

```javascript
/**
 * @process specialization/process-name
 * @description Process description
 * @inputs { param1: type, param2: type }
 * @outputs { result: type, artifacts: array }
 */

import { defineTask } from '@a5c-ai/babysitter-sdk';

export async function process(inputs, ctx) {
  const { param1, param2 = 'default' } = inputs;
  const artifacts = [];

  // Phase 1
  ctx.log('info', 'Phase 1: Description');
  const result1 = await ctx.task(task1, { param1 });
  artifacts.push(...result1.artifacts);

  // Breakpoint
  await ctx.breakpoint({
    question: 'Review phase 1?',
    title: 'Phase 1 Review',
    context: { runId: ctx.runId, files: artifacts }
  });

  return { success: true, artifacts };
}

export const task1 = defineTask('task-name', (args, taskCtx) => ({
  kind: 'agent',
  title: 'Task title',
  skill: { name: 'skill-name' },
  agent: {
    name: 'agent-name',
    prompt: {
      role: 'Role description',
      task: 'Task description',
      context: args,
      instructions: ['instruction1', 'instruction2'],
      outputFormat: 'JSON with fields...'
    },
    outputSchema: {
      type: 'object',
      required: ['field1'],
      properties: {
        field1: { type: 'string' }
      }
    }
  },
  io: {
    inputJsonPath: `tasks/${taskCtx.effectId}/input.json`,
    outputJsonPath: `tasks/${taskCtx.effectId}/result.json`
  },
  labels: ['agent', 'category']
}));
```

### 2. Task Definition Patterns

Support multiple task kinds:
- `agent` - LLM agent tasks
- `skill` - Claude Code skill tasks
- `node` - Node.js script tasks
- `shell` - Shell script tasks
- `breakpoint` - Human approval gates

### 3. Quality Gate Placement

Add quality gates at decision points:

```javascript
// Quality scoring task
const qualityScore = await ctx.task(qualityScoringTask, {
  artifact: result.artifact,
  criteria: ['completeness', 'accuracy']
});

const qualityMet = qualityScore.score >= 80;
```

### 4. Breakpoint Strategy

Place breakpoints strategically:

```javascript
await ctx.breakpoint({
  question: 'Clear question for human review',
  title: 'Descriptive Title',
  context: {
    runId: ctx.runId,
    files: artifacts.map(a => ({
      path: a.path,
      format: a.format,
      label: a.label
    })),
    summary: { key: 'value' }
  }
});
```

## Output Format

```json
{
  "processFile": "path/to/process.js",
  "taskCount": 5,
  "breakpointCount": 2,
  "qualityGateCount": 1,
  "code": "// Full process code",
  "artifacts": [
    {
      "path": "path/to/process.js",
      "type": "javascript",
      "label": "Process file"
    }
  ]
}
```

## Process Integration

This skill integrates with:
- `process-creation.js` - Primary process generation
- `phase3-implement-processes.js` - Batch process creation
- `specialization-creation.js` - Full specialization workflow

## Best Practices

1. **Clear Phases**: Organize into logical phases
2. **Proper Logging**: Use ctx.log for observability
3. **Error Handling**: Handle failures gracefully
4. **Artifact Tracking**: Track all generated files
5. **Output Schema**: Define clear output schemas

## Constraints

- Follow SDK patterns exactly
- Use kebab-case for task names
- Include JSDoc metadata
- Add labels to task definitions
- Use proper io paths

Related Skills

process-builder

509
from a5c-ai/babysitter

Scaffold new babysitter process definitions following SDK patterns, proper structure, and best practices. Guides the 3-phase workflow from research to implementation.

Workflow & Productivity

color-palette-generator

509
from a5c-ai/babysitter

Generate accessible color palettes with WCAG compliance

tracing-schema-generator

509
from a5c-ai/babysitter

Generate distributed tracing schemas for OpenTelemetry with Jaeger/Zipkin integration

metrics-schema-generator

509
from a5c-ai/babysitter

Generate metrics schemas for Prometheus, OpenTelemetry, and Grafana dashboards

markdown-processor

509
from a5c-ai/babysitter

Specialized skill for processing Markdown and MDX documentation. Supports parsing, rendering, TOC generation, link validation, frontmatter processing, and diagram embedding.

log-schema-generator

509
from a5c-ai/babysitter

Generate structured logging schemas with correlation ID patterns and ELK/Splunk integration

load-test-generator

509
from a5c-ai/babysitter

Generate load test scripts for k6, Locust, and Gatling from OpenAPI specs

graphql-schema-generator

509
from a5c-ai/babysitter

Generate GraphQL schemas from data models with resolver stubs and federation support

docs-site-generator

509
from a5c-ai/babysitter

Generate documentation sites using Docusaurus, MkDocs, or VuePress

dependency-graph-generator

509
from a5c-ai/babysitter

Generate module dependency graphs with circular dependency detection and coupling metrics

dashboard-generator

509
from a5c-ai/babysitter

Generate monitoring dashboards for Grafana and DataDog with alert integration

c4-diagram-generator

509
from a5c-ai/babysitter

Specialized skill for generating C4 model architecture diagrams. Supports Structurizr DSL, PlantUML, and Mermaid formats with multi-level abstraction (Context, Container, Component, Code).