Skip to content
Back to skills

441 Workflow Patterns E7893632

ASecurity

Patterns for structuring multi-step workflows and decision logic in skills.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
code-qualitydebugging

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 441-workflow-patterns_e7893632 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 441 Workflow Patterns E7893632?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 441 Workflow Patterns E7893632
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-441-workflow-patterns-e7893632/badge)](https://www.skillsdirectory.com/skills/tools-only-441-workflow-patterns-e7893632)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Workflow Patterns

Patterns for structuring multi-step workflows and decision logic in skills.

## Sequential Workflows

Break complex tasks into numbered steps. Give an overview early in SKILL.md so the agent knows the full process before starting.

```markdown
Filling a PDF form involves these steps:

1. Analyze the form (run analyze_form.py)
2. Create field mapping (edit fields.json)
3. Validate mapping (run validate_fields.py)
4. Fill the form (run fill_form.py)
5. Verify output (run verify_output.py)
```

For particularly complex workflows, provide a checklist the agent can track:

```markdown
Copy this checklist and track progress:

- [ ] Step 1: Analyze the form
- [ ] Step 2: Create field mapping
- [ ] Step 3: Validate mapping
- [ ] Step 4: Fill the form
- [ ] Step 5: Verify output
```

## Conditional Workflows

Guide agents through decision points with clear branching:

```markdown
1. Determine the modification type:

   **Creating new content?** → Follow "Creation workflow" below
   **Editing existing content?** → Follow "Editing workflow" below

2. Creation workflow:
   - Use docx-js library
   - Build document from scratch
   - Export to .docx format

3. Editing workflow:
   - Unpack existing document
   - Modify XML directly
   - Validate after each change
   - Repack when complete
```

When branches get large, push them into separate reference files:

```markdown
| Task Type | Read This Reference |
|-----------|-------------------|
| Creating documents | `${CLAUDE_SKILL_ROOT}/references/creation.md` |
| Editing documents | `${CLAUDE_SKILL_ROOT}/references/editing.md` |
```

## Feedback Loops

Use a validate-fix-repeat pattern for tasks where output quality matters:

```markdown
## Validation loop

1. Make edits to the document
2. Validate immediately: `uv run ${CLAUDE_SKILL_ROOT}/scripts/validate.py`
3. If validation fails:
   - Review the error message
   - Fix the issues
   - Run validation again
4. Only proceed when validation passes
```

This pattern works for:
- Code generation (lint → fix → re-lint)
- Document editing (validate XML → fix → re-validate)
- Data processing (check schema → fix → re-check)
- Form filling (validate fields → fix → re-validate)

## Plan-Validate-Execute

For complex, high-stakes tasks, have the agent create a plan file before executing:

```markdown
1. Analyze the input and generate `changes.json` with planned modifications
2. Validate the plan: `uv run ${CLAUDE_SKILL_ROOT}/scripts/validate_plan.py changes.json`
3. If validation fails, revise the plan and re-validate
4. Execute the plan: `uv run ${CLAUDE_SKILL_ROOT}/scripts/apply_changes.py changes.json`
5. Verify the result
```

Benefits:
- Catches errors before changes are applied
- Machine-verifiable intermediate output
- Agent can iterate on the plan without touching originals
- Clear debugging — error messages point to specific plan entries

Use this pattern for: batch operations, destructive changes, complex data transformations.

Files in this skill

  • README.md933 B
  • skill.md2.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.