tend-tests

tend-tests is a skill for Claude Code, Codex from robcsaszar/tend. It costs 99 tokens per session (1,629 once invoked), scanned A, original, MIT.

A testing skill that finds one untested function in a repository's logic code and adds a focused unit test for its normal and edge cases.

In plain words
What is it for?
Use it to add one test at a time to code that currently lacks coverage.
Why use it?
It closes test-coverage gaps in small, reviewable steps while following the repository's existing testing setup.

Skill for Claude CodeCodex

Part of the robcsaszar-tend plugin — 7 skills shipped together

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

Made for: Claude Code, Codex.

Or install robcsaszar-tend, the plugin that ships this one along with the rest of its 7 skills.

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 tend-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/robcsaszar/tend/tend-tests.svg)](https://agentmods.dev/skills/robcsaszar/tend/tend-tests)
Your own site
<a href="https://agentmods.dev/skills/robcsaszar/tend/tend-tests"><img src="https://agentmods.dev/badge/skills/robcsaszar/tend/tend-tests.svg" alt="Measured on agentmods" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,629 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.00099 $0.01629
Opus 5 $0.00049 $0.00814
Sonnet 5 $0.00020 $0.00326
Haiku 4.5 $0.00010 $0.00163

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

Security

Grade A, and why

tend-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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/validate-test-shape.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/tend-tests/SKILL.md · 90 lines

How it starts

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

Tend Tests — the weaver

Find the single highest-priority untested function in this repo's logic layer, write one new test exercising the happy path and an edge case using this repo's own conventions, verify it passes, hand back the diff for review. One function per run.

0. Load config

  • Read .claude/tend/config.yaml. Use skills.tests (off-limits globs, notes — repo-specific hints often live here, e.g. the exact name of this repo's DI/mock-factory convention). This skill has no capability modules — skip module-gating entirely.
  • No config? Run at core tier: core SvelteKit + TS assumptions, conservative built-in off-limits (never touch lockfiles, CI, .env, config). Emit once: "run tend-onboard to sharpen." Continue.

1. Triage

MANDATORY READ references/scan-core.md.

  • Establish the off-limits set: config's skills.tests.off-limits plus built-ins.
  • Identify the test runner actually configured — read package.json scripts and a config file (vitest.config.*, jest.config.*, or equivalent). Don't assume; confirm.
  • Identify the test file placement convention (co-located *.test.ts vs. a top-level tests//__tests__/ directory) and the import style in use (extensioned imports, path aliases).
  • Read 1–2 existing test files to learn the assertion style and — critically — whatever dependency-injection/mock convention this repo already uses. A named factory pair like makeState/makeDeps is one example of this convention, not the target itself — detect and match whatever this repo actually does, including "none yet" (see §2 fallback tier).

If no test runner is configured at all, stop and report that — do not pick one. Selecting a test runner is a project decision, not a coverage fix.

Completion criterion: test runner identified, an example existing test read, off-limits known.

2. Scan — priority order, stop at the first real hit

  1. DI/mockable-dependency candidates (highest priority). Grep the logic/library directory for the repo's dependency-injection idiom — a deps parameter injecting browser/platform globals (fetch, storage, timers), constructor injection, or an equivalent explicit seam. This is the highest-value target because the codebase has already signalled "designed to be tested without module-level mocking."
  2. Coverage cross-check. For each candidate, grep the test directory/convention for any reference to the function name. Zero references = untested candidate.
  3. Fallback tier — pure functions. If no DI-pattern candidate is untested, fall back to any pure exported function (deterministic output, no hidden module-level state) in the logic layer with zero test references. Note explicitly in your output that this is the fallback tier, since it carries a weaker "designed to be tested" signal than tier 1.

Read the full file on GitHub · 90 lines

Files

What ships with it

8 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. 3d ago First seen · 90 lines · 99 tokens per session scan A 395980e22a43

Subscribe to this mod's changes

tend-tests is a skill published in the GitHub repository robcsaszar/tend (0 stars, last pushed 4d ago), licensed MIT. It adds 99 tokens to every session and 1,629 once invoked, about $0.0005 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-31.

Related

Other skills, from other repositories

seams

Use when you want to unit-test logic but can't without a database, network, clock, or a pile of mocks — or when a function fetches, computes, branches on policy, and writes all in one breath. Splits the decision (pure logic) from the action (I/O and side effects) along the natural seam, so the logic becomes testable…

mikestangdevs/craft-skills · 137 tokens

brooks-test

Test quality review drawing on twelve classic engineering books — with primary focus on xUnit Test Patterns, The Art of Unit Testing, How Google Tests Software, and Working Effectively with Legacy Code — that diagnoses structural problems in an existing test suite: brittleness, mock abuse, coverage illusions, slow…

hyhmrright/brooks-lint · 161 tokens

software-code-refactoring

Improve production code quality while preserving all existing test behavior. Commonly used for the Refactor phase of TDD red-green-refactor, but applicable to any codebase with tests. Use when production code works but needs cleanup — reducing duplication, improving naming, simplifying complexity, aligning with…

stencila/stencila · 102 tokens

simplify-codebase

Simplification audit or authorized codebase simplification whose stated objective is to remove accidental complexity. Use for evidence-backed deletion or consolidation of dead code, duplicate state, redundant APIs or layers, ownerless abstractions, obsolete compatibility or design records, and over-engineering in any…

tt-a1i/simplify-codebase · 93 tokens

cyclomatic-complexity

Refactor code to reduce cyclomatic complexity so it stays readable, maintainable, and aligned with the long-term vision of the codebase, not just optimized for AI comprehension. Use whenever the user asks to refactor, simplify, clean up, or review code quality; mentions complexity, maintainability, readability…

saurabhkumar8112/cyclomatic-complexity-skill · 103 tokens

refactor

Refactor code to improve structure and maintainability.

vstorm-co/pydantic-deepagents · 12 tokens