origin-dollar: Skill for Claude Code

.claude/skills/unit-test/SKILL.md

unit-test is a skill for Claude Code from OriginProtocol/origin-dollar. It costs 21 tokens per session (4,577 once invoked), scanned A, original, MIT.

A generator for Foundry unit tests for smart contracts. Foundry is a development toolkit for writing and testing blockchain contracts, and fuzz tests repeatedly try varied inputs to find unexpected behavior.

In plain words
What is it for?
Use it to create concrete and fuzz tests for a contract's public or external functions, following an existing Solidity test structure.
Why use it?
It gives contract tests a consistent layout and covers both named scenarios and varied-input behavior. This can expose failures that a few hand-picked examples miss.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is OriginProtocol/origin-dollar's own configuration. It tells Claude Code how to work on origin-dollar itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything origin-dollar configures →

Reuse

Borrowing it

Nothing to install: this file belongs to OriginProtocol/origin-dollar. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/OriginProtocol/origin-dollar/master/.claude/skills/unit-test/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/OriginProtocol/origin-dollar

Made for: Claude Code.

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 unit-test

README.md
[![agentmods](https://agentmods.dev/badge/skills/originprotocol/origin-dollar/unit-test/github.svg)](https://agentmods.dev/skills/originprotocol/origin-dollar/unit-test)
Your own site
<a href="https://agentmods.dev/skills/originprotocol/origin-dollar/unit-test"><img src="https://agentmods.dev/badge/skills/originprotocol/origin-dollar/unit-test/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 unit-test

Your own site · 80×15
<a href="https://agentmods.dev/skills/originprotocol/origin-dollar/unit-test"><img src="https://agentmods.dev/badge/skills/originprotocol/origin-dollar/unit-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,577 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.00021 $0.04577
Opus 5.5 $0.00008 $0.01831
Sonnet 5.5 $0.00004 $0.00915
Haiku 4.5 $0.00002 $0.00458

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

Security

Grade A, and why

unit-test 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 12d 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.

.claude/skills/unit-test/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.

Unit Test Skill

Generate Foundry unit tests for a specific contract, adhering to our established directory structure, naming conventions, and best practices. The tests should include both concrete scenarios and property-based fuzz tests, with clear organization and comprehensive coverage. Follow the guidelines below to ensure consistency and maintainability across our test suite.

1. Directory Layout

contracts/tests/unit/<category>/<ContractName>/
├── shared/
│   └── Shared.sol          # Abstract base with setUp, mocks, helpers
├── concrete/
│   ├── FunctionA.t.sol     # One file per public/external function
│   ├── FunctionB.t.sol
│   └── ViewFunctions.t.sol # Exception: all view/pure functions grouped in one file
└── fuzz/
    ├── FunctionA.fuzz.t.sol # Property-based tests per function
    └── FunctionB.fuzz.t.sol

<category> matches the subdirectories already in contracts/tests/unit/ (vault, token, strategies, oracle, etc.).

One file per function rule

Each public/external state-changing function gets its own dedicated test file, named after the function in PascalCase (e.g. rebaseOptIn() → RebaseOptIn.t.sol, delegateYield() → DelegateYield.t.sol).

Exceptions (may be grouped into a single file):

  • View/pure functions → group in ViewFunctions.t.sol
  • Setter functions (governor/admin config) → group in Admin.t.sol or Config.t.sol

Do NOT group multiple distinct functions in one file just because they are thematically related. For example, rebaseOptIn() and rebaseOptOut() are two separate functions and must have two separate files, even though they are conceptually related.

2. Inheritance Chain

forge-std/Test
  └─ Base  (contracts/tests/Base.sol)  — actors, constants, external token refs
       └─ Unit_Shared_Test  (shared/Shared.sol)  — abstract; setUp, deploy, helpers
            ├─ Unit_Concrete_<Contract>_<Feature>_Test  (concrete/*.t.sol)
            └─ Unit_Fuzz_<Contract>_<Feature>_Test      (fuzz/*.fuzz.t.sol)

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. 12d ago Changed · -2 lines bcd694a17f0c
  2. 1mo ago First seen · 398 lines · 21 tokens per session scan A a574b65bbc64

Subscribe to this mod's changes

unit-test is a skill published in the GitHub repository OriginProtocol/origin-dollar (153 stars, last pushed today), licensed MIT. It adds 21 tokens to every session and 4,577 once invoked, about $0.0001 per session on Opus 5.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-09-04.