author-test-stubs

author-test-stubs is a skill for OpenCode from nullhack/temple8. It costs 30 tokens per session (675 once invoked), scanned A, original, MIT.

A skill for writing Python interface stub files, which describe classes and methods without implementing them. The stubs act as the first precise statement of how the system should work.

In plain words
What is it for?
It is for defining integration and end-to-end test contracts in dependency order, including how parts of the system connect.
Why use it?
It turns requirements into clear contracts before implementation, reducing guesswork and keeping related parts compatible.

Skill for OpenCode

Written for OpenCode: installed under .opencode/.

Good fit It is for defining integration and end-to-end test contracts in dependency order, including how parts of the system connect.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nullhack/temple8/author-test-stubs
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.

Any agent
npx skills add nullhack/temple8 --skill author-test-stubs
Clone the repo
git clone --depth 1 https://github.com/nullhack/temple8

Made for: OpenCode.

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 author-test-stubs

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/nullhack/temple8/author-test-stubs"><img src="https://agentmods.dev/badge/skills/nullhack/temple8/author-test-stubs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 675 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.
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.00030 $0.00675
Opus 5.5 $0.00012 $0.00270
Sonnet 5.5 $0.00006 $0.00135
Haiku 4.5 $0.00003 $0.00068

Measured 3mo ago against content hash 9f8241f74ad2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

author-test-stubs 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 3mo 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.

.opencode/skills/author-test-stubs/SKILL.md · 18 lines

What it actually says

Author Test Stubs

  1. Load [[software-craft/test-stubs]], [[software-craft/test-design]] — stub conventions and what-to-test patterns.
  2. Read .cache/<session_id>/journal.md (always present — bootstrapped at plan entry by model-data-schema) and .cache/<session_id>/interview-notes.md. Two rework trigger sources feed the backlog: (a) IF the journal carries escalation findings from build (contract gaps) THEN rework the contracts it names first; (b) IF the interview notes flag findings that MODIFY an existing block (rework — modifies existing <block> from interview-building-blocks) THEN rework those contracts' .pyi signatures to match the changed requirement. Either source marks the affected contracts as rework; write-test-py re-applies the @pytest.mark.pending marker to the affected tests so select-build-target pulls them from the backlog. A finding with no rework flag is new work — author a fresh stub.
  3. Author integration and E2E test stubs only — no unit-test stubs. Author in build layer order so external-boundary contracts precede adapter, then internal-data, then internal contracts.
  4. Express the requirement in class and method signatures with type annotations: entity relationships, compositions, and the behaviour each test asserts. External-layer stubs assert against the captured cassettes — real shapes, not guesses.
  5. External-boundary replay rule. An HTTP (httpx) adapter test MUST use with vcr.use_cassette(cassette_path(NAME)): as a context manager around the adapter call — in-process replay against the captured exchange per [[software-craft/external-fixtures]]. pytester is reserved for CLI subprocess tests ONLY; never use it for vcrpy cassette replay (it spawns a child pytest process, breaks collection, and hides the cassette contract from the type surface). Exception: a library-boundary adapter vcrpy cannot intercept (e.g. ddgs/primp) uses monkeypatch on the adapter's transport, not pytester. The wrong-vs-right pattern and the kind-dispatch table are in [[software-craft/external-fixtures]].
  6. Make each stub a COMPLETE module surface: declare every module-level name the .py will expose (constants, fixtures, helper functions) plus the test class and its method signatures. The test .pyi must mirror the .py's full module surface per [[software-craft/test-stubs]].
  7. Import stdlib typing only. IF a third-party library is referenced THEN do not import it in the stub — third-party imports trip mypy import-untyped, and stubtest does not require them.
  8. Run ruff on the authored .pyi (ruff check); the PYI rules lint stubs. Fix every violation.
  9. IF authoring surfaces an important new domain concept THEN add it to the glossary.
  10. IF reworking an existing contract THEN change signatures here first; the body is re-marked at write-test-py.
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. 3mo ago First seen · 18 lines · 30 tokens per session scan A 9f8241f74ad2

Subscribe to this mod's changes

author-test-stubs is a skill published in the GitHub repository nullhack/temple8 (11 stars, last pushed 1mo ago), licensed MIT. It adds 30 tokens to every session and 675 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-08-30.

Related

author-test-stubs compared with skills from other repositories

author-test-stubs next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
author-test-stubsnullhack/temple8Skill111mo agoMITA30OpenCode
python-test-writerbeel-collab/presets.devSkill38d agoMITA48Claude Code, Codex
pythonMadAppGang/claude-codeSkill2918mo agoMITA34Claude Code
python-fastapi-coding-conventionsaishajv/claude-everythingSkill71mo agononeA84Claude Code
python-fastapi-test-conventionsaishajv/claude-everythingSkill71mo agononeA45Claude Code
llm-integrationaishajv/claude-everythingSkill71mo agononeA67Claude Code
django-patternsdeepelementlab/clawcodeSkill1266mo agoGPL-3.0A32Claude Code, Codex