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-monitordata-ai
license: Apache-2.0 NOT for unrelated tasks outside this domain.
development
Use when designing caching strategies (cache-aside, write-through, write-behind), implementing distributed locks, building rate limiters, leaderboards, real-time streams (XADD/consumer groups), pub/sub, or tuning eviction policies. Triggers: thundering-herd on cache miss, dogpile on key expiry, Redlock vs SET-NX-PX choice, sliding-window rate limiter, hot-key on a single cluster slot, big-key blowup, MULTI/EXEC across slots, KEYS in production. NOT for Redis Cluster operations/admin (different domain), embedded KV (SQLite, leveldb), in-process LRU caches, or Memcached.
tools
Drawing the `'use client'` boundary correctly in React Server Components apps (Next.js App Router, RSC frameworks) — leaf-pushing, slot composition, serialization rules, and environment poisoning prevention. Grounded in react.dev and Next.js 16 docs.
development
Use when designing rate limiting for an API, choosing between token bucket / sliding window / leaky bucket / fixed window, implementing it in Redis, deciding edge (Cloudflare/Upstash) vs origin enforcement, sizing per-user vs per-IP vs per-endpoint quotas, returning the right 429 response with Retry-After, or fixing the boundary-burst bug in fixed-window limiters. Triggers: 429 too many requests, INCR + EXPIRE, ZADD + ZREMRANGEBYSCORE + ZCARD, X-RateLimit-Remaining header, Cloudflare WAF rate limiting rules, Upstash @upstash/ratelimit, leaky bucket shaping vs policing, distributed rate limiter consistency. NOT for DDoS mitigation specifically (different scale), CAPTCHA / bot management, full WAF design, or per-user quota billing.