testing-reef

A set of testing rules for the Reef Rust workspace, covering unit, integration, property, snapshot, benchmark, and fuzz tests. It explains where tests belong and how to keep them reliable across developers' computers and continuous integration.

In plain words
What is it for?
Use it when adding, changing, or troubleshooting tests in Reef, including tests for its application, terminal interface, core libraries, fixtures, benchmarks, and fuzz targets.
Why use it?
It helps developers choose the right test type and avoid flaky tests, which are tests that fail unpredictably.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/blushyes/reef/testing-reef
Any agent
npx skills add Blushyes/reef --skill testing-reef
Clone the repo
git clone --depth 1 https://github.com/Blushyes/reef

Made for: Claude Code, Codex.

Per session 188 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,869 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00188 $0.02869
Opus 5 $0.00094 $0.01435
Sonnet 5 $0.00038 $0.00574
Haiku 4.5 $0.00019 $0.00287

Measured 2d ago against content hash 01e8afd068c8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

testing-reef 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 2d 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/testing-reef/SKILL.md · 208 lines

How it starts

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

Testing in the reef workspace

A project-specific test playbook. Follow this when adding any test. The goal is that tests are deterministic across Linux/macOS CI and every dev's laptop, and that no test becomes that one flaky thing everyone reruns.

Workspace layout

Reef is a single-process binary plus shared internal crates. There is no plugin subsystem.

  • crates/reef-app — renderer-neutral app engine, task orchestration, command dispatch, snapshots, and app-state tests.
  • crates/reef-tui (reef crate) — terminal adapter, TUI rendering, input/mouse decoding, terminal image protocol, tests/ (terminal adapter / UI integration), benches/ (criterion).
  • crates/reef-core — UI-independent git, diff, preview, markdown, highlight, nav/LSP, file-op, host parsing, and history logic.
  • crates/reef-agent / crates/reef-proto / crates/reef-sqlite-preview — remote agent/protocol and SQLite preview support.
  • crates/test-support — shared fixtures (tempdir_repo, commit_file, write_file, HomeGuard).
  • fuzz/ — fuzz targets. Separate package, not in the workspace; run via cargo +nightly fuzz run <target>.

Quick decision table

Scenario Test type Where it goes
Pure function, no I/O Unit test #[cfg(test)] mod tests inline at bottom of the source file
Renderer-neutral app engine / worker contract Integration test crates/reef-app/tests/<name>_integration.rs
Backend / agent / Local-vs-Remote IO contract Integration test crates/reef-io/tests/<name>_loopback.rs
TUI adapter behavior with real fs/git Integration test crates/reef-tui/tests/<name>_integration.rs
Algorithmic invariant over random inputs Property test crates/reef-tui/tests/<name>_properties.rs (uses proptest)
Full UI rendered to terminal buffer Snapshot crates/reef-tui/tests/<name>_snapshots.rs (uses insta + ratatui::TestBackend)
Hot-path performance Benchmark crates/reef-tui/benches/<name>.rs (uses criterion)
Parser / deserializer robustness Fuzz target fuzz/fuzz_targets/<name>.rs

Read the full file on GitHub · 208 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 208 lines · 188 tokens per session scan A 01e8afd068c8

Subscribe to this mod's changes

testing-reef is a skill published in the GitHub repository Blushyes/reef (82 stars, last pushed 7d ago), licensed Apache-2.0. It adds 188 tokens to every session and 2,869 once invoked, about $0.0009 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

om-implement-spec

Implement a specification (or specific phases) using coordinated subagents with unit tests, integration tests, docs, and code-review compliance. Tracks progress by updating the spec. Triggers on "implement spec", "implement phases", "build from spec", "code the spec".

open-mercato/open-mercato · 59 tokens

writing-tests

Write unit tests, component tests, and integration tests for AiderDesk using Vitest and React Testing Library. Use when creating new tests, adding test coverage, configuring mocks, setting up test files, or debugging failing tests.

hotovo/aider-desk · 48 tokens

running-julia-test

Before running tests for a new package, make sure the test environment is already set up. If the package does not have tests yet, follow creating-julia-test-env first. Tests that use using Test must have Test available from the package or test project.

hashgraph-online/awesome-codex-plugins · 10 tokens

memstack-development-test-writer

Use this skill when the user says 'write tests', 'add tests', 'test coverage', 'unit tests', 'integration tests', 'component tests', 'mocking', 'edge cases', or needs to generate tests with proper mocking and edge case coverage. Do NOT use for refactoring plans or database migrations.

cwinvestments/memstack · 70 tokens

verify-changes

How to test and verify work in the dev-3.0 repo — which vitest config covers what, how to write a test that fits the house style, mocking Electrobun RPC and i18n providers, what coverage is actually expected, and the browser QA hand-off. Use when writing or fixing tests, deciding what a change needs covered, hitting a…

h0x91b/dev-3.0 · 124 tokens

verify

Self-healing verification loop (test → clippy → fmt).

mag123c/toktrack · 15 tokens