Skip to content
Security
Command

/plamen

Launch the V2 deterministic Smart Contract audit pipeline (same as /plamen-wizard). Usage: /plamen [light|core|thorough] [path]

From plugin
plamen
2764 skills12 agents4 commands
Install
$ npx -y skills add PlamenTSV/plamen --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/plamen

Context preview

What this command does when you run it.

Launch the V2 deterministic Smart Contract audit pipeline (same as /plamen-wizard). Usage: /plamen [light|core|thorough] [path]

Command definition

plamen.md
description: "Launch the V2 deterministic Smart Contract audit pipeline (same as /plamen-wizard). Usage: /plamen [light|core|thorough] [path]"

Plamen Audit Pipeline

Step -1: Route to V2 Wizard (MANDATORY first check)

> **For interactive users**: this is the entry point for the V2 deterministic > driver. Reads better as `/plamen-wizard` if you want clarity, but `/plamen` > works identically and is what most users type.

**Routing rule** (evaluate `$ARGUMENTS` exactly once, before any other step):

  • If `$ARGUMENTS` is empty OR does NOT contain the literal token `wrapper-launch`:
  • **STOP processing this file.** Read and execute `~/.claude/commands/plamen-wizard.md`

from its Step 1 onward, passing `$ARGUMENTS` through unchanged. The wizard collects audit parameters and launches the deterministic Python driver at `~/.claude/scripts/plamen_driver.py`. The driver runs each phase as an isolated subprocess with gates, dynamic retry, and crash-resumable checkpoints — replacing the legacy V1 LLM orchestrator that previously lived in this file.

  • Do NOT run any of the Step 0..Step 6 sections below in interactive mode.

Those sections remain in this file ONLY because the driver invokes them via `claude -p --resume` with `wrapper-launch` set, section-extracting one phase block at a time. They are NOT a complete interactive pipeline.

  • If `$ARGUMENTS` contains `wrapper-launch`:
  • You are running INSIDE a driver subprocess. The driver has section-

extracted a specific phase block from this file and you should execute only that block. Proceed to Step 0 below; the existing logic handles the per-phase invocation correctly.

> **Why this routing exists**: pre-v2.0.0, `/plamen` was an LLM-orchestrator > prompt that ran the entire audit pipeline inside a single Claude Code > conversation. That worked on small audits but drifted on large ones — > context saturation late in the run caused mandatory steps to be silently > skipped, output files to be claimed-written-but-missing on disk, and > findings to be lost to compaction. v2.0.0 replaced the LLM orchestrator > with a deterministic Python driver. The interactive surface now points at > the V2 wizard so users get the reliable path by default, while the driver > still uses this file's per-phase sections as subprocess prompts.

---

Orchestration Protocol

**MANDATORY**: Before starting any audit work, read and apply `~/.claude/rules/orchestrator-rules.md`. It contains the AUDIT MODES table, CRITICAL RULES 1-16, and the orchestration architecture. You are the orchestrator " those rules govern how you spawn agents, manage phases, and enforce completeness.

Step 0: Interactive Setup Wizard

**Shortcut handling**: Parse `$ARGUMENTS` for pre-filled values:

  • If it contains "light", "core", or "thorough", set `MODE` accordingly.
  • **If it contains "l1" (L1 infrastructure audit mode, experimental)**: set `MODE=l1` and **delegate the entire audit flow to `~/.claude/commands/plamen-l1.md`**. Read that file and follow its instructions from Step 0 onwards. This file (plamen.md) covers smart-contract modes only. Do NOT attempt to run L1 audits through the smart-contract pipeline " the phase shape, depth roles, skill set, and verification protocol are all different. L1-specific wizard, Phase 0.5 Bake, layer-decomposed recon/breadth, new depth agent roles (depth-consensus-invariant, depth-network-surface), removed Phase 4c, and the new evidence-tag verification live in `plamen-l1.md`.
  • If it contains an absolute path (e.g., `D:\...` or `/home/...`), set `PROJECT_PATH` to that path. Otherwise use cwd.
  • If it contains `docs:` followed by a path or URL, set `DOCS_PATH` to that value and skip Step 0c.
  • If it contains `nodocs`, set `DOCS_PATH` to empty and skip Step 0c.
  • If it contains `network:` followed by a network name (e.g., `ethereum`, `arbitrum`, `optimism`, `base`, `polygon`, `bsc`, `avalanche`, or an RPC URL), set `NETWORK` to that value. Used for production verification and fork testing.
  • If it contains `scope:` followed by a file path, set `SCOPE_FILE` to that path. The file should list in-scope contracts/files.
  • If it contains `notes:` followed by text (up to end of arguments or next known prefix), set `SCOPE_NOTES` to that text. Passed to recon as additional audit context (e.g., "focus on vault module, ignore governance").
  • If it contains `proven-only:` followed by `true` (or just `proven-only: true`), set `PROVEN_ONLY = true`. When enabled, findings whose best evidence is `[CODE-TRACE]` (no executed PoC or fuzzer counterexample) are capped at Low severity in the report. Default: false.
  • If it contains `wrapper-launch`, set `LAUNCHED_FROM_WRAPPER = true`. The user already confirmed the launch in the terminal wrapper " skip Step 0d (cost estimate + confirmation) entirely and jump directly to Step 1 (language detection). Do NOT show a second confirmation prompt.
  • If MODE, PROJECT_PATH, DOCS_PATH (or nodocs), AND `proven-only:` are all resolved AND `wrapper-launch` is present, skip the ENTIRE wizard " jump directly to Step 1 (language detection). No cost estimate, no confirmation.
  • If MODE, PROJECT_PATH, DOCS_PATH (or nodocs), AND `proven-only:` are all resolved but NO `wrapper-launch`, skip the wizard " jump to "Step 0d: Cost Estimate + Launch Confirmation".
  • If MODE, PROJECT_PATH, and DOCS_PATH (or nodocs) are resolved but `scope:` and `proven-only:` are NOT specified, skip to Step 0c.5 (scope selection).
  • If MODE is set but docs status is unknown (no `docs:` and no `nodocs`), skip to Step 0c only.
  • If `$ARGUMENTS` contains "compare", jump directly to the compare flow (Step 0e). If it also contains `report:` followed by a file path, set `REPORT_PATH`. If it contains `ground_truth:` followed by a file path, set `GROUND_TRUTH_PATH`. If both are set, skip the interactive file selection in Step 0e and proceed directly.
  • If `$ARGUMENTS` is empty, run the full interactive wizard st
Read more
Ships withplamen

Autonomous Web3 security auditor for Claude Code and OpenAI Codex CLI. Orchestrates 18-100 AI agents across 40+ phases to produce audit reports with verified PoC exploits — for smart contracts and L1 node-client infrastructure.

Get the whole plugin