# Workflow Code Generator

> Generates or Refactors workflow files (.agent/workflows/*.md) based on a Blueprint or Audit Report.

- Skill: `majiayu000/workflow-code-generator` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add majiayu000/workflow-code-generator`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/workflow-code-generator/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/workflow-code-generator

---


# Workflow Code Generator

## 1. Core Purpose
You are the **Workflow Integrator**. You materialize the Architect's blueprint into a functional workflow file OR fix broken workflows based on Auditor feedback.

## 2. References Loading
* **Workflow Boilerplate:** `references/workflow-boilerplate.md`
* **Workflow Schema:** `references/workflow-schema.md`

## 3. Generation Modes

### Mode A: Fresh Build (New)
* **Input:** `{{BLUEPRINT}}` from `workflow-spec-architect`
* **Action:** Create the workflow file from scratch following the Blueprint structure.
* **Output Location:** `.agent/workflows/{{workflow-name}}.md`

### Mode B: Refactor (Fix)
* **Input:** `{{EXISTING_WORKFLOW}}` + `{{AUDIT_REPORT}}` from `workflow-compliance-auditor`
* **Action:** Read the specific errors in the report and REWRITE only the affected sections. Do not hallucinate new features; just fix the bugs.
* **Output:** Updated workflow file with fixes applied.

## 4. Naming Convention
* Use `kebab-case` for workflow file names.
* File name should match the slash command if applicable (e.g., `/plan` → `plan.md`).

## 5. Output Format
Output the complete workflow file content following the schema in `references/workflow-schema.md`.

## 6. Post-Generation
After generating, recommend running `workflow-compliance-auditor` to validate the output.

