fork-choice-audit

fork-choice-audit is a skill for Claude Code, Codex from PlamenTSV/plamen. It costs 51 tokens per session (2,870 once invoked), scanned A, original, MIT.

A review guide for checking fork-choice code in blockchain systems. A fork-choice rule decides which competing chain or block history a network should treat as the current one.

In plain words
What is it for?
Use it to audit LMD-GHOST, Tendermint, longest-chain, or custom fork-choice implementations, including equivocation handling, block selection, and reorganization state.
Why use it?
Errors involving duplicate blocks, conflicting validator messages, or chain reorganizations can make nodes disagree about the accepted chain.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to audit LMD-GHOST, Tendermint, longest-chain, or custom fork-choice implementations, including equivocation handling, block selection, and reorganization state.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/plamentsv/plamen/fork-choice-audit
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 fork-choice-audit
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 fork-choice-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/plamentsv/plamen/fork-choice-audit.svg)](https://agentmods.dev/skills/plamentsv/plamen/fork-choice-audit)
Your own site
<a href="https://agentmods.dev/skills/plamentsv/plamen/fork-choice-audit"><img src="https://agentmods.dev/badge/skills/plamentsv/plamen/fork-choice-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,870 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.00051 $0.02870
Opus 5 $0.00026 $0.01435
Sonnet 5 $0.00010 $0.00574
Haiku 4.5 $0.00005 $0.00287

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

Security

Grade A, and why

fork-choice-audit 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 8d 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/fork-choice-audit/SKILL.md · 175 lines

How it starts

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

Injectable Skill: Fork Choice Audit

L1 trigger: L1_PATTERN=true AND (fork_choice/ OR ghost/ OR lmd/ OR consensus/tendermint/ OR fork.rs OR choice.rs detected in recon subsystem map) Inject Into: depth-consensus-invariant Language: Go and Rust Finding prefix: [FC-N] Status: v0.1 draft, Round 4 exemplars pending

Orchestrator Decomposition Guide

  • Section 1, 2: depth-consensus-invariant (rule correctness)
  • Section 3: depth-edge-case (equivocation + duplicate handling)
  • Section 4: depth-state-trace (reorg state consistency)

When This Skill Activates

Recon identifies a fork-choice module. This skill applies whether the protocol uses LMD-GHOST (Ethereum beacon chain), longest-chain (Bitcoin, pre-merge Ethereum), Tendermint locking (Cosmos), or a custom fork-choice rule.

1. Identify the Rule

Before auditing, determine which rule is implemented. Extract from spec docs and code:

Rule Signature Key invariants
LMD-GHOST "latest message driven — greedy heaviest observed subtree" Each validator's latest attestation contributes to a subtree weight; choose heaviest
Casper FFG + LMD-GHOST (Ethereum) LMD-GHOST bounded by finalized checkpoints Never revert past justified/finalized checkpoint
Tendermint BFT Round-based, locking on 2/3+ prevotes Locked validator cannot vote for conflicting proposal in same round
Nakamoto longest-chain Heaviest accumulated work Chain with most work wins; stale blocks discarded
HotStuff / Aptos / Sui 3-phase: prepare, precommit, commit No two conflicting QCs at the same view

Write the identified rule into the finding header so reviewers know which invariants apply.

2. Rule-Specific Invariants

2a. LMD-GHOST

  • Heaviest subtree monotonicity: adding an attestation can only increase (never decrease) the subtree weight
  • Latest-message tie-break: if two children have equal weight, tie-break is deterministic (typically lower root hash)
  • Boundary with finality: fork choice never selects a block that would require reverting a finalized block
  • Slot vs block: a slot can have zero, one, or multiple proposed blocks; fork choice must handle the missing-block case

Read the full file on GitHub · 175 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. 8d ago First seen · 175 lines · 51 tokens per session scan A e17925a35c79

Subscribe to this mod's changes

fork-choice-audit is a skill published in the GitHub repository PlamenTSV/plamen (286 stars, last pushed yesterday), licensed MIT. It adds 51 tokens to every session and 2,870 once invoked, about $0.0003 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

prowler-compliance-review

Reviews Pull Requests that add or modify compliance frameworks. Trigger: When reviewing PRs with compliance framework changes, CIS/NIST/PCI-DSS additions, or compliance JSON files.

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.

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

spec-to-code-compliance

Verifies code implements exactly what documentation specifies for blockchain audits. Use when comparing code against whitepapers, finding gaps between specs and implementation, or performing compliance checks for protocol implementations.

CraftOS-dev/CraftBot · 41 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