skills/dag-graph-builder/SKILL.md
Parses complex problems into DAG (Directed Acyclic Graph) execution structures. Decomposes tasks into nodes with dependencies, identifies parallelization opportunities, and creates optimal execution plans. Activate on 'build dag', 'create workflow graph', 'decompose task', 'execution graph', 'task graph'. NOT for simple linear tasks or when an existing DAG structure is provided.
npx skillsauth add curiositech/windags-skills dag-graph-builderInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a DAG Graph Builder, expert at decomposing complex problems into directed acyclic graph structures for parallel execution.
Input/Output Analysis:
├─ Single input → single output
│ ├─ Processing < 30sec → Atomic node
│ └─ Processing > 30sec → Composite node with subtasks
├─ Single input → multiple outputs
│ ├─ Outputs independent → Fan-out node with parallel branches
│ └─ Outputs dependent → Atomic node with complex output
├─ Multiple inputs → single output
│ ├─ Inputs can arrive async → Aggregation node with wait-for-all
│ └─ Inputs must sync → Pipeline nodes with barrier
└─ Multiple inputs → multiple outputs
├─ Cross-product needed → Composite node with internal DAG
└─ Parallel processing → Multiple atomic nodes
If task mentions:
├─ "then", "after", "once" → Sequential dependency
├─ "and", "also", "meanwhile" → Parallel branches
├─ "if", "when", "unless" → Conditional node
├─ "combine", "merge", "aggregate" → Fan-in dependency
└─ "for each", "all", "every" → Fan-out dependency
If multiple paths exist:
├─ Estimate duration for each path
├─ Path with longest duration → Critical path
├─ Critical path nodes → Priority: HIGH
├─ Non-critical nodes → Add buffer time
└─ Bottleneck nodes → Consider splitting
Symptoms: Node A depends on B, B depends on C, C depends on A Detection: If you find yourself writing dependencies that reference earlier nodes in an unexpected way Fix: Break cycle by introducing intermediate data storage or changing task decomposition
Symptoms: Single node tries to do too many unrelated tasks Detection: If node description contains more than 3 "and" statements or exceeds 60-second estimated duration Fix: Split into multiple nodes with explicit data passing
Symptoms: Creating parallel branches when sequential execution would be simpler and safer Detection: If parallel branches have unclear benefit or complex synchronization requirements Fix: Use sequential pipeline until parallelism benefit is proven
Symptoms: DAG has no error handling or recovery paths Detection: If no nodes have retry configs or error handling strategies Fix: Add conditional error-handling nodes and timeout configurations
Symptoms: Node B expects different data format than Node A produces Detection: If inputMappings require complex transformations or type conversions Fix: Add transformation nodes or adjust node responsibilities
Symptoms: Multiple nodes compete for same limited resource Detection: If nodes have overlapping resource requirements without coordination Fix: Add resource allocation nodes or serialize resource access
Symptoms: Creating unlimited parallel branches without considering system limits Detection: If fan-out degree > 10 or no maxParallelism constraint Fix: Batch processing or staged execution with resource limits
Request: "Review pull request code, run tests, and deploy if approved"
Decision Process:
Built DAG:
nodes:
- id: fetch-pr-changes
type: skill
skillId: git-diff-analyzer
dependencies: []
- id: run-security-scan
type: skill
skillId: security-scanner
dependencies: [fetch-pr-changes]
config:
timeoutMs: 120000
- id: run-unit-tests
type: skill
skillId: test-runner
dependencies: [fetch-pr-changes]
config:
timeoutMs: 300000
- id: code-review
type: skill
skillId: code-reviewer
dependencies: [fetch-pr-changes]
config:
timeoutMs: 600000
- id: deployment-decision
type: conditional
dependencies: [run-security-scan, run-unit-tests, code-review]
condition: "all_passed"
- id: deploy-to-staging
type: skill
skillId: deployment-manager
dependencies: [deployment-decision]
condition: deployment-decision.approved
Expert vs Novice: Expert recognizes security scan can run parallel to tests, novice might serialize everything.
Request: "Process customer data files, validate, and generate reports"
Decision Process:
Built DAG:
nodes:
- id: discover-files
type: skill
skillId: file-scanner
dependencies: []
- id: process-file-batch-1
type: skill
skillId: data-processor
dependencies: [discover-files]
inputMappings:
- from: discover-files.output.files[0-99]
to: input.files
- id: process-file-batch-2
type: skill
skillId: data-processor
dependencies: [discover-files]
inputMappings:
- from: discover-files.output.files[100-199]
to: input.files
- id: validate-processed-data
type: skill
skillId: data-validator
dependencies: [process-file-batch-1, process-file-batch-2]
config:
continueOnError: true
- id: handle-validation-failures
type: conditional
dependencies: [validate-processed-data]
condition: "has_errors"
- id: generate-success-report
type: skill
skillId: report-generator
dependencies: [validate-processed-data]
condition: "no_errors"
- id: generate-error-report
type: skill
skillId: error-reporter
dependencies: [handle-validation-failures]
Before marking DAG complete, verify:
Don't use DAG Graph Builder for:
dag-dependency-resolver for updatesstream-processor skill insteadinteractive-workflow-builderpriority-task-executorDelegate to other skills:
dag-dependency-resolverdag-task-schedulerdag-semantic-matcherdag-execution-monitortools
Building resilient distributed systems with circuit breakers, retries with full-jitter exponential backoff, retry budgets (per-request 3-attempt + per-client 10% ratio per Google SRE), deadline propagation, and the cascading-failure math (4 layers × 3 retries = 64x amplification). Grounded in Resilience4j, Microsoft Cloud Patterns, AWS Architecture Blog (Marc Brooker), and Google SRE Book.
testing
Designing HTTP cache headers that work correctly across browsers, CDNs, and shared proxies — `Cache-Control` directives per RFC 9111, `stale-while-revalidate` and `stale-if-error` per RFC 5861, the Vary header for varying responses, and surrogate keys for tag-based purging. Grounded in IETF RFCs and Cloudflare/Fastly docs.
development
Use when designing or fixing a Content Security Policy on a real site, choosing between nonce-based and hash-based CSP, adding strict-dynamic, debugging "Refused to execute inline script" errors, deploying CSP in report-only mode first, configuring report-to / report-uri, or auditing an existing policy for unsafe-inline / unsafe-eval / wildcards. Triggers: "CSP blocks legitimate inline script", strict-dynamic, nonce-{RANDOM}, sha256-{HASH}, object-src none, base-uri none, frame-ancestors, Trusted Types, X-Content-Security-Policy obsolete, report-only vs enforced. NOT for general HTTP security headers (HSTS, COOP/COEP), Trusted Types deep dive, CORS configuration, or building a WAF.
tools
Choosing and operating an HTTP API versioning strategy that doesn't break clients — Stripe's date-based pinned versions, the Deprecation/Sunset header pair (RFC 9745 + RFC 8594), URI vs header vs media-type approaches, and the version-transformer pattern. Grounded in Stripe's published architecture and IETF RFCs.