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 agentmods add commands/hmake98/nestjs-starter/gen-testgit clone --depth 1 https://github.com/hmake98/nestjs-starterWrote 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/commands/hmake98/nestjs-starter/gen-test)<a href="https://agentmods.dev/commands/hmake98/nestjs-starter/gen-test"><img src="https://agentmods.dev/badge/commands/hmake98/nestjs-starter/gen-test.svg" alt="Measured on agentmods" 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 | $0.00000 | $0.00513 |
| Opus 5 | $0.00000 | $0.00257 |
| Sonnet 5 | $0.00000 | $0.00103 |
| Haiku 4.5 | $0.00000 | $0.00051 |
Grade A, and why
gen-test 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 4d 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.
What it actually says
Generate unit tests for: $ARGUMENTS
Read these files first to understand the exact testing patterns used in this project:
test/modules/user.service.spec.ts— service test patterntest/modules/auth.service.spec.ts— service test with external mocks (argon2, jwt)test/common/cache.service.spec.ts— common service test patterntest/common/database.service.spec.ts— class mocking pattern with jest.mock()test/jest.json— Jest config (clearMocks + restoreMocks are global — do NOT add jest.clearAllMocks() in beforeEach)
Then read the actual file being tested to understand all methods, branches, and error paths.
Rules to follow:
Structure
- File goes in
test/mirroring thesrc/path (e.g.src/modules/post/services/post.service.ts→test/modules/post.service.spec.ts) - Top-level
describe('<ClassName>')block - Nested
describe('<methodName>')for each public method it('should be defined')smoke test
Mocking
- Mock all injected dependencies as plain objects with
jest.fn()for every method - Do NOT use
jest.createMockFromModuleor@golevelup/ts-jest - For module-level mocks (argon2, ioredis, prisma client) use
jest.mock('module-name')at the top of the file ConfigServicemock: implementgetOrThrowwith aRecord<string, string>map covering all keys the service accesses
Test cases — for every method generate:
- Happy path — returns expected value
- Not-found / guard clause — throws
HttpExceptionwith correctHttpStatus - Dependency failure — mock rejects, assert the error propagates or is handled
- Edge cases specific to the method's branching logic
Assertions
- Use
await expect(promise).resolves.toEqual(...)andawait expect(promise).rejects.toThrow(HttpException) - After write operations assert the repository method was called with
expect(mock.method).toHaveBeenCalledWith(...) - Use
expect.objectContaining({})when only part of the call args matters
Do NOT
- Call
jest.clearAllMocks()— handled globally by jest config - Import
jest— it is a global - Add unnecessary
asyncto tests that don'tawait
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.
- 4d ago First seen · 41 lines · 0 tokens per session scan A 2e3f915e790f
gen-test is a command published in the GitHub repository hmake98/nestjs-starter (61 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 513 tokens. 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.
Other commands, from other repositories
test
Generate comprehensive unit tests for files. Use /test or /test --changed.
feature
Post a feature to the Features Board on production and write tweets.
commit-all
Group all changes semantically and commit each group separately.
audit
Command "audit" from chohra-med/expo_boilerplate, covering invocation, checks and output.
cert-check
Review the current state against certification and platform compliance expectations.
level-beat
Design or revise level flow, beats, pacing, and encounter structure.