Skip to content

mit17k/claude-code-workflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude Code Workflow Factory

A meta-toolkit for creating optimized Claude Code workflows. Generate complete, production-ready workflows with commands, skills, agents, hooks, and documentation.

Features

  • Intelligent Artifact Selection - Decision tree for choosing optimal artifact types
  • Context Detection - Auto-detect project language, framework, and conventions
  • Quality Patterns - Production-ready security, formatting, CI/CD patterns
  • Automated Validation - Validator agent checks all artifacts
  • Complete Templates - All 12 hook events, context:fork, async hooks, skill preloading

Installation

Option 1: As a Plugin (Recommended)

# Add marketplace
/plugin marketplace add mit17k/claude-code-workflow

# Install plugin
/plugin install claude-code-workflow --scope project

Or use the interactive UI:

/plugin
# → Marketplaces tab → Add → "mit17k/claude-code-workflow"
# → Discover tab → Search "claude-code-workflow" → Install

Option 2: Local Testing

claude --plugin-dir ./plugin/claude-code-workflow

Usage

Create a New Workflow

/claude-code-workflow:workflow Create <name>. <description>

Example:

/claude-code-workflow:workflow Create code-review. Automated code review with security scanning, performance analysis, and quality checks. Should use subagents for parallel analysis.

This generates:

  • Commands in .claude/commands/
  • Skills in .claude/skills/
  • Agents in .claude/agents/
  • Hooks in .claude/settings.json
  • Documentation in docs/claude-code/<name>-workflow.md

Update an Existing Workflow

/claude-code-workflow:workflow Update <doc-path>. <changes to make>

Example:

/claude-code-workflow:workflow Update docs/claude-code/code-review-workflow.md. Add test coverage checking and fail if below 80%.

Examples

Test-Driven Development

/claude-code-workflow:workflow Create tdd. TDD workflow that generates tests before implementation. Follow red-green-refactor pattern.

Security Review

/claude-code-workflow:workflow Create security-review. Security-focused code review for auth and input validation. Use parallel agents for OWASP analysis.

Auto-Formatting

/claude-code-workflow:workflow Create format. Auto-format code on save using project's existing formatter.

Architecture

Plugin Structure

plugin/claude-code-workflow/
├── .claude-plugin/
│   ├── plugin.json         # Plugin metadata
│   └── marketplace.json    # Marketplace registry
├── commands/claude/
│   └── workflow.md         # Main workflow factory command
├── skills/
│   ├── artifact-selector/  # Artifact type decision tree
│   ├── context-detector/   # Project detection
│   ├── quality-patterns/   # Security/formatting patterns
│   └── workflow-optimization/ # Token optimization rules
├── agents/
│   └── workflow-validator.md
├── templates/              # Reference templates
│   ├── command.template.md
│   ├── skill.template.md
│   ├── agent.template.md
│   ├── hook.template.md
│   ├── claude-md.template.md
│   └── workflow-doc.template.md
└── README.md

CREATE Flow

[/claude-code-workflow:workflow Create <name>. <description>]
                    │
                    ▼
        ┌───────────────────────┐
        │ 1. Parse Arguments    │
        │    Extract: name, desc│
        └───────────────────────┘
                    │
                    ▼
        ┌───────────────────────┐
        │ 2. Detect Context     │  ◄─── context-detector skill
        │    Language/Framework │
        │    Existing patterns  │
        └───────────────────────┘
                    │
                    ▼
        ┌───────────────────────┐
        │ 3. Select Artifacts   │  ◄─── artifact-selector skill
        │    Decision tree      │
        │    Redundancy check   │
        └───────────────────────┘
                    │
                    ▼
        ┌───────────────────────┐
        │ 4. Read Templates     │  ◄─── Updated templates
        │    All 12 hook events │
        │    context:fork       │
        │    async, prompt/agent│
        └───────────────────────┘
                    │
                    ▼
        ┌───────────────────────┐
        │ 5. Generate Artifacts │  ◄─── quality-patterns skill
        │    Apply optimization │
        │    Match conventions  │
        └───────────────────────┘
                    │
                    ▼
        ┌───────────────────────┐
        │ 6. Validate           │  ◄─── workflow-validator agent
        │    Check all artifacts│
        │    Verify dependencies│
        │    Test hooks         │
        └───────────────────────┘
                    │
                    ▼
        ┌───────────────────────┐
        │ 7. Document           │
        │    Create/Update docs │
        │    Add changelog      │
        └───────────────────────┘

