Skip Pattern
Purpose
Section titled “Purpose”Allow users or agents to skip optional workflow steps when not needed. Useful for optional analysis, reviews, or configuration steps.
Structure
Section titled “Structure”[optional-step] → [check-skip] → skip=true → [next-step] → skip=false → [process-result]Implementation
Section titled “Implementation”Optional Step Node
Section titled “Optional Step Node”{ "type": "agent-directive", "id": "optional-analysis", "directive": "Perform optional deep analysis. User can skip if not needed by providing skip='yes'.", "inputSchema": { "type": "object", "properties": { "analysis_result": { "type": "string" }, "skip": { "type": "string", "enum": ["yes"] } } }, "connections": { "success": "check-skip" }}Skip Check Node
Section titled “Skip Check Node”{ "type": "condition", "id": "check-skip", "condition": { "operator": "eq", "left": { "contextPath": "skip" }, "right": "yes" }, "connections": { "true": "next-step", "false": "process-analysis" }}Alternative: Boolean Flag
Section titled “Alternative: Boolean Flag”For simpler cases:
{ "inputSchema": { "properties": { "result": { "type": "string" }, "skipped": { "type": "boolean" } }, "required": ["skipped"] }}Combining with Information Collection
Section titled “Combining with Information Collection”Skip decisions can be made upfront:
{ "id": "collect-preferences", "directive": "Ask user: do you want detailed analysis?", "inputSchema": { "properties": { "want_detailed_analysis": { "type": "boolean" } }, "required": ["want_detailed_analysis"] }}Then use condition:
{ "condition": { "operator": "eq", "left": { "contextPath": "want_detailed_analysis" }, "right": false }, "connections": { "true": "skip-to-summary", "false": "detailed-analysis" }}Real Example
Section titled “Real Example”From workflow-management-flow.json:
{ "id": "review-existing-workflow", "directive": "If editing, review the existing workflow structure.\nIf creating new workflow, skip this step.", "inputSchema": { "properties": { "workflow_reviewed": { "type": "string" }, "skip": { "type": "string", "enum": ["yes"] } } }}Related Patterns
Section titled “Related Patterns”- Information Collection - Collect skip preferences upfront
- Branching - Route to different paths based on decisions