Your team just shipped what you thought was a bulletproof smart contract. Three audits. Two firms. A $50,000 bug bounty program. Then someone drained $200 million in 47 seconds because of a state desync bug that every single reviewer missed.
Sound impossible? It happened to Nomad. It happened to Wormhole. It happened to countless protocols that did "everything right" — except they trusted single-pass human review to catch multi-layered logic flaws.
Here's the brutal truth: traditional security audits are fundamentally broken for complex codebases. One pass. One methodology. One tired reviewer staring at their 500th function of the week. The bugs that destroy protocols don't hide in obvious places — they lurk in the gaps between passes, in the assumptions that no one questioned twice, in the state mutations that look correct in isolation but desync under specific sequences.
What if you could run an audit that never stops questioning? That alternates between two complementary attack methodologies, feeding findings back and forth until nothing new surfaces? That's not science fiction — that's Nemesis-Auditor, the iterative deep-logic security audit agent for Claude Code that top developers are quietly deploying before their competitors catch on.
Built by security researcher 0xiehnnkta and designed specifically for Claude Code's agentic capabilities, Nemesis doesn't just find bugs — it hunts them relentlessly through alternating waves of first-principles interrogation and state inconsistency mapping. And it's completely language-agnostic, crushing Solidity, Move, Rust, Go, C++, Python↗ Bright Coding Blog, and TypeScript with equal ferocity.
Ready to understand why your current audit process is leaving critical vulnerabilities on the table? Let's dissect what makes Nemesis the most aggressive security tool in your arsenal.
What is Nemesis-Auditor?
Nemesis-Auditor is an orchestrated, iterative security audit agent that runs inside Claude Code — Anthropic's powerful CLI coding assistant. Named after the Greek goddess of divine retribution against hubris, it embodies a simple philosophy: your confidence in your code is the vulnerability.
The project lives at github.com/0xiehnnkta/nemesis-auditor and represents a fundamental shift in how we approach code security. Rather than treating audits as linear, single-pass activities, Nemesis implements a convergence-seeking feedback loop that alternates between two specialized sub-agents until no new findings emerge.
Created by 0xiehnnkta, a security-focused developer who recognized that traditional audit methodologies each have blind spots, Nemesis leverages Claude Code's ability to execute complex, multi-step agentic workflows. The tool is trending now because it arrives at a critical inflection point: AI-assisted coding is exploding, but AI-assisted auditing has lagged behind. Developers are writing code 10x faster with AI help — but they're not auditing 10x faster. Nemesis closes that gap.
What makes Nemesis particularly powerful is its architectural insight: no single audit methodology is sufficient for complex systems. The Feynman technique excels at exposing flawed assumptions but may miss structural state coupling issues. State inconsistency analysis finds desync bugs but can overlook why certain design decisions create vulnerability windows in the first place. By running these methodologies in an alternating, feedback-driven loop, Nemesis achieves what neither can accomplish alone — emergent vulnerability detection.
The tool's language-agnostic design is equally significant. While originally conceived for smart contract ecosystems (Solidity, Move), its core logic operates on semantic patterns rather than syntactic rules. A state desync bug in Rust looks different from one in Solidity, but the underlying vulnerability class — updating one coupled variable without its dependent — remains identical. Nemesis targets these universal patterns.
Key Features That Separate Nemesis From Everything Else
Dual-Agent Iterative Convergence
Nemesis doesn't run one audit — it runs alternating audits that feed each other. The Feynman Auditor's suspicions become the State Inconsistency Auditor's targets. State gaps become Feynman interrogation points. This cross-pollination finds bugs at pass N that were invisible at pass N-1.
First-Principles Interrogation Engine
The Feynman Auditor applies Richard Feynman's learning technique to code: if you cannot explain why a line exists, you don't understand it — and where understanding breaks down, bugs hide. It deploys 7 categories with 28+ questions per function, challenging every assumption, every invariant, every "this can't happen" assertion.
Coupled State Mutation Mapping
The State Inconsistency Auditor systematically traces every mutation path for every state variable, then cross-checks whether coupled states update in lockstep. It identifies pairs like balance <-> checkpoint, stake <-> rewardDebt, allowance <-> spent — the classic desync vectors that drain protocols.
Attacker Mindset Reconnaissance
Before any deep analysis, Nemesis builds an attacker's hit list: what's worth stealing? What's the kill chain? What trust assumptions can be violated? This Phase 0 reconnaissance ensures the audit focuses on exploitable impact, not theoretical cleanliness.
Resumable, Convergent Execution
Audits can run for hours. Nemesis supports resumable execution with /nemesis --continue, picking up exactly where interruption occurred. The loop runs until convergence (no new findings) or a maximum of 6 passes — no wasted compute, no missed coverage.
Structured, Actionable Output
Every finding follows a rigorous format with severity classification, discovery path tracing, root cause analysis, step-by-step trigger sequences, impact assessment, minimal fixes, and verification status. No more vague "consider checking this" — you get exploitable vulnerability reports.
Claude Code Native Integration
Nemesis isn't a standalone tool you wrestle into your workflow. It's a Claude Code skill that installs via simple directory copy and activates with natural commands like /nemesis or /feynman. The integration is seamless because it's built for the platform.
Use Cases: Where Nemesis Destroys the Competition
Smart Contract Protocol Launches
Pre-mainnet audits are high-stakes and time-constrained. Traditional firms book months out. Nemesis runs overnight, finding the state desync bugs that manual reviewers miss when they're on their 12th hour of Solidity review. Deploy with confidence — or at least with known, quantified risk.
DeFi Protocol Upgrades
Upgrades are where protocols die. A new function interacts with old state in unexpected ways. The Feynman Auditor questions every new assumption; the State Auditor maps how new mutations desync old invariants. Nemesis specifically targets upgrade risk by treating cross-version state coupling as primary attack surface.
Cross-Chain Bridge Validation
Bridges are state synchronization problems at massive scale. Nemesis's core competency — finding where coupled state desyncs — maps directly to bridge security. The State Inconsistency Auditor's mutation path tracing reveals where source chain updates without destination chain verification.
Rust/Go Backend Service Hardening
Not a blockchain project? Nemesis is language-agnostic for a reason. Microservices with distributed state, cache invalidation paths, eventual consistency windows — these are all state inconsistency problems. The Feynman technique exposes race condition assumptions; the State Auditor finds where distributed state diverges.
Legacy Codebase Security Baselines
Inheriting a codebase with no audit history? Nemesis provides rapid security baselining. Run /nemesis, get a prioritized finding list with severity ratings, and know exactly what needs immediate attention versus what can be scheduled. Turn unknown technical debt into quantified risk.
Step-by-Step Installation & Setup Guide
Getting Nemesis operational takes under five minutes. The tool is designed for frictionless adoption — no complex dependencies, no configuration files to wrestle with.
Prerequisites
Before installation, ensure you have:
- Claude Code CLI installed and authenticated (Anthropic's documentation for setup)
- A codebase to audit — any language, any framework
- Basic command-line familiarity
Option A: Copy Into Your Project (Recommended)
This approach embeds Nemesis directly in your project, making it permanently available for re-audits as code evolves:
# Clone the Nemesis repository
git clone https://github.com/0xiehnnkta/nemesis-auditor.git
# Copy the .claude folder into your target project
# This merges Nemesis skills with your existing Claude Code configuration
cp -r nemesis-auditor/.claude /path/to/your-project/
# Clean up — the cloned repo is no longer needed
rm -rf nemesis-auditor
The cp -r command recursively copies Nemesis's three skill definitions into your project's .claude/skills/ directory. Claude Code automatically discovers and loads these skills on next startup.
Option B: Run From Repository
Use this for one-off audits without modifying your project structure:
# Clone and enter the Nemesis directory
git clone https://github.com/0xiehnnkta/nemesis-auditor.git
cd nemesis-auditor
# Create a symbolic link to your codebase
# This lets Nemesis access your code without copying it
ln -s /path/to/your/contracts ./contracts
The symlink approach is ideal when you want to evaluate Nemesis before committing to integration, or when auditing codebases you don't control.
Launching Your First Audit
# Navigate to your project (must contain .claude/ folder)
cd /path/to/your-project
# Start Claude Code
claude
Once the Claude Code prompt appears, simply type:
/nemesis
That's it. No flags needed for full operation. The agent autonomously executes Phase 0 reconnaissance through final consolidation.
Post-Audit: Reading Results
Findings materialize in .audit/findings/:
.audit/findings/
feynman-pass1.md # First-principles logic bugs
state-pass2.md # State desync vulnerabilities
feynman-pass3.md # Targeted re-interrogation (if needed)
state-pass4.md # Targeted state recheck (if needed)
nemesis-verified.md # Final deduplicated, verified report
The nemesis-verified.md is your deliverable — a consolidated report with all Critical, High, Medium, and Low findings, deduplicated and cross-verified.
REAL Code Examples: Nemesis in Action
Let's examine actual patterns from the Nemesis repository and how they translate to real security outcomes.
Example 1: Installation and Project Integration
The README provides this exact installation sequence:
# Clone this repo
git clone https://github.com/0xiehnnkta/nemesis-auditor.git
# Copy the .claude folder into your project
cp -r nemesis-auditor/.claude /path/to/your-project/
# You can delete the cloned repo after copying
rm -rf nemesis-auditor
What's happening here? This isn't arbitrary — it's leveraging Claude Code's skill discovery mechanism. The .claude/skills/ directory structure is Claude Code's native extension point. By copying Nemesis's three skill directories (nemesis-auditor/, feynman-auditor/, state-inconsistency-auditor/) into this location, you're registering new commands that Claude Code recognizes and can execute autonomously. The SKILL.md files in each directory define the agent's behavior, available tools, and execution patterns. This architecture means Nemesis isn't an external script calling Claude — it's Claude itself, augmented with security expertise.
Example 2: Command Interface and Audit Invocation
The core user interaction is remarkably simple:
/nemesis # Full iterative audit (recommended)
/nemesis --contract MyToken # Audit a single contract
/nemesis --pass1 # Only run the Feynman Auditor
/nemesis --pass2 # Only run the State Inconsistency Auditor
/nemesis --continue # Resume interrupted audit
Why this matters: The command design reveals Nemesis's operational philosophy. The default /nemesis runs the full convergence loop — this is the "correct" way to use the tool, hence "recommended." The --pass1 and --pass2 flags exist for debugging and targeted analysis, not daily use. The --continue flag addresses a critical real-world concern: long-running audits on large codebases. Claude Code sessions can time out, networks fail, context windows fill. Resumability ensures no wasted compute, no lost progress on expensive analysis.
The standalone commands /feynman and /state-audit (shown in the full command table) allow methodology-specific deep dives when you already suspect a particular vulnerability class. Suspect a logic flaw? Run /feynman. Seeing weird state behavior? Run /state-audit.
Example 3: Finding Format — The Deliverable Structure
Every Nemesis finding follows this exact markdown↗ Smart Converter template:
### Finding NEM-001: [Title]
**Severity:** CRITICAL | HIGH | MEDIUM | LOW
**Discovery Path:** Feynman-only | State-only | Cross-feed Pass N -> Pass M
**Root Cause:** [What is broken and why]
**Trigger Sequence:**
1. [Step-by-step to reproduce]
**Impact:** [What goes wrong -- fund loss, locked state, etc.]
**Fix:** [Minimal code change]
**Verification:** Code trace | PoC test | Both
This structure is security engineering at its finest. Let's dissect why each field exists:
- Severity: Immediate triage priority. No ambiguity — developers know if they're stopping everything or scheduling for next sprint.
- Discovery Path: This is Nemesis's secret weapon exposed. When a finding shows "Cross-feed Pass 2 -> Pass 3," it proves the iterative methodology found something neither pass alone could. This field builds confidence in the tool and helps researchers understand vulnerability emergence patterns.
- Root Cause: Not "what's the bug" but "why does this bug exist" — the architectural or assumption failure that enabled it.
- Trigger Sequence: Exploitability proof. Step-by-step reproduction means developers can verify, fix, and regression-test.
- Fix: Minimal viable change. Nemesis doesn't recommend rewrites — it prescribes surgical corrections.
- Verification: How the finding was validated. "Code trace" means static analysis confirmed the path. "PoC test" means dynamic execution proved exploitability. "Both" is gold standard.
Example 4: Architecture — The Three-Skill System
.claude/
skills/
nemesis-auditor/
SKILL.md # The orchestrator -- runs the iterative loop
feynman-auditor/
SKILL.md # First-principles logic bug finder
state-inconsistency-auditor/
SKILL.md # Coupled state desync detector
This architecture enables emergent behavior. Each SKILL.md is a prompt engineering artifact — carefully constructed instructions that shape Claude's reasoning. The orchestrator skill contains the convergence logic: "Run Feynman, capture findings, feed to State, capture findings, check for new findings, repeat until stable." The sub-agent skills contain domain expertise: the Feynman skill encodes 28+ questions per function; the State skill encodes mutation path tracing algorithms.
Separation of concerns here is crucial. The orchestrator doesn't know how to find bugs — it knows how to manage the search process. The sub-agents don't know about iteration — they know how to execute their methodology exhaustively. This modularity means you could theoretically add a third auditor (formal verification? fuzzing integration?) and the orchestrator would incorporate it seamlessly.
Advanced Usage & Best Practices
Scope Strategically with --contract
Full audits on massive monorepos can run for hours and consume significant API quota. For iterative development, use /nemesis --contract [name] to incrementally audit changed components. This transforms Nemesis from a pre-launch gate into a continuous security companion.
Interpret Discovery Paths for Methodology Improvement
Pay attention to whether findings are Feynman-only, State-only, or Cross-feed. If you're seeing mostly single-pass findings, your codebase may have clean separation of concerns — or the passes may not be feeding effectively. Cross-feed findings are the highest-value outputs; their absence suggests either excellent code or insufficient iteration depth.
Use Standalone Commands for Targeted Investigation
When production incidents suggest a specific vulnerability class, skip the full loop. /feynman for suspected logic flaws, /state-audit for observed state weirdness. This diagnostic precision saves time and focuses remediation.
Maintain Audit History
The .audit/findings/ directory is timestamped by execution. Commit these to a separate audit-history branch. Over time, you'll build a vulnerability emergence dataset showing which code patterns consistently produce findings — invaluable for style guide evolution and developer training.
Calibrate Severity Expectations
Nemesis is aggressive by design. Not every "HIGH" finding is exploitable in practice — context matters. The verification field (Code trace | PoC test | Both) is your credibility filter. Prioritize "Both" findings, scrutinize "Code trace" findings for reachability, and treat "PoC test" findings as confirmed regardless of theoretical severity.
Comparison with Alternatives
| Capability | Nemesis-Auditor | Traditional Audit Firm | Static Analysis (Slither/Mythril) | Fuzzing (Echidna) |
|---|---|---|---|---|
| Cost | Free (Claude Code subscription) | $10K-$500K+ | Free | Free |
| Speed | Hours to days | Weeks to months | Minutes | Hours to days |
| Iteration Depth | Convergent multi-pass | Single pass, multiple reviewers | Single pass | Single pass with randomness |
| Methodology Cross-Feed | ✅ Native | ❌ Rare | ❌ | ❌ |
| State Desync Detection | ✅ Dedicated agent | ⚠️ Varies by reviewer | ⚠️ Limited | ⚠️ Requires invariants |
| First-Principles Logic | ✅ Dedicated agent | ⚠️ Varies by reviewer | ❌ | ❌ |
| Language Agnostic | ✅ All major languages | ⚠️ Specialist-dependent | ❌ Solidity-focused | ❌ Solidity-focused |
| Exploit Path Tracing | ✅ Step-by-step | ✅ Usually | ❌ | ⚠️ Via counterexample |
| False Positive Rate | Medium (verification gate) | Low (human judgment) | High | Low (with good invariants) |
| Resumability | ✅ Native | N/A | N/A | ⚠️ Checkpoint possible |
The verdict: Traditional firms provide credibility and legal coverage but can't match Nemesis's methodological depth or iteration. Static analysis and fuzzing are faster but fundamentally single-pass — they can't achieve the emergent finding discovery of cross-feed iteration. Nemesis occupies a unique position: deeper than automated tools, faster and more iterative than human teams, at a fraction of the cost.
For maximum security, the optimal stack is Nemesis for continuous, iterative discovery plus targeted traditional audit for final legal validation — especially for protocols handling significant value.
FAQ: What Developers Ask About Nemesis
Is Nemesis-Auditor a replacement for professional security audits?
No — it's a force multiplier. Nemesis finds bugs faster and more iteratively than traditional processes, but it doesn't provide the legal liability coverage or formal certification that regulated projects require. Use Nemesis continuously during development, then engage professionals for final validation.
Does Nemesis only work for blockchain/Solidity code?
Absolutely not. While smart contracts are a natural fit due to high exploit value and state-heavy architectures, Nemesis is language-agnostic. The README explicitly lists Solidity, Move, Rust, Go, C++, Python, and TypeScript. Any codebase with coupled state mutations and business logic assumptions can benefit.
How much does running Nemesis cost?
The tool itself is MIT-licensed and free. You need Claude Code, which requires an Anthropic API subscription. Costs scale with audit duration and codebase size. For reference, a full convergence audit on a medium-sized Solidity protocol typically costs $20-$80 in API usage — orders of magnitude cheaper than traditional audits.
Can Nemesis generate false positives?
Yes — intentionally. The Feynman Auditor's aggressiveness means it surfaces suspicions that may not be exploitable. However, the verification gate (Phase 5 in both sub-agents) eliminates many false positives before reporting. The Verification field in findings lets you triage: "Code trace" findings need human review; "PoC test" findings are confirmed.
What happens if an audit is interrupted?
Use /nemesis --continue to resume from the last completed pass. Nemesis writes intermediate findings to disk after each pass, so no progress is lost. This is essential for large codebases where full convergence might take multiple sessions.
How does Nemesis compare to AI code review tools like GitHub Copilot's security features?
GitHub Copilot's security features are reactive and pattern-based — they flag known bad patterns as you type. Nemesis is proactive and semantic — it interrogates design assumptions and traces state evolution across entire call graphs. They're complementary: Copilot for immediate feedback, Nemesis for deep architectural analysis.
Can I modify or extend Nemesis's audit methodologies?
Yes — the skill-based architecture means you can edit SKILL.md files to adjust questioning patterns, add new phases, or integrate additional tools. The MIT license permits modification. However, the convergence logic in the orchestrator skill should be preserved for the iterative benefits to hold.
Conclusion: Your Code's Hubris Ends Here
Nemesis-Auditor represents something rare in security tooling: a genuine methodological innovation, not just faster execution of old approaches. The alternating feedback loop between first-principles interrogation and state inconsistency mapping achieves emergent vulnerability detection that single-pass methodologies — human or automated — cannot replicate.
For developers building in high-stakes domains, Nemesis transforms security from a pre-launch checkbox into a continuous, iterative discipline. It finds the bugs that destroy protocols. It questions the assumptions that cost millions. It maps the state desyncs that drain wallets in seconds.
The Greek Nemesis punished hubris — the dangerous confidence that leads to downfall. Your code was written with confidence. Nemesis questions that confidence. Then it maps what your confidence forgot to protect. Then it questions it again.
Nothing survives both passes.
Ready to audit like your protocol's survival depends on it? Clone github.com/0xiehnnkta/nemesis-auditor today, integrate it into your Claude Code workflow, and discover what your previous audits missed. Your future self — and your users' funds — will thank you.
Found this analysis valuable? Star the repository, share with your security team, and subscribe for deep dives into AI-augmented development workflows.