Agent skill

skills-workflows

Design multi-skill workflow systems with artifact-based state handoff. Use when building skill pipelines, sequenced workflows, or when "workflow system", "skill pipeline", "state handoff", or "artifacts" are mentioned.

Stars 26
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/outfitter-dev/agents/tree/main/plugins/outfitter/skills/skills-workflows

Metadata

Additional technical details for this skill

version
1.0.0
related skills
[
    "skills-dev",
    "claude-skills",
    "codify"
]

SKILL.md

Skills Workflows

Design skill systems that chain together with artifact-based state passing.

Steps

  1. Load the outfitter:skills-dev skill for base skill authoring
  2. Apply workflow patterns from this skill
  3. If Claude-specific features needed, load the outfitter:claude-skills skill

<when_to_use>

  • Building multi-skill pipelines (triage → plan → implement → review)
  • Designing state handoff between workflow steps
  • Creating deterministic preprocessing with !command syntax
  • Setting up shared conventions (artifacts/, context.md)
  • Choosing fork vs inherit for workflow isolation

NOT for: single standalone skills, one-off commands, simple patterns

</when_to_use>

Shared Conventions

Every workflow system benefits from standard file locations:

text
.claude/
  skills/
    _shared/
      context.md       # Living summary of current task + decisions
      constraints.md   # Non-negotiables (security, style, perf budgets)
    triage/SKILL.md
    plan/SKILL.md
    implement/SKILL.md
    review/SKILL.md
artifacts/
  triage.md           # Output of /triage
  plan.md             # Output of /plan
  test-report.md      # Output of /test
  review-notes.md     # Output of /review
scripts/
  run-tests.sh
  security-check.sh
File Purpose Updated By
context.md Task state, decisions made, current focus Each skill as work progresses
constraints.md Project invariants, security rules, style guide Setup once, rarely changed
artifacts/{step}.md Step outputs, consumed by next step The skill that completes that step

State Passing Discipline

Each skill reads from previous artifacts and writes its own:

text
/triage → writes artifacts/triage.md
    ↓
/plan reads artifacts/triage.md → writes artifacts/plan.md
    ↓
/implement reads artifacts/plan.md → updates context.md
    ↓
/test reads artifacts/plan.md → writes artifacts/test-report.md
    ↓
/review reads all → writes artifacts/review-notes.md

Artifact Format

Each artifact should be self-contained and parseable:

markdown
# Triage: {task description}

## Problem Statement
{clear definition}

## Scope
- Files: {list}
- Modules: {list}

## Acceptance Criteria
- [ ] {criterion 1}
- [ ] {criterion 2}

## Risks
- {risk 1}
- {risk 2}

---
Generated by /triage at {timestamp}

Preprocessing with !command

The !command syntax runs shell commands before prompt reaches Claude. Claude sees rendered output, not the command. IMPORTANT: The "!" must precede the opening backtick for a command.

text
---
name: pr-summary
context: fork
agent: Explore
allowed-tools: Bash(gh:*)
---

## Pull Request Context
<!-- NOTE: The "!" must be placed in front of backticks for preprocessing to work. -->
- **Diff**: `gh pr diff`
- **Comments**: `gh pr view --comments`
- **Status**: `gh pr status`

Summarize changes and highlight risks.

When to Preprocess

Use Case Preprocessing Why
Git status git status Deterministic snapshot
PR context gh pr diff Avoid tool call overhead
Schema info psql -c "\\d table" Fresh at invocation
Env info echo $NODE_ENV Runtime context

When NOT to Preprocess

  • Dynamic queries based on conversation (use tools instead)
  • Large outputs that bloat context
  • Commands with side effects (never preprocess mutations)

Fork vs Inherit

Context Use When Example
inherit (default) Skill needs conversation history Implementation skills
fork Clean-room analysis, no chat noise Research, review, triage

Fork Pattern

yaml
---
name: triage
context: fork
agent: Explore
allowed-tools: Read, Grep, Glob
---

Fork benefits:

  • Prevents context pollution from prior conversation
  • Enables parallel execution
  • Returns only the focused output

Inherit Pattern

yaml
---
name: implement
# context: inherit is default
---

Inherit when:

  • Skill needs prior decisions/context
  • Building on previous work
  • Conversation history is valuable

Workflow Isolation Patterns

Analysis Skills → Fork

yaml
# triage, review, research skills
context: fork
agent: Explore
allowed-tools: Read, Grep, Glob

Read-only, returns summary.

Planning Skills → Fork with Plan

yaml
# plan, spec, architecture skills
context: fork
agent: Plan
allowed-tools: Read, Grep, Glob

Deliberative, returns structured plan.

Implementation Skills → Inherit

yaml
# implement, fix, refactor skills
# No context/agent fields (inherit default)

Needs full context, makes changes.

Side-Effect Skills → User-Invoked Only

yaml
# deploy, ship, commit skills
disable-model-invocation: true

Never auto-triggered, explicit human decision.

Failure Mode Mitigations

Failure Mode Mitigation
Context blowup Keep analysis in context: fork; store results in artifacts
State lost between steps All state in files, not conversation
Unsafe auto-execution disable-model-invocation: true on side-effect skills
Tool permission creep Explicit allowed-tools per skill, minimal set
Workflow step skipped Artifacts serve as gates (next step reads previous)

SKILL.md Template for Workflow Steps

markdown
---
name: {step-name}
description: {what this step does}. Use when {trigger conditions}.
context: fork           # or omit for inherit
agent: Explore          # if forked
allowed-tools: Read, Grep, Glob
disable-model-invocation: true  # if side-effectful
---

# Purpose

- Why this step exists
- What "done" looks like

# Inputs

- Read: artifacts/{previous-step}.md
- Read: .claude/skills/_shared/constraints.md
- $ARGUMENTS: {expected input}

# Process

1. {step 1}
2. {step 2}
3. {step 3}

# Outputs

- Write: artifacts/{this-step}.md
- Update: .claude/skills/_shared/context.md with decisions

# Constraints

- {constraint 1}
- {constraint 2}

ALWAYS:

  • Use artifacts/ for state passing between skills
  • Keep context.md updated with decisions
  • Fork analysis skills to prevent context pollution
  • Use disable-model-invocation: true for side-effect skills
  • Minimize allowed-tools to required set

NEVER:

  • Store state in conversation alone (lost on compaction)
  • Auto-invoke deploy/commit/ship skills
  • Mix analysis and mutation in one forked skill
  • Skip artifact gates between workflow steps
  • workflow-templates.md — 10 complete workflow templates
  • state-handoff.md — Artifact patterns and examples
  • preprocessing.md — !command syntax and patterns

Expand your agent's capabilities with these related and highly-rated skills.

outfitter-dev/agents

stack-feedback

Creates GitHub issues for problems discovered while using @outfitter/* packages. Use when finding bugs, missing features, unclear documentation, or improvement opportunities.

26 0
Explore
outfitter-dev/agents

stack-architecture

Design stack-based systems using @outfitter/* packages. Use when planning new projects, choosing packages, designing handler architecture, or when "architecture", "design", "structure", "plan handlers", or "error taxonomy" are mentioned.

26 0
Explore
outfitter-dev/agents

stack-templates

Templates for creating handlers, CLI commands, MCP tools, and daemon services following Outfitter Stack conventions. Use when scaffolding new components, creating handlers, adding commands, or when "create handler", "new command", "add tool", "scaffold", "template", or "daemon service" are mentioned.

26 0
Explore
outfitter-dev/agents

stack-audit

Scan codebase for Outfitter Stack adoption candidates. Identifies throw statements, console usage, hardcoded paths, and custom errors. Use when assessing adoption scope or checking readiness.

26 0
Explore
outfitter-dev/agents

stack-review

Audits code for Outfitter Stack compliance including Result types, error handling, logging patterns, and path safety. Use for pre-commit reviews, code quality checks, migration validation, or when "audit", "check compliance", "review stack", or "stack patterns" are mentioned.

26 0
Explore
outfitter-dev/agents

stack-patterns

Reference for Outfitter Stack patterns including Result types, Handler contract, Error taxonomy, and @outfitter/* package conventions. Use when learning the stack, looking up patterns, understanding packages, or when "Result", "Handler", "error taxonomy", "OutfitterError", "CLI output", "pagination", "MCP server", "MCP tool", "structured logging", "redaction", "test handler", "daemon", "IPC", or "@outfitter/*" are mentioned.

26 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results