alirezarezvani/claude-skills / engineering/workflow-builder/skills/workflow-builder
workflow-builder
VerifiedUse when writing or running a Claude Code Workflow-tool script (.js in .claude/workflows/) for fan-out, pipeline, loop or judge-panel sub-agents. Gathers intent with workflow_intake.py, scaffolds with scaffold_workflow.py and validates with validate_workflow.py.
| File | Kind | Size |
|---|---|---|
| README.md | markdown | 1.4 KB |
| SKILL.md | skill md | 5.2 KB |
| assets/examples/pr-triage.js | script | 3.5 KB |
| assets/templates/fan-out.js | script | 1.1 KB |
| assets/templates/loop-until-budget.js | script | 1.2 KB |
| assets/templates/pipeline.js | script | 1.2 KB |
| expected_outputs/intake_pr_review.json | config | 1.2 KB |
| expected_outputs/scaffold_pipeline.js | script | 1.2 KB |
| expected_outputs/validate_sample.txt | markdown | 555 B |
| references/api_reference.md | markdown | 6.3 KB |
| references/decision_and_intake_guide.md | markdown | 5.8 KB |
| references/orchestration_patterns.md | markdown | 5.4 KB |
| scripts/scaffold_workflow.py | script | 6.7 KB |
| scripts/validate_workflow.py | script | 10.7 KB |
| scripts/workflow_intake.py | script | 10.2 KB |
assets/examples/pr-triage.js
View on GitHub// Example workflow: triage open PRs for bugs before merge.
//
// Shape: fan-out (one reviewer per PR) -> skeptic-vote (verify each high-severity
// finding so a false positive doesn't waste review time) -> synthesize one report.
//
// Run: enable CLAUDE_CODE_WORKFLOWS=1, save under .claude/workflows/, launch via /workflows.
// Pass PR identifiers in via args, e.g. Workflow({ scriptPath, args: { prs: ['#12', '#15'] } }).
export const meta = {
name: 'pr-triage',
description: 'Triage open PRs for bugs before merge, with adversarial verification of high-severity findings',
whenToUse: 'Run before a merge window to surface and confirm likely bugs across open PRs',
phases: [
{ title: 'Review', detail: 'One reviewer agent per PR', model: 'haiku' },
{ title: 'Verify', detail: 'Skeptic vote on high-severity findings', model: 'sonnet' },
{ title: 'Report', detail: 'Synthesize a single triage report', model: 'opus' }
]
}
const FINDINGS_SCHEMA = {
type: 'object',
properties: {
pr: { type: 'string' },
findings: {
type: 'array',
items: {
type: 'object',
properties: {
title: { type: 'string' },
severity: { type: 'string', enum: ['low', 'medium', 'high'] },
file: { type: 'string' }
},
required: ['title', 'severity']
}
}
},
required: ['pr', 'findings']
}
const VERDICT_SCHEMA = {
type: 'object',
properties: { refuted: { type: 'boolean' }, reason: { type: 'string' } },
required: ['refuted']
}
// args.prs is the list of PR identifiers to triage; gathering their diffs happens
// inside each reviewer agent (the orchestrator has no filesystem/network access).
const PRS = args?.prs ?? ['#101', '#102', '#103']
// Phase 1 — fan out one reviewer per PR. Cheap model, structured output.
phase('Review')
const reviews = await parallel(
PRS.map((pr, i) => () =>
agent(
`Review PR ${pr} for likely bugs. Inspect the diff and report concrete findings.`,
{ label: `review:${pr}`, phase: 'Review', model: 'haiku', schema: FINDINGS_SCHEMA }
)
)
)
// Collect every high-severity finding across all PRs.
const highSeverity = reviews
.filter(Boolean)
.flatMap(r => (r.findings ?? []).map(f => ({ ...f, pr: r.pr })))
.filter(f => f.severity === 'high')
log(`Reviewed ${reviews.filter(Boolean).length} PRs; ${highSeverity.length} high-severity findings to verify.`)
// Phase 2 — skeptic vote: three independent agents try to refute each high finding.
// A finding survives only if it is NOT refuted by a majority.
phase('Verify')
const confirmed = []
for (let i = 0; i < highSeverity.length; i++) {
const f = highSeverity[i]
const votes = await parallel(
Array.from({ length: 3 }, (_, k) => () =>
agent(
`Try hard to REFUTE this bug claim about PR ${f.pr}: "${f.title}" in ${f.file ?? 'unknown file'}. ` +
`Return { refuted: boolean, reason }.`,
{ label: `skeptic:${i + 1}.${k + 1}`, phase: 'Verify', model: 'sonnet', schema: VERDICT_SCHEMA }
)
)
)
const survives = votes.filter(v => v && !v.refuted).length >= 2
if (survives) confirmed.push(f)
}
log(`Verified findings: ${confirmed.length} of ${highSeverity.length} survived the skeptic vote.`)
// Phase 3 — synthesize one report from the confirmed findings.
phase('Report')
const report = await agent(
`Write a concise PR-triage report. Group by PR. Only include these confirmed high-severity findings:\n` +
JSON.stringify(confirmed, null, 2),
{ model: 'opus' }
)
return { report, confirmed, reviewed: reviews.filter(Boolean).length }
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |