Agent skill

Organize Test

by OriginProtocol in OriginProtocol/origin-dollar

Reorganize Foundry test files (.t.sol) for readability and consistency without changing semantics.

MITAuto-check passedBusiness, Finance & HR

Install Organize Test

skills CLI
$ npx skills add OriginProtocol/origin-dollar --skill organize-test -a claude-code

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

GitHub CLI
$ gh skill install OriginProtocol/origin-dollar organize-test --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/OriginProtocol/origin-dollar.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/organize-test .claude/skills/organize-test && 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
organize-test
GitHub stars
153
Token cost
~3.7k tokens
SKILL.md length
1,326 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Reorganize Foundry test files (.t.sol) for readability and consistency without changing semantics.

  • Works in 10 steps: Safety Guardrails — NEVER Violate → Pre-Edit Checklist → Import Ordering → …
  • The user asks to organize
  • SKILL.md covers 0. Safety Guardrails — NEVER…, 1. Pre-Edit Checklist, 2. Import Ordering and 3. State Variable Organization, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Organize Test is an agent skill from OriginProtocol/origin-dollar. Reorganize Foundry test files (.t.sol) for readability and consistency without changing semantics. Use when the user asks to organize, reorder, clean up, tidy, or reformat a test file's structure.

Its SKILL.md is about 3.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Business, Finance & HR, covering Plain language and style rules. The repository describes itself as: OUSD and OETH are stablecoins that passively accrue yield while you are holding it. The licence is MIT.

When your agent uses it

  • The user asks to organize
  • Reformat a test files structure

Example prompts

  • “/organize-test”

Workflow steps

10 steps, taken from the step headings in SKILL.md.

  1. Safety Guardrails — NEVER Violate
  2. Pre-Edit Checklist
  3. Import Ordering
  4. State Variable Organization
  5. Function Ordering
  6. Section Divider Convention
  7. When NOT to Apply This Skill
  8. Post-Edit Verification
  9. Final Checklist
  10. Operational Flow Summary

What it can do on your machine

Read from SKILL.md and the folder at commit ae82163. 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 (its code samples are solidity).

    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

Organize Test loads about 3.7k tokens when it runs. Until then it costs about 53 tokens; SKILL.md has 1,326 words of instructions outside code blocks.

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

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 OriginProtocol/origin-dollar at commit ae82163, republished under its MIT licence (© OriginProtocol). 1,326 words, ~3,726 tokens.