UPDATE Flow

[/claude-code-workflow:workflow Update <doc-path>. <changes>]
                    │
                    ▼
        ┌───────────────────────┐
        │ Read Workflow Doc     │
        │ Parse artifact list   │
        └───────────────────────┘
                    │
                    ▼
        ┌───────────────────────┐
        │ Analyze Changes       │
        │ Map to artifacts      │
        └───────────────────────┘
                    │
                    ▼
        ┌───────────────────────┐
        │ Apply Modifications   │
        │ Update each artifact  │
        └───────────────────────┘
                    │
                    ▼
        ┌───────────────────────┐
        │ Validate Changes      │  ◄─── workflow-validator agent
        └───────────────────────┘
                    │
                    ▼
        ┌───────────────────────┐
        │ Update Documentation  │
        │ Add changelog entry   │
        └───────────────────────┘

Component Interactions

                    ┌─────────────────────────┐
                    │  /claude:workflow       │
                    │  (main command)         │
                    └───────────┬─────────────┘
                                │
            ┌───────────────────┼───────────────────┐
            │                   │                   │
            ▼                   ▼                   ▼
    ┌───────────────┐   ┌───────────────┐   ┌───────────────┐
    │ context-      │   │ artifact-     │   │ quality-      │
    │ detector      │   │ selector      │   │ patterns      │
    │ skill         │   │ skill         │   │ skill         │
    └───────────────┘   └───────────────┘   └───────────────┘
            │                   │                   │
            └───────────────────┼───────────────────┘
                                │
                                ▼
                    ┌─────────────────────────┐
                    │  workflow-validator     │
                    │  agent                  │
                    └─────────────────────────┘

What Gets Generated

Artifact Location Purpose
Commands .claude/commands/ User-invoked slash commands
Skills .claude/skills/ Auto-invoked knowledge bases
Agents .claude/agents/ Specialized subagents
Hooks .claude/settings.json Lifecycle event handlers
Documentation docs/claude-code/ Workflow docs (enables updates)

Included Components

Skills

Skill Description
artifact-selector Decision tree for choosing artifact types
context-detector Project language/framework detection
quality-patterns Security, formatting, CI/CD hook patterns
workflow-optimization Token optimization rules and validation

Agents

Agent Description
workflow-validator Read-only artifact validation

Templates

Template Purpose
command.template.md Slash command structure
skill.template.md Model-invoked skill structure
agent.template.md Subagent definitions
hook.template.md Lifecycle hook configuration (all 12 events)
claude-md.template.md Project memory files
workflow-doc.template.md Workflow documentation

Development

Local Testing

claude --plugin-dir ./plugin/claude-code-workflow

Making Changes

All plugin content lives in plugin/claude-code-workflow/. Edit files there directly.

See CLAUDE.md for detailed guidance on modifying the plugin.

Publishing Updates

  1. Update version in plugin/claude-code-workflow/.claude-plugin/plugin.json
  2. Commit and push to GitHub

Troubleshooting

Plugin not found

/plugin marketplace list
# Verify mit17k/claude-code-workflow is listed

Command not available

/plugin
# Check claude-code-workflow in Installed tab

Skills not activating

Skills are auto-invoked based on context. Try mentioning:

  • "design a workflow" (triggers artifact-selector)
  • "detect project type" (triggers context-detector)
  • "add security hooks" (triggers quality-patterns)

Requirements

License

MIT

About

Claude Code Workflow Factory Plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors