Agent skill

Foundry Reference Model

by aviggiano in aviggiano/security

Build a simple independent Solidity reference implementation for Foundry tests.

MITAuto-check passedBackend & APIs

Install Foundry Reference Model

skills CLI
$ npx skills add aviggiano/security --skill foundry-reference-model -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aviggiano/security foundry-reference-model --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aviggiano/security.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/foundry-reference-model .claude/skills/foundry-reference-model && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
foundry-reference-model
GitHub stars
144
Token cost
~516 tokens
SKILL.md length
241 words
Files
2
Skills in repo
10
Repo updated
First seen
Licence
MIT

At a glance

Build a simple independent Solidity reference implementation for Foundry tests.

  • Works in 6 steps: Define the reference boundary and… → Implement only the first selected… → Add a reference deployment helper that… → …
  • Codex needs a non-optimized
  • SKILL.md covers Inputs, Model Style, Workflow and Phase Discipline
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Foundry Reference Model is an agent skill from aviggiano/security. Build a simple independent Solidity reference implementation for Foundry tests. Use when Codex needs a non-optimized, non-production-derived model for differential testing, based only on public interfaces, specs, README/API docs, and existing public tests.

Its SKILL.md is about 520 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Backend & APIs, covering Technical documentation and Smart contracts. It works with Solidity. The repository describes itself as: Security Reviews and Audit Checklists. The licence is MIT.

When your agent uses it

  • Codex needs a non-optimized
  • Non-production-derived model for differential testing
  • Based only on public interfaces
  • README/API docs

Example prompts

  • “/foundry-reference-model”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Define the reference boundary and directory, usually under the test tree.
  2. Implement only the first selected behavior phase.
  3. Add a reference deployment helper that uses the same config shape as production tests where possible.
  4. Run existing tests against the reference-only deployment if the fixture supports it.
  5. Fill reference gaps TDD-style: first add the public behavior test, then implement the missing model behavior.
  6. Keep unsupported surfaces explicit, but do not add tests whose only assertion is a placeholder revert.

What it can do on your machine

Read from SKILL.md and the folder at commit e18ce7d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Foundry Reference Model loads about 516 tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 241 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~516

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from aviggiano/security at commit e18ce7d, republished under its MIT licence (© aviggiano). 241 words, ~516 tokens.

Download SKILL.mdSave it as .claude/skills/foundry-reference-model/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
foundry-reference-model
description
Build a simple independent Solidity reference implementation for Foundry tests. Use when Codex needs a non-optimized, non-production-derived model for differential testing, based only on public interfaces, specs, README/API docs, and existing public tests.

Foundry Reference Model

Inputs