Download SKILL.mdSave it as .claude/skills/organize-test/SKILL.md (or your agent's skills folder).
name
organize-test
description
Reorganize Foundry test files (*.t.sol) for readability and consistency without changing semantics. Use when the user asks to organize, reorder, clean up, tidy, or reformat a test file's structure.

Organize Test

Reorganize an existing Foundry test file (*.t.sol) so that imports, state variables, and functions follow the repository's established conventions. This skill makes purely structural changes — it never alters logic, assertions, values, names, or execution order.


0. Safety Guardrails — NEVER Violate

These rules are absolute. If any rule would be violated by a proposed change, skip that change entirely.

  1. Scope: Only modify files matching *.t.sol inside contracts/tests/. NEVER touch production contracts or deploy scripts.
  2. No semantic changes: Never modify function bodies, assertions, require/revert strings, call arguments, numeric values, or conditional logic.
  3. No renames: Never rename functions, variables, contracts, structs, enums, events, or errors.
  4. No additions or removals: Never add or remove imports, functions, state variables, or modifiers. Only reorder existing ones.
  5. No visibility/type changes: Never change visibility (public/internal/private), mutability (constant/immutable), types, or inheritance lists.
  6. Preserve comments: Move comments with their associated code. Never delete, rewrite, or add comments (except section dividers — see Section 5).
  7. Preserve blank-line semantics: Keep logical blank-line separations inside function bodies untouched.
  8. Skip if risky: If a reorganization is ambiguous, could affect behavior, or would produce a diff that is hard to review (>60% of lines changed), make the smallest safe change or do nothing.

1. Pre-Edit Checklist

Before making any edit, complete every item:

  • Confirm the target file is *.t.sol under contracts/tests/.
  • Read the entire file to understand its current structure.
  • Identify the file type: Shared (Shared.t.sol), Concrete (concrete test), Fuzz (fuzz test), or Base (Base.t.sol, BaseFork.t.sol, BaseSmoke.t.sol).
  • Check for any repo-specific conventions in the file that diverge from the defaults below. If present, respect the local convention.
  • Plan all moves mentally before editing. Each move must be a pure relocation — same content, new position.

2. Import Ordering

Organize imports into groups separated by a single blank line. Within each group, sort alphabetically by the imported symbol name (the name inside {}).

Group order

Each import group gets a named section header comment. Use the format // --- <Group Name> to label each group.

solidity
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

// --- Test base
import {Base} from "tests/Base.t.sol";
import {Fork_SomeStrategy_Shared_Test} from "../shared/Shared.t.sol";

// --- Test utilities
import {Mainnet} from "tests/utils/Addresses.sol";
import {Sonic} from "tests/utils/Addresses.sol";

// --- External libraries
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import {MockERC20} from "@solmate/test/utils/mocks/MockERC20.sol";

// --- Project imports
import {IOToken} from "contracts/interfaces/IOToken.sol";
import {IVault} from "contracts/interfaces/IVault.sol";
import {MockStrategy} from "contracts/mocks/MockStrategy.sol";
import {InitializableAbstractStrategy} from "contracts/utils/InitializableAbstractStrategy.sol";
Standard import section names
SectionContents
Test baseParent shared contract, Base.t.sol
Test utilitiesAddress registries (tests/utils/Addresses.sol), test helpers
External librariesforge-std, OpenZeppelin, Solmate, etc.
Project importsInterfaces, contracts, and mocks from contracts/

If Group 4 is large and mixes interfaces with mocks/implementations, split it into two named sections: Project interfaces and Project contracts.

Rules
  • If a group has only one import, it still gets its own group with surrounding blank lines.
  • If the file already uses meaningful sub-groups within Group 4 (e.g., interfaces separated from mocks), preserve that finer grouping.
  • Never merge Group 1 with any other group — the parent test import must always be visually distinct at the top.
  • If an import does not clearly belong to any group, leave it in its current position relative to its neighbors.

3. State Variable Organization

State variables must be organized into sections using the repo's standard section divider (see Section 5). Each section groups variables by semantic role.

Section order
  1. CONSTANTS — constant variables, then immutable variables.
  2. CONTRACTS — Interface-typed contract references (IVault, IOToken, IAMOStrategy, etc.), then mock contracts.
  3. ACTORS — address variables for test actors (only if the file declares actors beyond what Base.t.sol provides).
  4. EXTERNAL TOKENS — IERC20 references for external tokens (only if the file declares tokens beyond what Base.t.sol provides).
  5. FORK IDS — uint256 fork ID variables (only in Base-level files).
  6. CONFIGURATION — Mutable state used for test configuration (thresholds, amounts, flags).
Ordering within a section
  1. constant before immutable before mutable.
  2. Within the same modifier group, alphabetical by variable name.
  3. If the existing file uses a different but consistent internal order (e.g., grouped by contract relationship), preserve it.
When to add section dividers
  • If the file already uses section dividers, reorganize variables into the correct sections.
  • If the file has no section dividers but has 6+ state variables, add dividers for the sections that apply.
  • If the file has fewer than 6 state variables and no existing dividers, do not add dividers — the overhead is not worth it.
Example
solidity
abstract contract Fork_SomeStrategy_Shared_Test is BaseFork {
    //////////////////////////////////////////////////////
    /// --- CONSTANTS
    //////////////////////////////////////////////////////

    uint256 internal constant DEFAULT_AMOUNT = 1_000e18;
    address internal constant DEAD_ADDRESS = address(0xdead);

    //////////////////////////////////////////////////////
    /// --- CONTRACTS
    //////////////////////////////////////////////////////

    IAMOStrategy internal amoStrategy;
    IOToken internal otoken;
    IVault internal vault;
    MockERC20 internal mockToken;

    //////////////////////////////////////////////////////
    /// --- SETUP
    //////////////////////////////////////////////////////

    function setUp() public virtual override {
        // ...
    }
}

4. Function Ordering

Function ordering depends on the file type.

4a. Shared files (Shared.t.sol, base test contracts)

Every function group gets its own section divider (54-slash format from Section 5):

solidity
    //////////////////////////////////////////////////////
    /// --- SETUP
    //////////////////////////////////////////////////////

    function setUp() public virtual override { ... }
    function _deployContracts() internal { ... }
    function _configureContracts() internal { ... }

    //////////////////////////////////////////////////////
    /// --- HELPERS
    //////////////////////////////////////////////////////

    function _depositAsVault(uint256 amount) internal { ... }
    function _verifyEndConditions() internal view { ... }

    //////////////////////////////////////////////////////
    /// --- ASSERTION HELPERS
    //////////////////////////////////////////////////////

    function _assertBalances(uint256 expected) internal view { ... }

    //////////////////////////////////////////////////////
    /// --- CALLBACKS
    //////////////////////////////////////////////////////

    function onERC721Received(...) external returns (bytes4) { ... }

    //////////////////////////////////////////////////////
    /// --- LABELS
    //////////////////////////////////////////////////////

    function _labelContracts() internal { ... }

Ordering within SETUP: setUp() first, then deployment/fetch helpers in the order they are called by setUp (_deployContracts, _deployMockContracts, _configureContracts, _fetchContracts, _resolveActors, _fundInitialUsers).

Omit a section divider if the section would be empty. Merge ASSERTION HELPERS into HELPERS if there are only 1-2 assertion helpers.

4b. Concrete test files

Every test group gets its own section divider:

solidity
    //////////////////////////////////////////////////////
    /// --- PASSING TESTS
    //////////////////////////////////////////////////////

    function test_deposit() public { ... }
    function test_deposit_checkBalanceReflectsDeposit() public { ... }

    //////////////////////////////////////////////////////
    /// --- REVERTING TESTS
    //////////////////////////////////////////////////////

    function test_deposit_RevertWhen_paused() public { ... }
    function test_deposit_RevertWhen_zeroAmount() public { ... }

    //////////////////////////////////////////////////////
    /// --- EVENT TESTS
    //////////////////////////////////////////////////////

    function test_deposit_emitsDeposit() public { ... }

    //////////////////////////////////////////////////////
    /// --- HELPERS
    //////////////////////////////////////////////////////

    function _prepareDeposit(uint256 amount) internal { ... }

If the file tests multiple functions (common in ViewFunctions.t.sol or Admin.t.sol), use a section divider per function (e.g., /// --- MINT, /// --- REDEEM), each following the passing → reverting → event order internally.

Show full SKILL.md (542 more words)Show less
4c. Fuzz test files

Same section divider convention:

solidity
    //////////////////////////////////////////////////////
    /// --- FUZZ TESTS
    //////////////////////////////////////////////////////

    function testFuzz_deposit_correctBalance(uint256 amount) public { ... }
    function testFuzz_deposit_neverExceedsMax(uint256 amount) public { ... }

    //////////////////////////////////////////////////////
    /// --- HELPERS
    //////////////////////////////////////////////////////

    function _boundAmount(uint256 amount) internal pure returns (uint256) { ... }

If the file has enough fuzz tests to warrant sub-groups, split into BASIC PROPERTIES and COMPOUND PROPERTIES.

Ordering tests within a section
  • Within the same section, preserve the existing order unless there is a clear improvement (e.g., grouping tests for the same sub-behavior together).
  • Never reorder tests if the order could matter (e.g., sequential state changes in a stateful test contract — rare but possible).

5. Section Divider Convention

The repo uses this exact format:

//////////////////////////////////////////////////////
/// --- SECTION_NAME
//////////////////////////////////////////////////////
  • Top/bottom lines: exactly 54 forward slashes (/).
  • Middle line: /// --- followed by the section name in ALL_CAPS.
  • One blank line after the closing divider before the first item.
  • One blank line before the opening divider (except at the very start of the contract body).
Standard section names
SectionUsed in
CONSTANTSShared, Base
CONTRACTSShared
CONTRACTS & MOCKSShared (unit tests with mocks)
ACTORSBase, Shared
EXTERNAL TOKENSBase
FORK IDSBase
SETUPShared
HELPERSShared, Concrete, Fuzz
PASSING TESTSConcrete
REVERTING TESTSConcrete
LABELSShared (when _labelContracts is present)
CONFIGURATIONShared (when config variables exist)

If the file uses a custom section name that is clear and descriptive, keep it. Only rename section headers when they are misleading.


6. When NOT to Apply This Skill

Do not reorganize if any of these conditions hold:

  • The file is not a *.t.sol file under contracts/tests/.
  • The file is a production contract (contracts/ outside tests/), a deploy script, or a legacy JS/TS test.
  • The file contains inline assembly (assembly { ... }) interleaved with state variable declarations — moving variables could change storage layout.
  • The file is auto-generated or clearly marked as such.
  • The reorganization would produce a diff affecting more than 60% of the file's lines — this makes review impractical. In this case, do the smallest safe subset or nothing.
  • The file's structure is ambiguous or highly mixed (e.g., helpers scattered between tests with unclear dependencies) — do only the clearly safe moves.
  • Moving a comment would separate it from the code it documents in a way that loses meaning.
  • The file already perfectly follows all conventions — do nothing, report that the file is clean.

7. Post-Edit Verification

After all edits are complete:

  1. Run forge b from contracts/ to confirm compilation.
  2. Run forge fmt tests/ scripts/ from contracts/ to ensure formatting is consistent.
  3. Review the diff: every change must be a pure move — same content, different position. If any content change appears, revert it.
  4. If compilation fails after reorganization, revert all changes immediately and report the failure.

8. Final Checklist

Before reporting completion, verify every item:

  • Target file is *.t.sol under contracts/tests/
  • No production contract files were modified
  • Imports are grouped and sorted per Section 2
  • State variables are in section-divided groups per Section 3
  • Functions follow the ordering rules for the file type per Section 4
  • All section dividers use the exact 54-slash format per Section 5
  • No function bodies, assertions, or logic were changed
  • No variables were renamed, added, or removed
  • No imports were added or removed (only reordered)
  • All comments moved with their associated code
  • forge b passes
  • forge fmt tests/ scripts/ runs cleanly
  • Diff contains only structural moves, no semantic changes

9. Operational Flow Summary

1. User provides a test file path (or asks to organize a test file)
2. READ the entire file
3. CLASSIFY the file type (Shared / Concrete / Fuzz / Base)
4. CHECK pre-edit checklist (Section 1)
5. PLAN all moves (imports → variables → functions)
6. EDIT the file — imports first, then state variables, then functions
7. VERIFY — forge b, forge fmt, review diff
8. REPORT what was changed (or that the file was already clean)

If at any point a move feels unsafe, skip it and note it in the report.

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

Files

Just SKILL.md in .codex/skills/organize-test of OriginProtocol/origin-dollar.

Open the folder on GitHubat commit ae82163

Compare with similar skills

Organize Test 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.

Organize Test compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Organize Test this skillOriginProtocol/origin-dollar153—~3.7kAutomated safety check: PassMIT
Exit Waterfallmohitagw15856/pm-claude-skills1.4k—~1.1kAutomated safety check: PassMIT
Backtest ExplainYicunAI/Pnlclaw-community197—~378Automated safety check: PassAGPL-3.0
Lease Decodermohitagw15856/pm-claude-skills1.4k—~1.3kAutomated safety check: PassMIT
Tenant Rights Explainermohitagw15856/pm-claude-skills1.4k—~1.2kAutomated safety check: PassMIT
OkrPrismer-AI/PrismerCloud1.6k—~2.3kAutomated safety check: PassMIT

Similar skills

  • Exit Waterfall

    mohitagw15856/pm-claude-skills

    Compute who gets what at each exit price from a cap table — liquidation preferences, conversion points, and where the founders' share collapses.

    1.4k GitHub stars~1.1k tokensUpdated yesterday
    Business, Finance & HRAuto-check passed
  • Backtest Explain

    YicunAI/Pnlclaw-community

    Analyzes backtest results in plain language, connecting metrics to what they mean for the strategy

    197 GitHub stars~378 tokensUpdated 6 mo ago
    Business, Finance & HRAuto-check passed
  • Lease Decoder

    mohitagw15856/pm-claude-skills

    Decode a residential lease into plain English and rank the clauses that can hurt you.

    1.4k GitHub stars~1.3k tokensUpdated yesterday
    Business, Finance & HRAuto-check passed
  • Tenant Rights Explainer

    mohitagw15856/pm-claude-skills

    Understand your rights as a renter in a specific situation — repairs ignored, a rent increase, an eviction notice, deposit disputes, or entry without notice — and what to do next.

    1.4k GitHub stars~1.2k tokensUpdated yesterday
    Business, Finance & HRAuto-check passed
  • Okr

    Prismer-AI/PrismerCloud

    Draft and track a strategic OKR charter — turn a human's plain-language goal into ONE Objective + 2-5 measurable Key Results, link existing tasks, and route the commit to a human sponsor.

    1.6k GitHub stars~2.3k tokensUpdated 7 days ago
    Business, Finance & HRAuto-check passed
  • Zonein

    LeoYeAI/openclaw-master-skills

    Create, backtest, and deploy autonomous trading agents in plain English.

    2.2k GitHub stars~5.1k tokensUpdated 2 mo ago
    Business, Finance & HRAuto-check passed

More from OriginProtocol/origin-dollar

  • Fork Test

    OriginProtocol/origin-dollar

    Generate Foundry fork tests for contracts that need real on-chain integration coverage.

    153 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Smoke Test

    OriginProtocol/origin-dollar

    Generate Foundry smoke tests that validate deployment health using DeployManager/Resolver against real on-chain state with pending governance applied.

    153 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Commit

    OriginProtocol/origin-dollar

    Handle git commits with auto-staging, targeted pre-commit formatting, and Conventional Commit messages.

    153 GitHub stars~850 tokensUpdated yesterday
    Auto-check: warnings
  • Talos Action Development

    OriginProtocol/origin-dollar

    Develop, modify, review, and maintain standalone Talos actions in contracts/tasks/actions, including chain guardrails, contract bindings, transaction safety, schedules, action catalogues, and Talos…

    153 GitHub stars~896 tokensUpdated yesterday
    Auto-check passed
  • Unit Test

    OriginProtocol/origin-dollar

    Generate Foundry unit tests for a contract using this repository's conventions, structure, and naming.

    153 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Verify Deployment PR

    OriginProtocol/origin-dollar

    Verifies a POST-EXECUTION mainnet (or other network) smart-contract deployment PR for this repo: confirms every deployed contract is listed in the PR description, that the on-chain verified source…

    153 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check: notes

Questions about Organize Test

What does Organize Test do?

Reorganize Foundry test files (.t.sol) for readability and consistency without changing semantics. Organize Test is an agent skill from OriginProtocol/origin-dollar.sol) for readability and consistency without changing semantics.

When should I use Organize Test?

Organize Test fits situations like: the user asks to organize; reformat a test files structure.

How do I install Organize Test in Claude Code?

Run `npx skills add OriginProtocol/origin-dollar --skill organize-test -a claude-code`. Or copy the skill folder (.codex/skills/organize-test in OriginProtocol/origin-dollar) into .claude/skills/organize-test in your project. Claude Code loads it when a task matches its description.

How do I install Organize Test in Codex?

Run `npx skills add OriginProtocol/origin-dollar --skill organize-test -a codex`. Or copy the skill folder (.codex/skills/organize-test in OriginProtocol/origin-dollar) into .agents/skills/organize-test in your project. Codex loads it when a task matches its description.

Can I use Organize Test 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 OriginProtocol/origin-dollar --skill organize-test -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/organize-test, .gemini/skills/organize-test, .github/skills/organize-test and .opencode/skills/organize-test in your project.

What does Organize Test need to run?

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

Does Organize Test 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 Organize Test 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 Organize Test use?

Organize Test 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 Organize Test use?

About 3.7k tokens (SKILL.md is roughly 15k 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 Organize Test?

Skills that share tags, products or a category with Organize Test: Exit Waterfall (mohitagw15856/pm-claude-skills, 1.4k stars), Backtest Explain (YicunAI/Pnlclaw-community, 197 stars), Lease Decoder (mohitagw15856/pm-claude-skills, 1.4k stars) and Tenant Rights Explainer (mohitagw15856/pm-claude-skills, 1.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Organize Test?

OriginProtocol (a GitHub organization) maintains it in OriginProtocol/origin-dollar, which has 153 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 6, 2026.

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