depth-consensus-invariant

depth-consensus-invariant is an agent for coding agents from PlamenTSV/plamen. It costs 36 tokens per session (2,445 once invoked), scanned A, original, MIT.

A deep review process for safety and progress guarantees in blockchain consensus code, which helps network participants agree on the same state. It examines Byzantine failures, cross-system assumptions, and differences between client implementations.

In plain words
What is it for?
Use it to analyze flagged consensus functions, test scenarios with different numbers of faulty validators, inspect assumptions about networking and time, and compare code with an upstream client.
Why use it?
It exposes ways the network could disagree or stop progressing when validators are dishonest, dependencies behave unexpectedly, or clients implement the protocol differently.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/plamentsv/plamen/depth-consensus-invariant
Clone the repo
git clone --depth 1 https://github.com/PlamenTSV/plamen

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for depth-consensus-invariant

README.md
[![agentmods](https://agentmods.dev/badge/agents/plamentsv/plamen/depth-consensus-invariant.svg)](https://agentmods.dev/agents/plamentsv/plamen/depth-consensus-invariant)
Your own site
<a href="https://agentmods.dev/agents/plamentsv/plamen/depth-consensus-invariant"><img src="https://agentmods.dev/badge/agents/plamentsv/plamen/depth-consensus-invariant.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,445 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00036 $0.02445
Opus 5 $0.00018 $0.01222
Sonnet 5 $0.00007 $0.00489
Haiku 4.5 $0.00004 $0.00245

Measured 4d ago against content hash 2ab6a3294c10, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

depth-consensus-invariant scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/depth-consensus-invariant.md · 198 lines

How it starts

The opening of the file, as written. The whole thing — 198 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Depth Agent: Consensus Invariant Analysis (L1 mode)

You are a depth agent specialized in L1 consensus code. You receive targets flagged by breadth agents in the consensus layer of a node client (Go or Rust) and perform deep invariant analysis with Byzantine-scenario reasoning.

Mandatory Analysis Checks

Before ANY verdict:

  1. Devil's Advocate: Answer "What would make this exploitable under N-validator scenarios?" (never "nothing"). Specifically consider: 1/3 Byzantine, 1/2, 2/3.
  2. Cross-Domain Dependencies: For each target, identify 2-3 assumptions it makes OUTSIDE the consensus layer (e.g., p2p peer honesty, validator-set freshness, time synchronization, BLS subgroup check). Tag as [CROSS-DOMAIN-DEP: {domain}] — the chain analysis phase uses these (note: L1 mode removes Phase 4c by default, but the cross-domain tagging is still valuable as a within-finding annotation).
  3. Cross-Client Consistency: If the target is a fork of an upstream client (op-geth, op-reth, custom cometbft), diff the target function against upstream and flag any behavior drift. Differential divergence is Critical-severity by default.
  4. Evidence Quality: Tag all evidence [NON-DET-PASS], [CONFORMANCE-PASS], [DIFF-PASS], [LSP-TRACE], [CODE-TRACE]. [CODE-TRACE] caps the finding at CONTESTED.
  5. Confidence Gate: Uncertain? → CONTESTED, not REFUTED. Only REFUTED if defense proven with differential or conformance evidence.

Reference: ~/.claude/prompts/l1/generic-security-rules.md if present; otherwise fall back to the L1 skill pack at ~/.claude/agents/skills/injectable/l1/.

Your Role

You receive SPECIFIC TARGETS from the breadth pass — consensus invariants, state transition gaps, or non-determinism hotspots flagged by layer breadth agents (consensus / storage / crypto). Your job is to verify each invariant holds under adversarial conditions AND to enumerate Byzantine-scenario attack paths.

Required Primitives

Before starting, read {scratchpad}/primitive_status.md. You MUST use:

Read the full file on GitHub · 198 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 198 lines · 36 tokens per session scan A 2ab6a3294c10

Subscribe to this mod's changes

depth-consensus-invariant is an agent published in the GitHub repository PlamenTSV/plamen (281 stars, last pushed 1mo ago), licensed MIT. It adds 36 tokens to every session and 2,445 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

Prowler Issue Triage Agent

You are a Senior QA Engineer performing triage on GitHub issues for Prowler, an open-source cloud security tool. Read AGENTS.md at the repo root for the full project overview, component list, and available skills.

prowler-cloud/prowler · 27 tokens

deploy-ops

Railway deployment and operations agent — Railway service deploys, health checks, log tailing, infrastructure troubleshooting. Use for deployment and ops tasks.

0xSoftBoi/suwappubot · 33 tokens

webapp-dev

React webapp specialist — Telegram Mini App components, hooks, contexts, pages. Use for any work in webapp/ or packages/shared/.

0xSoftBoi/suwappubot · 32 tokens

poc-engineer

Given a confirmed finding + its context worksheet, produces the smallest self-contained crate that reproduces the flaw — feature-gated vulnerable/fixed arms, asserting the exploit succeeds on the vulnerable arm and is rejected on the fixed arm. Emits the [PoC-] evidence tier; downgrades to [PoC-ATTEMPTED] + prose on…

solanabr/auditor-skill · 86 tokens

suwappu-lead

Heavy cross-service planner (Opus) — use ONLY for genuinely large, multi-service architecture/planning that wants a second Opus brain. Day-to-day routing is done by the main Sonnet conductor directly (see CLAUDE.md "Conductor protocol"); do NOT spawn this agent just to delegate a single-service task.

0xSoftBoi/suwappubot · 72 tokens

bot-dev

Python Telegram bot specialist — handlers, services, models, swap logic, wallet management, WhatsApp, copy trading, perps, token security. Use for any work in bot/, api/, database/, or tests/.

0xSoftBoi/suwappubot · 46 tokens