Borrowing it
Nothing to install: this file belongs to thunder-id/thunderid. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/thunder-id/thunderid/main/.agent/skills/backend-tests/SKILL.mdgit clone --depth 1 https://github.com/thunder-id/thunderidWrote 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/thunder-id/thunderid/backend-tests)<a href="https://agentmods.dev/skills/thunder-id/thunderid/backend-tests"><img src="https://agentmods.dev/badge/skills/thunder-id/thunderid/backend-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/thunder-id/thunderid/backend-tests"><img src="https://agentmods.dev/badge/skills/thunder-id/thunderid/backend-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00055 | $0.00888 |
| Opus 5.5 | $0.00022 | $0.00355 |
| Sonnet 5.5 | $0.00011 | $0.00178 |
| Haiku 4.5 | $0.00006 | $0.00089 |
Grade A, and why
backend-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 6d 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 — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Tests
Read with backend/AGENTS.md, which says which test targets to run.
What to Test
- Cover every case you can with integration tests. They exercise the real server, so they carry the most weight.
- Unit tests are still required. They test one component with its dependencies mocked, the DB provider included. Do not build a database harness in a unit test: that is an integration scenario.
- A query with a Postgres variant needs coverage on Postgres too. Integration tests run against Postgres in CI.
- Cover the failure paths: store errors returning
InternalServerError, each validation error, and read-only refusal for declared resources. - For a bug fix, add a regression test that fails without the fix when the case can be reproduced in a test.
- Do not add test-only code to source files (test loaders,
ForTestconstructors, test flags). Mock the dependency or inject the behaviour from the test.
Mocks
Never hand-write a mock, stub, or fake. Generate it with mockery:
Config in backend/ |
For | Output |
|---|---|---|
.mockery.private.yml |
interfaces used only inside their package | <Interface>_mock_test.go in the package |
.mockery.public.yml |
interfaces other packages depend on | backend/tests/mocks/<pkg>mock/ |
Register interfaces with one entry per package that lists them under interfaces:, not one entry per interface. Run make mockery and commit the output. Regenerate after any interface change. Never edit generated mocks.
Suites
type ExampleServiceTestSuite struct {
suite.Suite
mockStore *exampleStoreInterfaceMock
}
func TestExampleServiceTestSuite(t *testing.T) {
suite.Run(t, new(ExampleServiceTestSuite))
}
- A new test file uses a testify suite.
- Tests added to a file that has a suite are suite methods.
- The suite is named after the file it tests (
example_service_test.goholdsExampleServiceTestSuite). - Test methods generally don't need comments. Add one only when the test is not self-explanatory or handles a case differently.
- Use table-driven tests for similar cases, not lint suppressions.
- Tests that read the server runtime call
config.ResetServerRuntime()inSetupTestandTearDownTest.
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.
- 6d ago First seen · 68 lines · 55 tokens per session scan A 01dc12d9fa33
backend-tests is a skill published in the GitHub repository thunder-id/thunderid (594 stars, last pushed yesterday), licensed Apache-2.0. It adds 55 tokens to every session and 888 once invoked, about $0.0002 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-10-21.
Other skills, from other repositories
testing-and-ci
Choose and run unit, E2E, Caddyfile fixture, automation, and CI checks for caddy-security. Use for coverage requirements, test evidence, failures, and report workflows; official OP conformance remains opt-in.
go-testing
Use when writing, reviewing, or improving Go test code — including table-driven tests, subtests, parallel tests, test helpers, test doubles, and assertions with cmp.Diff. Also use when a user asks to write a test for a Go function, even if they don't mention specific patterns like table-driven tests or subtests. Does…
go-test-implementation
Use for test-only changes or non-routine fixtures and harnesses, selecting cases and assertions from accepted behavior during implementation.
principle-testing
Testing strategy and architecture — test pyramid (unit / integration / e2e), test doubles taxonomy (stub / mock / spy / fake), coverage-vs-confidence, mutation testing, flaky-test triage, contract testing, fixtures and test data builders. Distinct from principle-tdd which covers the red-green-refactor micro-cycle.…
Go Testing Patterns
Go testing with testing package, table-driven tests, subtests, benchmarks, test fixtures, httptest, and testify assertions.
golang-testing
Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI…