Tdd Skill Security Audit
What the author says it does (original text)
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
No obvious risks found in this check
- Files checked
- 4
- Risks found
- 0
Inside this skill
The Skill is a test-driven-development guide that requires a one-test vertical-slice loop: write a failing test first, then the minimum implementation, without anticipating future features.
View source
- **Red before green.** Write the failing test first, then only enough code to pass it. Don't anticipate future tests or add speculative features.- **One slice at a time.** One seam, one test, one minimal implementation per cycle.- **Refactoring is not part of the loop.** It belongs to the review stage (see the `code-review` skill), not the red → green implementation cycle.Before writing tests, it requires confirmation from the user about the public boundaries to test, so the testing scope needs explicit user agreement.
View source
**Test only at pre-agreed seams.** Before writing any test, write down the seams under test and confirm them with the user. No test is written at an unconfirmed seam. You can't test everything, so agreeing the seams up front is how testing effort lands on the critical paths and complex logic instead of every edge case.Ask: "What's the public interface, and which seams should we test?"The Skill advises reading an existing CONTEXT.md and relevant ADRs so test terminology and interface constraints match the project; the supplied content does not instruct the agent to modify or upload those files.
View source
When exploring the codebase, read `CONTEXT.md` (if it exists) so test names and interface vocabulary match the project's domain language, and respect ADRs in the area you're touching.The supporting guide recommends mocks only at external system boundaries and explicitly discourages mocking internal modules; its network calls and Stripe key appear in instructional examples, not as commands to execute.
View source
Mock at **system boundaries** only:- External APIs (payment, email, etc.)- Databases (sometimes - prefer test DB)- Time/randomness- File system (sometimes)Don't mock:- Your own classes/modules- Internal collaborators- Anything you control```typescript// Easy to mockfunction processPayment(order, paymentClient) { return paymentClient.charge(order.total);}// Hard to mockfunction processPayment(order) { const client = new StripeClient(process.env.STRIPE_KEY); return client.charge(order.total);}```File reference map
References: 2Files and check records4 files
Coverage and gaps
Content covered in each file
These are the source ranges included in this check, not a guarantee that every issue has been resolved.
SKILL.mdFull text includedmocking.mdFull text includedtests.mdFull text includedagents/openai.yamlFull text included
This report is for the version above. We read the available code and instructions without running the skill or checking extra packages it installs. This is not a promise of safety: a different version or setup may behave differently.
SKILL.mdInstructionsagents/openai.yamlSupporting filemocking.mdSupporting filetests.mdSupporting file
Operations mentioned in code and instructions
Read keys or account settings
function processPayment(order) { const client = new StripeClient(process.env.STRIPE_KEY); return client.charge(order.total);Connect to websites
const api = { getUser: (id) => fetch(`/users/${id}`), getOrders: (userId) => fetch(`/users/${userId}/orders`), getUser: (id) => fetch(`/users/${id}`), getOrders: (userId) => fetch(`/users/${userId}/orders`), createOrder: (data) => fetch('/orders', { method: 'POST', body: data }), getOrders: (userId) => fetch(`/users/${userId}/orders`), createOrder: (data) => fetch('/orders', { method: 'POST', body: data }),};- Lines read
- 181
- File checksum (to compare versions)
- 139750cdb3ba21145ee43a1b0431353b59638bdbccc963b5e2e46e2a03e7903f