openlore-write-tests

openlore-write-tests is a skill for Claude Code, Codex from clay-good/OpenLore. It costs 41 tokens per session (2,109 once invoked), scanned A, original, MIT.

A testing workflow for writing and running real tests for a function or specified scenario. It first reads the implementation and its contract, then identifies the testing framework and creates tests without dummy assertions or placeholders.

In plain words
What is it for?
Use it when adding, improving, or repairing tests, or when finding important scenarios that current coverage does not exercise.
Why use it?
It prevents tests from being written without understanding what the code promises, and helps avoid tests that pass without checking useful behaviour.

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/clay-good/openlore/openlore-write-tests
Any agent
npx skills add clay-good/OpenLore --skill openlore-write-tests
Clone the repo
git clone --depth 1 https://github.com/clay-good/OpenLore

Made for: Claude Code, Codex.

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 openlore-write-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/clay-good/openlore/openlore-write-tests.svg)](https://agentmods.dev/skills/clay-good/openlore/openlore-write-tests)
Your own site
<a href="https://agentmods.dev/skills/clay-good/openlore/openlore-write-tests"><img src="https://agentmods.dev/badge/skills/clay-good/openlore/openlore-write-tests.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,109 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.00041 $0.02109
Opus 5 $0.00020 $0.01055
Sonnet 5 $0.00008 $0.00422
Haiku 4.5 $0.00004 $0.00211

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

Security

Grade A, and why

openlore-write-tests 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 3d 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.

examples/mistral-vibe/skills/openlore-write-tests/SKILL.md · 229 lines

How it starts

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

openlore: Write Tests

When to use this skill

Trigger this skill when the user wants to write real tests for a function, module, or spec scenario, with phrasings like:

  • "write tests for X"
  • "add test coverage for Y"
  • "what spec scenarios are untested?"
  • "implement the test for this scenario"
  • explicit command /openlore-write-tests

The rule: read the implementation and spec contract before writing a single assertion. No expect(true).toBe(true), no stubs, no placeholders.

Prerequisite: openlore analysis must exist (openlore analyze has been run). If orient returns "error": "no cache" → run openlore analyze first, then retry.


Step 1 — Identify target + detect framework

Ask the user:

  1. Target — a function name, file path, spec scenario, or domain to test. If unsure, skip to Step 1b.
  2. $PROJECT_ROOT — project root directory.

Step 1b — Find untested scenarios (if no target given)

Call the openlore MCP tool get_test_coverage with {"directory": "$PROJECT_ROOT"}.

Present the top 5 uncovered scenarios to the user, ranked by spec importance. Ask which to implement first.

Step 1c — Detect test framework

Scan the project root for framework config files:

File found Framework
vitest.config.*, vitest.config.ts Vitest — runner: npx vitest run <file>
jest.config.* Jest — runner: npx jest <file>
pytest.ini, pyproject.toml (with [tool.pytest]), setup.cfg pytest — runner: pytest <file> -v
CMakeLists.txt with enable_testing(), *.test.cpp CTest/GTest — runner: build + ctest
go.mod Go test — runner: go test ./...

Store as $TEST_RUNNER. If ambiguous, ask the user.


Step 2 — Orient

Call the openlore MCP tool orient with:

{
  "directory": "$PROJECT_ROOT",
  "task": "write tests for $TARGET",
  "limit": 5
}

Extract:

  • $TARGET_FILE — the file containing the function(s) to test
  • $EXISTING_TEST_FILE — nearby test file, if any (e.g. foo.test.ts, test_foo.py, foo_test.go)
  • $SPEC_DOMAIN — the spec domain associated with the target

Read the full file on GitHub · 229 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. 3d ago First seen · 229 lines · 41 tokens per session scan A 6a914ac5d0cb

Subscribe to this mod's changes

openlore-write-tests is a skill published in the GitHub repository clay-good/OpenLore (290 stars, last pushed 3d ago), licensed MIT. It adds 41 tokens to every session and 2,109 once invoked, about $0.0002 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.