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-learnerdata-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.