rune-kit/rune/adversary
Claude Code and agent skill by rune-kit/rune
- community
Checking that the SKILL.md file is still in the repository.
Pre-implementation red-team analysis. Use when a plan is high-risk, critical path, or expensive to reverse. Challenges plans before code is written — finds edge cases, security holes, scalability bottlenecks, error propagation risks, and integration conflicts. Catches flaws at plan time (10x cheaper than post-implementation).
Install
npx vskill@latest install rune-kit/rune/adversarySKILL.md
The same SKILL.md was published earlier as rune-kit/rune/adversary.
adversary
Purpose
Pre-implementation adversarial analysis. After a plan is approved but BEFORE code is written, adversary stress-tests the plan across 5 dimensions: edge cases, security, scalability, error propagation, and integration risk. It does NOT fix or redesign — it reports weaknesses so the plan can be hardened before implementation begins.
This fills the only gap in the plan-to-ship pipeline: all other quality skills (review, preflight, sentinel) operate AFTER code exists. Catching a flaw in a plan costs minutes; catching it in implementation costs hours.
<HARD-GATE> adversary MUST NOT approve a plan without at least one specific challenge per dimension analyzed. A report that says "plan looks solid" without concrete attack vectors is NOT a red-team analysis. Every finding MUST reference the specific plan section, file, or assumption it challenges. </HARD-GATE>
Triggers
- Called by
cookPhase 2.5 — after plan approved, before Phase 3 (TEST) /rune adversary— manual red-team analysis of any plan or design document- Auto-trigger: when plan files are created in
.rune/ordocs/plans/
Calls (outbound)
sentinel(L2): deep security scan when adversary identifies auth/crypto/payment attack vectors in the planperf(L2): scalability analysis when adversary identifies potential bottleneck patternsscout(L2): find existing code that might conflict with planned changesdocs-seeker(L3): verify framework/API assumptions in the plan are correct and currenthallucination-guard(L3): verify that APIs, packages, or patterns referenced in the plan actually existcontext-engine(L3): (oracle-mode) emitcontext.previewbefore bundle build to gate token costsession-bridge(L3): (oracle-mode) detach protocol when target model is opus-class for non-blocking dispatchcouncil(L3): Step 0.6 — decorrelated multi-perspective critique for CRITICAL-tier plans (one-way-door decisions, auth/payment/crypto/user-data), mode=critique
Called By (inbound)
cook(L1): Phase 2.5 — after plan approval, before TDDplan(L2): optional post-step for critical featuresteam(L1): when decomposing large tasks, adversary validates the decompositiondebug(L2): (oracle-mode) listens toagent.stuckfrom debug after 3 disproved hypothesesfix(L2): (oracle-mode) listens toagent.stuckfrom fix after 2+ failed attempts- User:
/rune adversarydirect invocation
Cross-Hub Connections
adversary←cook— plan produced → adversary challenges it → hardened plan feeds Phase 3adversary→sentinel— security attack vector identified → sentinel validates depthadversary→perf— scalability concern raised → perf quantifies the bottleneckadversary→scout— integration risk flagged → scout finds affected codeadversary→plan— CRITICAL findings → plan revises before implementationadversary→council— CRITICAL-tier plan (one-way-door decision, or auth/payment/crypto/user-data) → decorrelated critique before red-teaming
Execution
Step 0: Load Context
- Read the plan document (from
.rune/features/<name>/plan.md, phase file, or user-specified path) - Read the requirements document if it exists (
.rune/features/<name>/requirements.mdfrom BA) - Use
scoutto identify existing code files that the plan will touch or depend on - Identify the plan's core assumptions — what MUST be true for this plan to work?
Step 0.5: Steelman + Pick a Reasoning Lens
<MUST-READ path="references/reasoning-modes.md" trigger="before challenging any plan — to steelman the thesis and select the reasoning lens per dimension"/>
Before attacking, steelman the plan's core thesis — restate it in its strongest form (strip weak framing, supply the strongest implied evidence, name what's genuinely good). Attacking a weak paraphrase produces findings the author dismisses with "that's not what I meant." The steelman also seeds the Strength Notes section (Step 6).
The 5 dimensions below answer what to attack. The 5 reasoning modes answer how:
| Mode | Core question | Reach for when | |
|---|---|---|---|
| Red Team (default) | "How would someone break/exploit/game this?" | auth, payment, user data, public input, perverse incentives. NB: this is persona framing (who attacks, their capability/motivation) — it composes with Step 2's attack-surface inventory, not a duplicate of it | |
| Pre-mortem | "It's 6 months out and this failed — why?" | migrations, infra, architecture, cascading failure | |
| Evidence Audit | "Does the evidence actually support this claim?" | benchmark/"X is faster"/capacity-number justifications | |
| Dialectic | "What's the strongest case for the opposite choice?" | tech/vendor/architecture one-way-door decisions | |
| Socratic | "What is this plan taking for granted?" | vague scope, consensus-driven plans, thin specs |
Default to Red Team. Switch or add a second lens when the plan's shape calls for it (signal→mode table + mode mechanics in references/reasoning-modes.md). State which lens you applied per dimension — don't ask the user to pick. Dialectic's synthesis usually produces concrete remediations (likely HARDEN), but maps to REVISE if it exposes a structural flaw in the chosen approach; Socratic's surfaced assumptions and Pre-mortem's narratives become findings.
Step 0.6: Decorrelated Multi-Perspective Gathering (council, CRITICAL-tier only)
adversary's own single pass is one model's opinion, however rigorous. For the subset of plans where being wrong is expensive enough to justify it, call rune:council (mode=critique) before Steps 1-5, instead of (or in addition to) solo analysis.
Trigger — call council when ANY of:
- Step 0.5 selected the Dialectic or Pre-mortem lens (one-way-door architecture/vendor
decisions, irreversible migrations — exactly the cases where a second architecture's blind spots differing from yours has the highest expected value)
- The plan touches auth, payment, crypto, or user data at a severity that would otherwise
trigger mandatory sentinel escalation (Step 2)
- The user explicitly asks for a second opinion or "gut check" before committing
Do NOT call council for: Quick Challenge mode plans, plans under 3 files with no auth/payment/data logic, or routine feature work — council is opt-in overhead, not a default tax on every adversary run (see council's own Sharp Edges: never auto-fires on every plan).
Request: { question: <steelmanned thesis + the specific risk being tested>, mode: "critique", n: 3, diversity: { prefer_model_families: true }, evidence_required: [reasoning, citation] }. The question MUST be self-contained — council's voices have no access to this conversation.
Consume: fold CouncilResult.agreement.consensus_claims into the relevant dimension's findings below, tagged [council-verified]. Fold agreement.dissent into that dimension's findings too, but tagged [council-dissent] — dissent is information, not something to resolve by picking a side. If decorrelation: NO_DECORRELATION, do not describe the result as a second opinion in the report — say plainly that no independent model family was reachable and the additional voices were same-family subagents.
Step 1: Edge Case Analysis
Challenge the plan's handling of boundary conditions.
For each input/output/state transition in the plan, ask:
- Empty/zero: What happens with no data, zero items, empty strings, null users?
- Overflow: What happens at MAX — 10K items, 1MB payload, 1000 concurrent users?
- Race conditions: What if two operations happen simultaneously? Can state become inconsistent?
- Partial failure: What if step 3 of 5 fails? Is there rollback? Or orphaned state?
- Invalid combinations: What input combinations are technically possible but semantically nonsensical?
Step 2: Security Attack Vectors
Analyze the plan for security weaknesses BEFORE any code exists.
- Input trust boundaries: Where does the plan accept external input? Is validation specified?
- Authentication gaps: Does the plan assume auth exists? Are there unprotected routes or actions?
- Data exposure: Could the planned API responses leak sensitive fields? Are there over-fetching risks?
- Privilege escalation: Can a normal user reach admin functionality through the planned flow?
- Injection surfaces: Does the plan involve dynamic queries, template rendering, or shell commands?
- Dependency risk: Does the plan introduce new dependencies? Are they well-maintained and trusted?
If any auth, crypto, or payment logic is in the plan: MUST call rune:sentinel for deep analysis.
Step 3: Scalability Stress Test
Project the plan forward — what happens at 10x and 100x scale?
- N+1 queries: Does the plan describe data fetching that will create N+1 database calls?
- Missing pagination: Does the plan handle lists without specifying limits?
- Synchronous bottlenecks: Are there blocking operations in the hot path?
- Cache invalidation: If caching is planned, what happens when data changes? Stale reads?
- State growth: Does the plan accumulate state (in-memory, database, file system) without cleanup?
- External service limits: Does the plan account for rate limits on third-party APIs?
If bottleneck patterns detected: call rune:perf for quantitative analysis.
Step 4: Error Propagation Analysis
Trace failure paths through the planned system.
- Cascade failures: If Service A fails, does the plan specify what happens to B, C, D?
- Retry storms: Does the plan include retries? Could retries amplify the failure?
- Silent failures: Are there operations that could fail without anyone knowing?
- Inconsistent state: If a multi-step operation fails midway, is the data left in a valid state?
- User experience: When things fail, what does the user see? Is there a degraded mode?
- Recovery path: After failure + fix, can the system resume? Or does it require manual intervention?
Step 5: Integration Risk Assessment
Check for conflicts with existing code and architecture.
- Use
rune:scoutto find all files the plan will modify or depend on - Breaking changes: Does the plan modify shared interfaces, types, or APIs that other code depends on?
- Migration gaps: Does the plan require database migrations? Are they reversible?
- Configuration drift: Does the plan add new environment variables, feature flags, or config files?
- Test invalidation: Will existing tests break from the planned changes?
- Deployment ordering: Does the plan require specific deployment sequence? (DB first, then API, then frontend?)
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/adversary/SKILL.md
Popularity
- Repository stars
- 87
- Repository forks
- 26
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/rune-kit/rune/adversary)