consensus-safety-invariants

consensus-safety-invariants is a skill for Claude Code, Codex from PlamenTSV/plamen. It costs 45 tokens per session (7,146 once invoked), scanned A, original, MIT.

A review guide for checking the safety rules of blockchain consensus code. Consensus is the process nodes use to agree on the same state, and the guide looks for non-determinism, incomplete state changes, and broken safety or progress conditions.

In plain words
What is it for?
It is for auditing consensus implementations in Go or Rust, including checks across state transitions, edge cases, and consistency between different clients.
Why use it?
A consensus bug can make honest nodes disagree or prevent the network from progressing. The guide focuses an audit on the conditions that must hold across consensus, state-transition, fork-choice, and beacon-chain code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; mentions Claude Code.

Good fit It is for auditing consensus implementations in Go or Rust, including checks across state transitions, edge cases, and consistency between different clients.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/plamentsv/plamen/consensus-safety-invariants
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.

Any agent
npx skills add PlamenTSV/plamen --skill consensus-safety-invariants
Clone the repo
git clone --depth 1 https://github.com/PlamenTSV/plamen

Made for: Claude Code, Codex.

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 consensus-safety-invariants

README.md
[![agentmods](https://agentmods.dev/badge/skills/plamentsv/plamen/consensus-safety-invariants/github.svg)](https://agentmods.dev/skills/plamentsv/plamen/consensus-safety-invariants)
Your own site
<a href="https://agentmods.dev/skills/plamentsv/plamen/consensus-safety-invariants"><img src="https://agentmods.dev/badge/skills/plamentsv/plamen/consensus-safety-invariants/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for consensus-safety-invariants

Your own site · 80×15
<a href="https://agentmods.dev/skills/plamentsv/plamen/consensus-safety-invariants"><img src="https://agentmods.dev/badge/skills/plamentsv/plamen/consensus-safety-invariants.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,146 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00045 $0.07146
Opus 5 $0.00023 $0.03573
Sonnet 5 $0.00009 $0.01429
Haiku 4.5 $0.00005 $0.00715

Measured 9d ago against content hash b4d74c2e7d50, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

consensus-safety-invariants 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 9d 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/skills/injectable/l1/consensus-safety-invariants/SKILL.md · 396 lines

How it starts

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

Injectable Skill: Consensus Safety Invariants

L1 trigger: L1_PATTERN=true AND (consensus/ OR state_transition/ OR fork_choice/ OR beacon_chain/ detected in recon subsystem map) Inject Into: depth-consensus-invariant (primary) or depth-state-trace (fallback) Language: Go and Rust (language-specific examples embedded) Finding prefix: [CS-N] (consensus-safety) Status: v0.1 draft, Round 4 exemplars pending

Orchestrator Decomposition Guide

Map sections to the assigned depth agent:

  • Sections 1, 2: depth-consensus-invariant (determinism + invariants)
  • Sections 3, 4: depth-state-trace (state transition completeness)
  • Section 5: depth-edge-case (boundary conditions)
  • Section 6: depth-external (cross-client consistency)

When This Skill Activates

Recon sets L1_PATTERN=true and identifies a consensus subsystem in the target. This skill attaches to agents auditing that subsystem. It is the single most load-bearing L1 skill — consensus bugs are Critical tier by default.

1. Non-Determinism Sources

A consensus implementation is non-deterministic if two honest nodes processing the same input can reach different output states. Each of the following is a production-bug class:

1a. Map iteration order

In Go, for k, v := range m visits keys in an unspecified order. In Rust, HashMap iteration order varies between runs (non-deterministic by default; BTreeMap is ordered).

Check: For every consensus-critical function, enumerate every map iteration. For each:

  • Is the iteration result used to compute state that other nodes must agree on? If yes → non-determinism bug.
  • Is there a deterministic sort (sort.Strings(keys) in Go; BTreeMap or explicit .sort() in Rust) before iteration?

Known exemplar class: Cosmos SDK Dragonberry/Elderflower (2022) involved IAVL tree iteration that became load-bearing for proof generation.

Tag: [NON-DET:map-iter:{file}:{line} → {consumer}]

1b. Node-local timestamps

time.Now(), std::time::SystemTime::now(), system clocks, file mtimes — any value that differs across nodes at the same block height.

Read the full file on GitHub · 396 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. 9d ago First seen · 396 lines · 45 tokens per session scan A b4d74c2e7d50

Subscribe to this mod's changes

consensus-safety-invariants is a skill published in the GitHub repository PlamenTSV/plamen (294 stars, last pushed yesterday), licensed MIT. It adds 45 tokens to every session and 7,146 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 skills, from other repositories

analyzing-ethereum-smart-contract-vulnerabilities

Perform static and symbolic analysis of Solidity smart contracts using Slither and Mythril to detect reentrancy, integer overflow, access control, and other vulnerability classes before deployment to Ethereum mainnet.

mukul975/Anthropic-Cybersecurity-Skills · 49 tokens

prowler-tour

Keeps product-tour definitions aligned with the UI features they describe. Trigger: When modifying UI components that have associated tours, editing tour definition files, or renaming data-tour-id attributes.

prowler-cloud/prowler · 41 tokens

analyzing-ethereum-smart-contract-vulnerabilities

Perform static and symbolic analysis of Solidity smart contracts using Slither and Mythril to detect reentrancy, integer overflow, access control, and other vulnerability classes before deployment to Ethereum mainnet.

xalgorix/xalgorix · 49 tokens

evm-bytecode-analysis

Analyze supplied deployed EVM runtime bytecode with EVMole or guide a separate application in integrating a published EVMole Rust, Go, Python, or JavaScript binding. Use for unverified-contract inspection, ABI reconstruction from runtime code, selector discovery, storage-access analysis, EVM control-flow inspection…

cdump/evmole · 135 tokens

talos-action-development

Develop, modify, review, and maintain standalone Talos actions in contracts/tasks/actions, including chain guardrails, contract bindings, transaction safety, schedules, action catalogues, and Talos documentation. Use when adding an action, changing an action’s behavior or parameters, updating a Talos schedule, or…

OriginProtocol/origin-dollar · 70 tokens

web3-poc-foundry

Complete Foundry PoC writing guide + all cheatcodes + DeFiHackLabs reproduction patterns. Use this when building a proof of concept exploit, setting up a fork test, using Foundry cheatcodes, or reproducing a known DeFi hack for learning.

Awarexone/web3-bug-bounty-hunting-ai-skills · 59 tokens