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.
npx skills add spencerpauly/awesome-cursor-skills --skill writing-testsgit clone --depth 1 https://github.com/spencerpauly/awesome-cursor-skillsWrote 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.
[](https://agentmods.dev/skills/spencerpauly/awesome-cursor-skills/writing-tests)<a href="https://agentmods.dev/skills/spencerpauly/awesome-cursor-skills/writing-tests"><img src="https://agentmods.dev/badge/skills/spencerpauly/awesome-cursor-skills/writing-tests/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.
<a href="https://agentmods.dev/skills/spencerpauly/awesome-cursor-skills/writing-tests"><img src="https://agentmods.dev/badge/skills/spencerpauly/awesome-cursor-skills/writing-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00059 | $0.00992 |
| Opus 5 | $0.00030 | $0.00496 |
| Sonnet 5 | $0.00012 | $0.00198 |
| Haiku 4.5 | $0.00006 | $0.00099 |
Grade A, and why
writing-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 9d 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.
How it starts
The opening of the file, as written. The whole thing — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Writing Tests
Use this skill when the user asks to add tests to existing code, improve test coverage, or write tests for a specific file or module.
Steps
-
Detect the test setup — check what's already configured:
# Check package.json for test runner cat package.json | grep -E "jest|vitest|mocha|playwright|cypress"Look for config files:
vitest.config.ts,jest.config.ts,playwright.config.ts,.mocharc.*. Check for existing test files to understand the project's test patterns and conventions. -
If no test runner exists — set one up:
npm install -D vitest @testing-library/react @testing-library/jest-domAdd a
testscript topackage.json:{ "test": "vitest run", "test:watch": "vitest" } -
Analyze the target code — read the file(s) to test and identify:
- Public API: exported functions, classes, components, hooks
- Code paths: conditionals, error handling, edge cases
- Dependencies: external services, databases, APIs that need mocking
- Side effects: file I/O, network calls, DOM mutations
-
Create the test file — place it next to the source file or in a
__tests__/directory, matching the project's convention:src/utils/format.ts→src/utils/format.test.tssrc/components/Button.tsx→src/components/Button.test.tsx
-
Write tests following this structure:
import { describe, it, expect, vi } from "vitest"; describe("functionName", () => { // Happy path it("returns formatted output for valid input", () => { ... }); // Edge cases it("handles empty string", () => { ... }); it("handles null/undefined input", () => { ... }); // Error cases it("throws on invalid argument", () => { ... }); // Boundary conditions it("handles maximum length input", () => { ... }); }); -
Mock external dependencies — don't make real API calls or database queries in unit tests:
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.
- 9d ago First seen · 114 lines · 59 tokens per session scan A b9312668ed4e
writing-tests is a skill published in the GitHub repository spencerpauly/awesome-cursor-skills (772 stars, last pushed 1mo ago), licensed CC0-1.0. It adds 59 tokens to every session and 992 once invoked, about $0.0003 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-09-03.
Other skills, from other repositories
migrate-xunit-to-xunit-v3
Migrate .NET test projects from xUnit.net v2 to xunit.v3 and fix v3 breaks. Use for package/CPM conversion, OutputType=Exe, preserving the VSTest or MTP runner (including projects currently using YTest.MTP.XUnit2), incompatible TFMs, async void tests, string-to-Type attributes, custom Fact/Theory/BeforeAfterTest…
go-testing
Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.
nw-fp-clojure
Clojure language-specific patterns, data-first modeling, REPL-driven development, and spec.
mobiai-ios-testing
Use when writing or running tests in an iOS project — unit tests, UI tests, snapshot tests, choosing the right framework.
junit-5-skill
Generates production-grade JUnit 5 unit and integration tests in Java. Covers assertions, parameterized tests, lifecycle hooks, mocking with Mockito, and nested tests. Use when user mentions "JUnit", "JUnit 5", "@Test", "assertEquals", "Assertions", "Java unit test". Triggers on: "JUnit", "@Test", "assertEquals"…
restore-internals-seams-in-finally-blocks-after-each-test
When delegating a task affected by this skill, include.