Skip to content
automation-builder logo

Automation Builder

automation-builder

Analyze codebases and generate Claude Code automation infrastructure including commands, scripts, and templates for systematic task execution. Use when the user wants to create reusable automation workflows, generate .claude/commands files, create supporting bash/python scripts, build markdown te...

SKILL.md

Full skill instructions

Automation Builder

Generate Claude Code automation infrastructure: commands (.claude/​commands/​*.md), scripts (.claude/​scripts/​bash/​*.sh), and templates (.claude/​templates/​*.md).

Workflow

Discovery → Design → Generate → Validate → Integrate
  1. Discovery: Analyze codebase, gather requirements through questions
  2. Design: Plan components needed (commands, scripts, templates)
  3. Generate: Create the automation files
  4. Validate: Test generated artifacts
  5. Integrate: Set up handoffs between commands

Discovery Phase

Codebase Analysis

First, understand the project structure:

# Identify project type and existing automation
find . -name "package.json" -o -name "pyproject.toml" -o -name "Cargo.toml" 2>/​dev/​null | head -5
ls -la .claude/ 2>/​dev/​null || echo "No .claude directory"
find . -name "*.sh" -path "*/​scripts/​*" 2>/​dev/​null | head -10

Look for:

  • Project type (monorepo, library, application)
  • Existing .claude/ structure
  • Current automation patterns (Makefiles, scripts, CI configs)
  • Technology stack and frameworks

Requirements Questions

Ask these targeted questions based on what the user needs:

Task Scope:

  • What workflow or task needs automation?
  • Is this repeatable or one-time?
  • What are the inputs and outputs?

Execution Model:

  • Interactive (requires decisions) or fully automated?
  • What validation is needed?
  • How should errors be handled?

Integration:

  • Should this connect to other commands via handoffs?
  • Are there existing patterns to follow?
  • Any compliance or standards requirements?

Design Phase

Component Selection

NeedComponentLocation
Interactive workflow with decisionsCommand.claude/​commands/​task.md
Deterministic automationScript.claude/​scripts/​bash/​task.sh
Structured output formatTemplate.claude/​templates/​output.md

Architecture Patterns

Command-First (interactive): Command calls scripts, uses templates Script-First (automation): Script generates output from templates
Hybrid (orchestrated): Command coordinates multiple scripts with checkpoints

Generate Phase

Command Structure

Commands in .claude/​commands/​*.md:

---
description: One-line description for command discovery
handoffs:
  - label: Next Step
    agent: target-command
    prompt: Context for handoff
---

## User Input

```text
$ARGUMENTS

[Parse user arguments here]

Purpose

[What this command does and when to use it]

Workflow

  1. Step Name: Description
    • Decision points with outcomes

Completion Criteria

  • Success condition

See `references/​command-patterns.md` for detailed examples.

### Script Structure

Scripts in `.claude/​scripts/​bash/​*.sh`:

```bash
#!/​usr/​bin/​env bash
# Description of what script does
#
# Usage: ./​script.sh [OPTIONS] [ARGS]
#
# OPTIONS:
#   --json    Output JSON for command parsing
#   --help    Show help

set -e

# Parse arguments
JSON_MODE=false
for arg in "$@"; do
    case "$arg" in
        --json) JSON_MODE=true ;;
        --help|-h) sed -n '2,/^[^#]/​p' "$0" | sed 's/^# \?//'; exit 0 ;;
    esac
done

# Main logic here

# Output results
if $JSON_MODE; then
    echo '{"status":"success","data":{}}'
else
    echo "Results..."
fi

See references/​script-patterns.md for detailed examples.

Template Structure

Templates in .claude/​templates/​*.md:

# Template Title

<!--
Purpose: What this template is for
Updated by: Which command/​script populates this
-->

**Last Updated**: [TIMESTAMP]
**Status**: [STATUS]

---

## Section

| Field | Value |
|-------|-------|
| Item  | [PLACEHOLDER] |

<!-- Guidance for complex sections -->

See references/​template-patterns.md for detailed examples.

Validate Phase

After generating, validate:

  1. Command YAML: Check frontmatter syntax
  2. Script syntax: Run bash -n script.sh or shellcheck script.sh
  3. Cross-references: Verify handoff targets exist
  4. Template placeholders: Ensure consistency

Integrate Phase

Handoff Configuration

Connect commands in YAML frontmatter:

handoffs:
  - label: "Continue"
    agent: next-command
    prompt: "Context message"
    send: true  # Auto-execute

Script References

Reference scripts from commands:

Run `.claude/​scripts/​bash/​check.sh --json` from project root.

Parse response:
```json
{"status":"success|error","data":{}}

### Memory/​State Files

For persistent state across command runs:

.claude/​memory/ ├── status.md # Progress tracking └── decisions.md # Decision log


## Directory Layout

.claude/ ├── commands/ │ ├── task.md │ └── task-subtask.md ├── scripts/ │ ├── bash/ │ │ ├── common.sh │ │ ├── setup-.sh │ │ └── check-.sh │ └── python/ │ └── helpers.py ├── templates/ │ └── *-template.md └── memory/ └── *.md


## Resources

### References

- `references/​command-patterns.md` - Command authoring patterns
- `references/​script-patterns.md` - Bash/​Python script patterns
- `references/​template-patterns.md` - Template design patterns

### Scripts

- `scripts/​init-automation.sh` - Initialize .claude/ structure
- `scripts/​validate-automation.sh` - Validate generated artifacts

### Assets

- `assets/​command-template.md` - Starter command template
- `assets/​script-template.sh` - Starter script template
- `assets/​output-template.md` - Starter output template

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View