skills/dag-permission-validator/SKILL.md
Validates permission inheritance between parent and child agents. Ensures child permissions are equal to or more restrictive than parent. Activate on 'validate permissions', 'permission check', 'inheritance validation', 'permission matrix', 'security validation'. NOT for runtime enforcement (use dag-scope-enforcer) or isolation management (use dag-isolation-manager).
npx skillsauth add curiositech/windags-skills dag-permission-validatorInstall 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 Permission Validator, ensuring child agents never exceed parent permissions through systematic validation of permission matrices.
| Child Permission State | Parent Has Permission | Action | |---|---|---| | Requests core tool (read/write/etc) | ✓ Parent has it | APPROVE - child can inherit | | Requests core tool | ✗ Parent lacks it | DENY - log violation, suggest removal | | Requests file pattern | ✓ Pattern subset of parent | APPROVE - within boundaries | | Requests file pattern | ✗ Pattern exceeds parent scope | DENY - narrow to parent scope | | Has fewer deny patterns than parent | Parent denies pattern X | DENY - child must inherit all denials | | Network/bash permissions | Parent disabled | DENY - cannot enable what parent lacks | | Ambiguous glob pattern overlap | ? Unclear if subset | WARN - request clarification, suggest explicit patterns |
1. Merge requested permissions with defaults
├─ If conflict in request → Use most restrictive
└─ If missing field → Use secure default (false/empty)
2. Compare each permission category:
├─ Core tools: child.tool ≤ parent.tool for each tool
├─ File patterns: each child pattern ⊆ parent patterns
├─ Network: child domains ⊆ parent domains
└─ Bash: child patterns ⊆ parent patterns AND child denials ⊇ parent denials
3. Generate result:
├─ All valid → return PASS + child matrix
├─ Violations found → return FAIL + violations + suggested fixes
└─ Warnings only → return WARN + proceed with corrected matrix
Symptom: Child agent spawned with permissions parent doesn't have
Diagnosis: Validation skipped or enforcement not integrated with spawning
Fix: Ensure dag-parallel-executor calls validation before Task tool execution
Symptom: Child requests /home/** when parent only has /tmp/**
Diagnosis: Pattern subset logic fails on glob expansion
Fix: Use isPatternSubsetOf() with proper glob matching, not string comparison
Symptom: Child bypasses restrictions parent must enforce
Diagnosis: Child permission matrix missing parent's denial patterns
Fix: Copy all parent denial patterns to child before validation
Symptom: Valid subset permissions rejected as violations
Diagnosis: Overly strict pattern matching or missing parent wildcard handling
Fix: Implement proper glob hierarchy checking with ** and * expansion
Symptom: Child gets dangerous defaults when request is partial
Diagnosis: Merging logic uses permissive defaults instead of restrictive ones
Fix: Use createRestrictiveDefaults() as base, only add what parent allows
// Parent: research-coordinator
parentMatrix = {
coreTools: { read: true, write: false, webSearch: true },
fileSystem: { readPatterns: ["/workspace/**"], writePatterns: [] },
network: { enabled: true, allowedDomains: ["*.edu", "arxiv.org"] }
}
// Child request: literature-scanner
childRequest = {
coreTools: { read: true, webSearch: true },
fileSystem: { readPatterns: ["/workspace/papers/**"] },
network: { enabled: true, allowedDomains: ["arxiv.org"] }
}
// Validation process:
1. Core tools: ✓ read≤read, webSearch≤webSearch, write not requested
2. File patterns: ✓ "/workspace/papers/**" ⊆ "/workspace/**"
3. Network: ✓ "arxiv.org" ⊆ ["*.edu", "arxiv.org"]
// Result: PASS - child is proper subset
// Parent: data-processor
parentMatrix = {
coreTools: { read: true, write: false, edit: false },
fileSystem: { readPatterns: ["/data/**"], denyPatterns: ["/data/secrets/**"] }
}
// Child request: file-modifier
childRequest = {
coreTools: { read: true, write: true }, // ❌ VIOLATION
fileSystem: { readPatterns: ["/data/**"] } // ❌ Missing denial
}
// Validation process:
1. Core tools: ✗ child.write=true > parent.write=false → VIOLATION
2. File patterns: ✗ child missing "/data/secrets/**" denial → VIOLATION
// Result: FAIL
violations = [
{ category: "coreTools", field: "write", message: "Child requests write but parent forbids" },
{ category: "fileSystem", field: "denyPatterns", message: "Child must inherit secrets denial" }
]
// Auto-fix suggestion:
suggestedChild = {
coreTools: { read: true, write: false },
fileSystem: { readPatterns: ["/data/**"], denyPatterns: ["/data/secrets/**"] }
}
// Parent: web-crawler
parentMatrix = {
network: { enabled: true, allowedDomains: ["*.research.org", "api.*.com"] }
}
// Child request: domain-scanner
childRequest = {
network: { allowedDomains: ["sub.research.org", "api.data.com", "api.unknown.net"] }
}
// Validation process:
1. "sub.research.org" vs "*.research.org" → ✓ clear subset
2. "api.data.com" vs "api.*.com" → ✓ matches pattern
3. "api.unknown.net" vs patterns → ✗ "net" ≠ "com" → VIOLATION
// Trade-off analysis:
Option A: Strict reject → blocks legitimate "api.unknown.net" if parent meant "api.*.*"
Option B: Permissive allow → risks domain escalation
// Decision: Fail safe - reject ambiguous, suggest clarification
Result: FAIL + suggestion to make parent pattern explicit ["api.*.com", "api.*.net"]
This skill validates permissions but does NOT:
dag-scope-enforcer for blocking unauthorized actionsdag-authorization-manager for escalating agent permissionsdag-isolation-manager for container/sandbox boundariesdag-policy-manager for defining organizational permission rulesdag-execution-tracer for recording permission violationsWhen to delegate:
dag-scope-enforcer.enforce()dag-authorization-manager.elevate()dag-isolation-manager.isolate()dag-policy-manager.define()data-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.