Use only allowed public behavior sources:

  • contracts/interfaces/**
  • README/API/fallback ABI documentation
  • existing public tests
  • whitepapers/specs/product docs
  • observed runtime calls inside differential tests

Do not read, summarize, or derive reference behavior from production implementation files when the repository forbids it.

Model Style

Keep the reference intentionally boring:

  • structs, mappings, arrays, and direct loops
  • explicit fields instead of packed flags
  • named enums instead of magic action numbers
  • plain arithmetic that follows public semantics
  • simple mocks for tokens or wrappers when needed

Avoid gas-shaped implementation details:

  • no assembly
  • no packed storage
  • no bitmaps
  • no bit shifting or masking unless the user explicitly allows it
  • no production-style internal balance shortcuts unless that behavior is explicitly in scope

Workflow

  1. Define the reference boundary and directory, usually under the test tree.
  2. Implement only the first selected behavior phase.
  3. Add a reference deployment helper that uses the same config shape as production tests where possible.
  4. Run existing tests against the reference-only deployment if the fixture supports it.
  5. Fill reference gaps TDD-style: first add the public behavior test, then implement the missing model behavior.
  6. Keep unsupported surfaces explicit, but do not add tests whose only assertion is a placeholder revert.

Phase Discipline

Start with deterministic core behavior before AMM/router/vault/admin surfaces. Do not model internals simply because production has them. If public semantics are unclear, leave the behavior out of scope and record the reason in the task report or plan.

© aviggiano, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/foundry-reference-model of aviggiano/security.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit e18ce7d

Compare with similar skills

Foundry Reference Model next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Foundry Reference Model compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Foundry Reference Model this skillaviggiano/security144—~516Automated safety check: PassMIT
Developing Smart ContractsLFDT-Lineth/lineth-monorepo126—~1.4kAutomated safety check: PassAGPL-3.0
Smart Contract Guidelines Advisortrailofbits/skills7.4k—~2.2kAutomated safety check: PassCC-BY-SA-4.0
Auditsablier-labs/evm-monorepo353—~1.8kAutomated safety check: PassCustom licence
Validate Docs SectionNethereum/Nethereum2.3k—~15kAutomated safety check: PassMIT
Interface Designccashwell/evm-cortex131—~1.7kAutomated safety check: PassMIT

Similar skills

  • Developing Smart Contracts

    LFDT-Lineth/lineth-monorepo

    Solidity smart contract development guidelines for Lineth blockchain.

    126 GitHub stars~1.4k tokensUpdated today
    Backend & APIsAuto-check passed
  • Official

    Reviews a smart contract project against Trail of Bits development guidelines, covering documentation, architecture, upgradeability, implementation quality, dependencies and tests.

    7.4k GitHub stars~2.2k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • Audit

    sablier-labs/evm-monorepo

    Security audit and code review for Solidity smart contracts.

    353 GitHub stars~1.8k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • Validate Docs Section

    Nethereum/Nethereum

    Validate and perfect a Nethereum documentation section end-to-end.

    2.3k GitHub stars~15k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed
  • Interface Design

    ccashwell/evm-cortex

    Interface and abstract contract design patterns for Solidity protocols.

    131 GitHub stars~1.7k tokensUpdated 10 days ago
    Backend & APIsAuto-check passed
  • Solidity Patterns

    ccashwell/evm-cortex

    Core Solidity design patterns for safe, maintainable smart contracts.

    131 GitHub stars~1.5k tokensUpdated 10 days ago
    Backend & APIsAuto-check passed

More from aviggiano/security

All 10 skills in this repo
  • Foundry Deploy Fixtures

    aviggiano/security

    Create or refactor Foundry deployment fixtures for Solidity tests.

    144 GitHub stars~634 tokensUpdated 24 days ago
    Auto-check passed
  • Foundry Fuzz Mirrors

    aviggiano/security

    Create Foundry fuzz tests from deterministic unit tests. An agent skill from aviggiano/security.

    144 GitHub stars~584 tokensUpdated 24 days ago
    Auto-check passed
  • Foundry Spec Properties

    aviggiano/security

    Turn whitepapers, protocol specs, and public documentation into Foundry property tests.

    144 GitHub stars~489 tokensUpdated 24 days ago
    Auto-check passed
  • Foundry Test Campaign

    aviggiano/security

    Master skill for running an end-to-end multi-pass Foundry testing campaign for Solidity projects.

    144 GitHub stars~1.6k tokensUpdated 24 days ago
    Auto-check passed
  • Stateful Invariant Testing

    aviggiano/security

    Build metric-driven Chimera/create-chimera-app stateful invariant testing campaigns for Solidity projects.

    144 GitHub stars~2.8k tokensUpdated 24 days ago
    Auto-check passed
  • Foundry Differential Tests

    aviggiano/security

    Create Foundry differential tests comparing production Solidity contracts against an independent reference model.

    144 GitHub stars~613 tokensUpdated 24 days ago
    Auto-check passed

Works with

Questions about Foundry Reference Model

What does Foundry Reference Model do?

Build a simple independent Solidity reference implementation for Foundry tests. Foundry Reference Model is an agent skill from aviggiano/security. Build a simple independent Solidity reference implementation for Foundry tests.

When should I use Foundry Reference Model?

Foundry Reference Model fits situations like: Codex needs a non-optimized; non-production-derived model for differential testing; based only on public interfaces; README/API docs.

How do I install Foundry Reference Model in Claude Code?

Run `npx skills add aviggiano/security --skill foundry-reference-model -a claude-code`. Or copy the skill folder (skills/foundry-reference-model in aviggiano/security) into .claude/skills/foundry-reference-model in your project. Claude Code loads it when a task matches its description.

How do I install Foundry Reference Model in Codex?

Run `npx skills add aviggiano/security --skill foundry-reference-model -a codex`. Or copy the skill folder (skills/foundry-reference-model in aviggiano/security) into .agents/skills/foundry-reference-model in your project. Codex loads it when a task matches its description.

Can I use Foundry Reference Model in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aviggiano/security --skill foundry-reference-model -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/foundry-reference-model, .gemini/skills/foundry-reference-model, .github/skills/foundry-reference-model and .opencode/skills/foundry-reference-model in your project.

What does Foundry Reference Model need to run?

SKILL.md names no scripts, command-line tools or credentials: Foundry Reference Model is instructions for the agent only.

Does Foundry Reference Model access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Foundry Reference Model safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Foundry Reference Model use?

Foundry Reference Model is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Foundry Reference Model use?

About 516 tokens (SKILL.md is roughly 2.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Foundry Reference Model?

Skills that share tags, products or a category with Foundry Reference Model: Developing Smart Contracts (LFDT-Lineth/lineth-monorepo, 126 stars), Smart Contract Guidelines Advisor (trailofbits/skills, 7.4k stars), Audit (sablier-labs/evm-monorepo, 353 stars) and Validate Docs Section (Nethereum/Nethereum, 2.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Foundry Reference Model?

aviggiano (a GitHub user) maintains it in aviggiano/security, which has 144 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on September 15, 2026.

Source: aviggiano/security on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.