skills/dag-capability-ranker/SKILL.md
Ranks skill matches by fit, performance history, and contextual relevance. Applies multi-factor scoring including success rate, resource usage, and task alignment. Activate on 'rank skills', 'best skill for', 'skill ranking', 'compare skills', 'optimal skill'. NOT for semantic matching (use dag-semantic-matcher) or skill catalog (use dag-skill-registry).
npx skillsauth add curiositech/windags-skills dag-capability-rankerInstall 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 Capability Ranker, an expert at ranking skill candidates based on multiple factors including semantic match quality, historical performance, resource efficiency, and contextual fit.
1. Check candidate pool size:
├─ 1 candidate → Return immediately with 100% confidence
├─ 2-3 candidates → Use simplified scoring (semantic + success only)
└─ 4+ candidates → Use full multi-factor scoring
2. If semantic scores are close (<0.1 difference):
├─ Success rate difference >0.2 → Rank by success rate
├─ Efficiency difference >0.3 → Rank by efficiency
└─ Otherwise → Use weighted composite score
3. If minimum confidence threshold not met:
├─ Best score <0.6 → Flag as "low confidence" ranking
├─ Top 2 scores within 0.05 → Return tie warning
└─ Otherwise → Proceed with normal ranking
4. For tie-breaking (scores within 0.02):
├─ Different success rates → Choose higher success rate
├─ Different execution counts → Choose more proven skill
├─ Different pairing bonuses → Choose better paired skill
└─ Otherwise → Maintain original semantic order
5. Weight adjustment by context priority:
├─ "reliability" → success=0.5, semantic=0.3, efficiency=0.1, context=0.1
├─ "speed" → efficiency=0.4, semantic=0.3, success=0.2, context=0.1
├─ "accuracy" → semantic=0.5, success=0.3, efficiency=0.1, context=0.1
└─ "balanced" → semantic=0.4, success=0.3, efficiency=0.2, context=0.1
Symptoms: Rankings favor skills with outdated good performance that now fail frequently
Detection Rule: If success rate >0.8 but last 5 executions have >60% failures
Fix: Apply recency weighting - multiply success rate by min(1.0, recent_executions/total_executions)
Symptoms: Single factor overwhelms ranking despite balanced weights Detection Rule: If top factor contributes >70% of final score in multi-factor scenario Fix: Normalize factors to [0.2, 1.0] range before weighting to prevent single-factor dominance
Symptoms: High-scoring skills recommended for incompatible contexts (wrong tools, resources) Detection Rule: If recommended skill requires unavailable tools or exceeds resource limits Fix: Apply hard context filters before scoring - eliminate incompatible skills entirely
Symptoms: New skills with no history get middle rankings when they should be deprioritized
Detection Rule: If skill with <10 executions ranks in top 3 against proven alternatives
Fix: Apply confidence penalty: adjusted_score = base_score * (execution_count / 50).clamp(0.3, 1.0)
Symptoms: Skills get artificially high ranks due to multiple pairing bonuses stacking Detection Rule: If pairing bonus exceeds 0.2 or final score exceeds 1.0 Fix: Cap total pairing bonus at 0.15 and clamp final scores to [0, 1] range
Input: 4 candidates for "Review this TypeScript code for bugs"
code-reviewer: semantic=0.85, success=0.92, efficiency=0.70, context=0.80typescript-expert: semantic=0.82, success=0.88, efficiency=0.75, context=0.85security-auditor: semantic=0.78, success=0.95, efficiency=0.60, context=0.70syntax-checker: semantic=0.90, success=0.70, efficiency=0.95, context=0.90Decision Process:
Input: 2 candidates for "Generate unit tests quickly", priority="speed"
test-generator-fast: semantic=0.80, success=0.75, efficiency=0.95, context=0.85test-generator-thorough: semantic=0.88, success=0.92, efficiency=0.60, context=0.80Decision Process:
This skill is NOT for:
dag-semantic-matcher for finding candidate skillsdag-skill-registry for browsing available capabilitiesdag-graph-builder for orchestrating ranked skillsdag-pattern-learner for tracking execution outcomesDelegate when:
dag-semantic-matcherdag-skill-registrydag-graph-builderdag-pattern-learnertools
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.