/plamen-l1-wizard
Plamen v2 L1 infrastructure audit wizard. Collects config, launches deterministic driver.
$ npx -y skills add PlamenTSV/plamen --agent claude-codeHow 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-l1-wizard
Context preview
What this command does when you run it.
Plamen v2 L1 infrastructure audit wizard. Collects config, launches deterministic driver.
Command definition
plamen-l1-wizard.mddescription: "Plamen v2 L1 infrastructure audit wizard. Collects config, launches deterministic driver."
Plamen v2 — L1 Infrastructure Audit Wizard
> This wizard collects L1 audit parameters and launches `plamen_driver.py`. > The driver handles ALL phase sequencing deterministically.
Step 1: Banner
Output:
██████╗ ██╗ █████╗ ███╗ ███╗███████╗███╗ ██╗
██╔══██╗██║ ██╔══██╗████╗ ████║██╔════╝████╗ ██║
██████╔╝██║ ███████║██╔████╔██║█████╗ ██╔██╗ ██║
██╔═══╝ ██║ ██╔══██║██║╚██╔╝██║██╔══╝ ██║╚██╗██║
██║ ███████╗██║ ██║██║ ╚═╝ ██║███████╗██║ ╚████║
╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝
**L1 Infrastructure Auditor** v2.2.4 — Deterministic Driver
┌─ L1 Infrastructure Mode ──────────────────────────────┐
│ Scope: Go / Rust node clients (50k-500k LOC) │
│ Tiers: T0 patch | T1 subsystem | T2 whole-client │
│ Chain analysis: REMOVED (point vulnerabilities) │
│ Evidence: [DIFF-PASS] [NON-DET-PASS] [LSP-TRACE] │
└────────────────────────────────────────────────────────┘
Then run the toolchain probe. **CRITICAL**: Copy the bash block below VERBATIM into the Bash tool. Do NOT rewrite it in PowerShell or any other syntax. The Bash tool always runs bash, even on Windows.
export PATH="$HOME/.cargo/bin:$HOME/go/bin:$HOME/.local/bin:$PATH" && \
echo "L1 Toolchain:" && \
echo -n " Required: " && \
(command -v claude >/dev/null 2>&1 && echo -n "claude " || echo -n "MISSING:claude ") && \
(command -v python >/dev/null 2>&1 && echo -n "python " || echo -n "MISSING:python ") && \
(command -v git >/dev/null 2>&1 && echo -n "git" || echo -n "MISSING:git") && echo "" && \
echo -n " Go: " && \
(command -v go >/dev/null 2>&1 && echo -n "go " || echo -n "-go ") && \
(command -v scip-go >/dev/null 2>&1 && echo -n "scip-go " || echo -n "-scip-go ") && \
(command -v opengrep >/dev/null 2>&1 && echo -n "opengrep" || (command -v semgrep >/dev/null 2>&1 && echo -n "semgrep" || echo -n "-opengrep")) && echo "" && \
echo -n " Rust: " && \
(command -v cargo >/dev/null 2>&1 && echo -n "cargo " || echo -n "-cargo ") && \
(command -v rust-analyzer >/dev/null 2>&1 && echo -n "rust-analyzer" || echo -n "-rust-analyzer") && echo ""
Step 1.5: Detect Existing Audit
Before collecting config, check if an existing audit can be resumed. Search for `.scratchpad/config.json` in the current directory (or the path from `$ARGUMENTS` if provided):
if [ -f ".scratchpad/config.json" ]; then echo "FOUND:.scratchpad/config.json"
elif [ -f "src/.scratchpad/config.json" ]; then echo "FOUND:src/.scratchpad/config.json"
else echo "NONE"; fi
If a config is found, read the checkpoint file (`_v2_checkpoint.json` in that scratchpad) to determine progress, then offer:
AskUserQuestion(questions=[{
question: "Existing audit detected. What would you like to do?",
header: "Existing Audit Found",
options: [
{ label: "Resume", description: "Continue from last checkpoint ({LAST_PHASE} → next)" },
{ label: "Fresh restart", description: "Wipe scratchpad and start over" },
{ label: "New audit", description: "Ignore existing, configure a new target" }
]
}])- **Resume**: Skip to launch section — use the existing `config.json` path directly. Launch with `run_in_background: true`.
- **Fresh restart**: Launch with `--fresh` flag. Skip to launch section.
- **New audit**: Fall through to Step 2 (codebase scan).
If no config found, fall through to Step 2.
Step 2: Codebase Scan
Run a quick codebase scan to detect language and size. **CRITICAL**: Copy the bash block below VERBATIM into the Bash tool — do NOT rewrite in PowerShell.
cd "{PROJECT_PATH}" && \
echo "Language detection:" && \
GO_LOC=$(find . -name "*.go" -not -path "*/vendor/*" -not -path "*_test.go" | xargs wc -l 2>/dev/null | tail -1 | awk '{print $1}') && \
RS_LOC=$(find . -name "*.rs" -not -path "*/target/*" -not -name "*test*" | xargs wc -l 2>/dev/null | tail -1 | awk '{print $1}') && \
echo " Go: ${GO_LOC:-0} LOC" && \
echo " Rust: ${RS_LOC:-0} LOC" && \
echo "Modules:" && \
ls -d */ 2>/dev/null | head -20Determine:
- `LANGUAGE`: "go" if Go LOC > Rust LOC, else "rust"
- `LOC`: total lines
- `DETECTED_TIER`: T0 if <2k, T1 if 5-30k, T2 if 30-100k, T3 if >100k
- `IS_FORK`: check for fork indicators (upstream remote, README mentions)
Step 3: Interactive Questioning (ALL mandatory, ALL use AskUserQuestion)
**Q1 — Target**:
AskUserQuestion(questions=[{
question: "Is this the L1 target?",
header: "Target ({LANGUAGE}, {LOC} LOC)",
options: [
{ label: "Yes, use {PROJECT_PATH}", description: "{LANGUAGE} codebase, {LOC} LOC" },
{ label: "No, let me specify", description: "I'll provide a different path" }
]
}])**Q2 — Tier** (ALWAYS ask, never auto-select):
AskUserQuestion(questions=[{
question: "Select audit tier:",
header: "Tier (detected: {DETECTED_TIER} based on {LOC} LOC)",
options: [
{ label: "T0 — Patch (<=2k LOC diff)", description: "PR/commit review" },
{ label: "T1 — Subsystem (5-30k LOC)", description: "One module cluster" },
{ label: "T2 — Whole-client (30-100k LOC)", description: "Full codebase, all subsystems" },
{ label: "T3 — Full client screen (>100k)", description: "First-pass, breadth over depth" }
]
}])**Q3 — Depth mode**:
AskUserQuestion(questions=[{
question: "Audit depth?",
header: "Depth",
options: [
{ label: "Core (Recommended)", description: "~25-40 agents. Standard L1 audit depth." },
{ label: "Thorough", description: "~35-55 agents. Iterative depth, re-scan, skeptic-judge." },
{ label: "Light", description: "~15-20 agents. Quick scan, Pro plan compatible." }
]
}])**Q4 — Module selection** (T1 only): Enumerate detected modules with LOC:
for dir in $(ls -d */ 2>/dev/null); do
LOC_MOD=$(find "$dir" -name "*.go" -o -name "*.rs" | grep -v test | xargs wc -l 2>/dev/null | tail -1 | awk '{pRead more
description: "Plamen v2 L1 infrastructure audit wizard. Collects config, launches deterministic driver."
Plamen v2 — L1 Infrastructure Audit Wizard
> This wizard collects L1 audit parameters and launches `plamen_driver.py`. > The driver handles ALL phase sequencing deterministically.
Step 1: Banner
Output:
██████╗ ██╗ █████╗ ███╗ ███╗███████╗███╗ ██╗ ██╔══██╗██║ ██╔══██╗████╗ ████║██╔════╝████╗ ██║ ██████╔╝██║ ███████║██╔████╔██║█████╗ ██╔██╗ ██║ ██╔═══╝ ██║ ██╔══██║██║╚██╔╝██║██╔══╝ ██║╚██╗██║ ██║ ███████╗██║ ██║██║ ╚═╝ ██║███████╗██║ ╚████║ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝
**L1 Infrastructure Auditor** v2.2.4 — Deterministic Driver
┌─ L1 Infrastructure Mode ──────────────────────────────┐ │ Scope: Go / Rust node clients (50k-500k LOC) │ │ Tiers: T0 patch | T1 subsystem | T2 whole-client │ │ Chain analysis: REMOVED (point vulnerabilities) │ │ Evidence: [DIFF-PASS] [NON-DET-PASS] [LSP-TRACE] │ └────────────────────────────────────────────────────────┘
Then run the toolchain probe. **CRITICAL**: Copy the bash block below VERBATIM into the Bash tool. Do NOT rewrite it in PowerShell or any other syntax. The Bash tool always runs bash, even on Windows.
export PATH="$HOME/.cargo/bin:$HOME/go/bin:$HOME/.local/bin:$PATH" && \ echo "L1 Toolchain:" && \ echo -n " Required: " && \ (command -v claude >/dev/null 2>&1 && echo -n "claude " || echo -n "MISSING:claude ") && \ (command -v python >/dev/null 2>&1 && echo -n "python " || echo -n "MISSING:python ") && \ (command -v git >/dev/null 2>&1 && echo -n "git" || echo -n "MISSING:git") && echo "" && \ echo -n " Go: " && \ (command -v go >/dev/null 2>&1 && echo -n "go " || echo -n "-go ") && \ (command -v scip-go >/dev/null 2>&1 && echo -n "scip-go " || echo -n "-scip-go ") && \ (command -v opengrep >/dev/null 2>&1 && echo -n "opengrep" || (command -v semgrep >/dev/null 2>&1 && echo -n "semgrep" || echo -n "-opengrep")) && echo "" && \ echo -n " Rust: " && \ (command -v cargo >/dev/null 2>&1 && echo -n "cargo " || echo -n "-cargo ") && \ (command -v rust-analyzer >/dev/null 2>&1 && echo -n "rust-analyzer" || echo -n "-rust-analyzer") && echo ""
Step 1.5: Detect Existing Audit
Before collecting config, check if an existing audit can be resumed. Search for `.scratchpad/config.json` in the current directory (or the path from `$ARGUMENTS` if provided):
if [ -f ".scratchpad/config.json" ]; then echo "FOUND:.scratchpad/config.json" elif [ -f "src/.scratchpad/config.json" ]; then echo "FOUND:src/.scratchpad/config.json" else echo "NONE"; fi
If a config is found, read the checkpoint file (`_v2_checkpoint.json` in that scratchpad) to determine progress, then offer:
AskUserQuestion(questions=[{
question: "Existing audit detected. What would you like to do?",
header: "Existing Audit Found",
options: [
{ label: "Resume", description: "Continue from last checkpoint ({LAST_PHASE} → next)" },
{ label: "Fresh restart", description: "Wipe scratchpad and start over" },
{ label: "New audit", description: "Ignore existing, configure a new target" }
]
}])- **Resume**: Skip to launch section — use the existing `config.json` path directly. Launch with `run_in_background: true`.
- **Fresh restart**: Launch with `--fresh` flag. Skip to launch section.
- **New audit**: Fall through to Step 2 (codebase scan).
If no config found, fall through to Step 2.
Step 2: Codebase Scan
Run a quick codebase scan to detect language and size. **CRITICAL**: Copy the bash block below VERBATIM into the Bash tool — do NOT rewrite in PowerShell.
cd "{PROJECT_PATH}" && \
echo "Language detection:" && \
GO_LOC=$(find . -name "*.go" -not -path "*/vendor/*" -not -path "*_test.go" | xargs wc -l 2>/dev/null | tail -1 | awk '{print $1}') && \
RS_LOC=$(find . -name "*.rs" -not -path "*/target/*" -not -name "*test*" | xargs wc -l 2>/dev/null | tail -1 | awk '{print $1}') && \
echo " Go: ${GO_LOC:-0} LOC" && \
echo " Rust: ${RS_LOC:-0} LOC" && \
echo "Modules:" && \
ls -d */ 2>/dev/null | head -20Determine:
- `LANGUAGE`: "go" if Go LOC > Rust LOC, else "rust"
- `LOC`: total lines
- `DETECTED_TIER`: T0 if <2k, T1 if 5-30k, T2 if 30-100k, T3 if >100k
- `IS_FORK`: check for fork indicators (upstream remote, README mentions)
Step 3: Interactive Questioning (ALL mandatory, ALL use AskUserQuestion)
**Q1 — Target**:
AskUserQuestion(questions=[{
question: "Is this the L1 target?",
header: "Target ({LANGUAGE}, {LOC} LOC)",
options: [
{ label: "Yes, use {PROJECT_PATH}", description: "{LANGUAGE} codebase, {LOC} LOC" },
{ label: "No, let me specify", description: "I'll provide a different path" }
]
}])**Q2 — Tier** (ALWAYS ask, never auto-select):
AskUserQuestion(questions=[{
question: "Select audit tier:",
header: "Tier (detected: {DETECTED_TIER} based on {LOC} LOC)",
options: [
{ label: "T0 — Patch (<=2k LOC diff)", description: "PR/commit review" },
{ label: "T1 — Subsystem (5-30k LOC)", description: "One module cluster" },
{ label: "T2 — Whole-client (30-100k LOC)", description: "Full codebase, all subsystems" },
{ label: "T3 — Full client screen (>100k)", description: "First-pass, breadth over depth" }
]
}])**Q3 — Depth mode**:
AskUserQuestion(questions=[{
question: "Audit depth?",
header: "Depth",
options: [
{ label: "Core (Recommended)", description: "~25-40 agents. Standard L1 audit depth." },
{ label: "Thorough", description: "~35-55 agents. Iterative depth, re-scan, skeptic-judge." },
{ label: "Light", description: "~15-20 agents. Quick scan, Pro plan compatible." }
]
}])**Q4 — Module selection** (T1 only): Enumerate detected modules with LOC:
for dir in $(ls -d */ 2>/dev/null); do
LOC_MOD=$(find "$dir" -name "*.go" -o -name "*.rs" | grep -v test | xargs wc -l 2>/dev/null | tail -1 | awk '{pAutonomous 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.
Repo: PlamenTSV/plamen
Other commands on plamen.
- /plamen-l1
Launch the V2 deterministic L1 audit pipeline for Go/Rust node clients (same as /plamen-l1-wizard). Experimental.
Open command - /plamen-wizard
Plamen v2 Smart Contract audit wizard. Collects config, launches deterministic driver.
Open command - /plamen
Launch the V2 deterministic Smart Contract audit pipeline (same as /plamen-wizard). Usage: /plamen [light|core|thorough] [path]
Open command

