Skip to content
Security
Skill

/known-good-comparison

When auditing a contract that resembles a canonical implementation (OpenZeppelin, Solady, Uniswap, Compound, etc.), compare against the reference. Treat deviations as suspect by default.

From plugin
rugproof
1152 skills23 agents45 commands4 hooks

Claude Code

$ npx -y skills add omermaksutii/RugProof --skill known-good-comparison --agent claude-code

SKILL.md

known-good-comparison.SKILL.md
name: known-good-comparison
description: When auditing a contract that resembles a canonical implementation (OpenZeppelin, Solady, Uniswap, Compound, etc.), compare against the reference. Treat deviations as suspect by default.

Known-good comparison (meta-skill)

Most production Solidity is forks of well-known references. The fastest path to high-precision audit is to know what "normal" looks like and treat deviations as suspect.

Reference catalog

The skill maintains awareness of canonical shapes:

Tokens

  • OpenZeppelin ERC20, ERC721, ERC1155 (versions 4.x and 5.x)
  • Solady ERC20, ERC721, ERC1155, ERC4626
  • ERC-2612 permit canonical
  • Permit2 Uniswap canonical

Access / governance

  • OZ Ownable, Ownable2Step
  • OZ AccessControl, AccessControlEnumerable, AccessControlDefaultAdminRules
  • OZ Governor, GovernorVotes, GovernorTimelockControl
  • Compound Governor Bravo
  • OZ TimelockController

Proxies / upgrades

  • OZ ERC1967, UUPS, TransparentUpgradeable
  • OZ BeaconProxy
  • Diamond standard EIP-2535 reference
  • Solady LibClone

Math / utilities

  • OZ Math.mulDiv
  • Solady FixedPointMathLib
  • PRBMath UD60x18, SD59x18

AMMs / DEX

  • Uniswap V2 Pair, Router, Factory
  • Uniswap V3 Pool, NonfungiblePositionManager
  • Uniswap V4 PoolManager + hook templates
  • Curve StableSwap, CryptoSwap
  • Balancer V2, V3 vaults

Lending

  • Aave V3 Pool, AToken, VariableDebtToken
  • Compound V3 Comet
  • Morpho Blue

Vaults

  • OZ ERC4626 (v4.9+ for inflation defense)
  • Yearn V3 strategies
  • MetaMorpho

How to use

Step 1 — Detect reference

If the contract:

  • Imports from `@openzeppelin/contracts` or `solady/`
  • Inherits from a recognizable parent
  • Implements a recognizable interface (`IERC20`, `IPoolManager`, etc.)
  • Has function signatures matching a reference

→ Identify the reference and version.

Step 2 — Diff the deviations

For each function inherited or overridden from the reference:

  • Has its body been modified?
  • Has its access control been changed?
  • Has its return value been altered?
  • Has its modifier set been changed (e.g. `nonReentrant` removed)?

For each storage variable added beyond the reference:

  • Is the storage layout still compatible with upgrade safety?

Step 3 — Treat deviations as suspect

Each deviation gets a justification check:

  • Was this change intentional and beneficial?
  • Or was it a typo / mistake / regression?

Most exploits in forks live in the *deviation*, not the reference.

Output integration

When finding-writing, include a reference comparison if applicable:

[REENT-001 | High] Reentrancy in Vault.withdraw

  Reference: OpenZeppelin v5.0.2 ERC4626.withdraw
  Deviation: caller-side nonReentrant guard removed (commit 0xabc)
  Impact:    classic reentrancy pattern reintroduced
  
  → Confidence: HIGH (deviation from known-good adds the bug)

When NOT to use

  • Pure novel implementations with no canonical parent.
  • Contracts so heavily modified that the reference comparison is misleading.

Related

  • /diff-audit command — exposes this skill as a user-facing operation
  • [[confidence-scoring]] — known-good match → confidence MEDIUM-to-HIGH
  • [[multi-pass-self-critique]] — known-good is a third independent pass
Read more
@omermaksutii
Ships withrugproof

Rugproof your code before someone else does. 🌐 Live site: omermaksutii.github.io/RugProof 📦 Latest: v1.0.0 — 45 commands · 23 agents · 45 skills · 13 MCP servers · tested, offline-first, with rule packs, a benchmark, non-EVM coverage, and post-deploy

1152 skills23 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
11
Star history of omermaksutii/RugProof on GitHub, a chart by star-history.com

Other skills on rugproof.

More skills from other plugins.

api-security

api-security

Use for authorized security assessment of REST, GraphQL, WebSocket, or SOAP APIs, including discovery, authentication,…

@zhaoxuya520@zhaoxuya520Install Skill
nemoclaw-user-guide

nemoclaw-user-guide

Find official NemoClaw documentation for installation, configuration, operation, or troubleshooting. Also handles requested docs…

@nvidia@nvidiaInstall Skill

Questions about known-good-comparison.

Which coding agents can use known-good-comparison?
known-good-comparison installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.