Skip to content
Report library
Purpose / Development

Test Driven Development Skill Security Audit

What the author says it does (original text)

Use when implementing any feature or bugfix, before writing implementation code

Independent security check

Do not install or run it yet

Files checked
2
Risks found
3
Could it run dangerous commands?Looks for programs run straight after downloading, remote control of your computer, and hidden commands.Risks found: 1
Medium risk

It mandates repository-controlled npm test scripts without requiring inspection of the resolved command

Source references: 2
What we found

The Skill twice marks `npm test` as mandatory. That command executes scripts defined by the project's manifest; the example test-path argument does not constrain what the underlying lifecycle script can do. The supplied material does not require inspecting the script or isolating its permissions first.

Why this matters

In an untrusted or compromised repository, the test lifecycle can perform arbitrary local actions within the agent's permissions, including reading credentials, accessing the network, or changing files. The supplied files do not establish that such actions will occur.

These are active shell-execution instructions marked mandatory. `npm test` starts the repository-defined test script; the file argument is generally passed to that script and does not sandbox its own file, credential, or network access. In an untrusted or altered repository, it could therefore act with the agent’s permissions. Running tests is normal for TDD and there is no evidence that any script is malicious, but the skill does not require inspecting it first. Users can restrict permissions and require disclosure of the resolved npm script and lifecycle hooks before execution.

SKILL.md:113In the instructionsOpen original file
### Verify RED - Watch It Fail**MANDATORY. Never skip.**```bashnpm test path/to/test.test.ts```
Show 1 other places
SKILL.md:168In the instructionsOpen original file
### Verify GREEN - Watch It Pass**MANDATORY.**```bashnpm test path/to/test.test.ts```
Could it expose your files or keys?Looks for uploads of files containing passwords or keys, and keys written directly in the code.No risks found
Could it delete files or keep running?Looks for broad file deletion, disk overwrites, and programs set to start automatically.Risks found: 2
High risk

It orders deletion of production code written before its tests, risking loss of existing user work

Source references: 3
What we found

The Skill goes beyond recommending test-first development: it tells the agent to delete any production code written first, not retain or even look at it, and reimplement it. Deletion is not limited to recoverable changes created by the agent in the current task, and user confirmation is not required.

Why this matters

Existing, uncommitted, or difficult-to-recreate implementation may be permanently removed. Reimplementation can also omit behavior that was present in the deleted version.

This is an active agent rule, not an example or warning: it directs deletion of code written before its test and forbids retaining or viewing it. If applied to existing, uncommitted, or unrecoverable user work, it could cause data loss. Although the context is TDD during implementation, the text does not limit deletion to code created by the agent in the current task or require confirmation. Users can require that it apply only to recoverable current-task changes and that existing files never be deleted without explicit approval.

SKILL.md:31In the instructionsOpen original file
## The Iron Law```NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST```Write code before the test? Delete it. Start over.**No exceptions:**- Don't keep it as "reference"- Don't "adapt" it while writing tests- Don't look at it- Delete means deleteImplement fresh from tests. Period.
Show 2 other places
SKILL.md:228In the instructionsOpen original file
## Red Flags - STOP and Start Over- Code before test- Test after implementation- Test passes immediately- Can't explain why test failed- Tests added "later"- Rationalizing "just this once"- "I already manually tested it"- "Tests after achieve the same purpose"- "It's about spirit not ritual"- "Keep as reference" or "adapt existing code"- "Already spent X hours, deleting is wasteful"- "TDD is dogmatic, I'm being pragmatic"- "This is different because..."**All of these mean: Delete code. Start over with TDD.**
SKILL.md:39In the instructionsOpen original file
**No exceptions:**- Don't keep it as "reference"- Don't "adapt" it while writing tests- Don't look at it- Delete means deleteImplement fresh from tests. Period.
Medium risk

It directs the agent to fix every other failing test, potentially exceeding the user's authorized scope

Source references: 1
What we found

The green-stage verification requires other tests to pass and commands immediate fixes when they do not, without first determining whether a failure predates the task, was caused by the current change, or belongs to the requested work.

Why this matters

The agent may alter unrelated files or behavior, expand the change set, and obscure the source of pre-existing repository problems.

Preventing regressions is a legitimate verification goal, but the active instruction unconditionally says to fix other failures “now.” If failures predate the task or are unrelated, an agent could modify unauthorized modules, broaden the change, and obscure baseline problems. The supplied text does not require checking whether the current change caused them. Users can require baseline comparison and permit fixes only for failures attributable to the authorized change.

SKILL.md:176In the instructionsOpen original file
Confirm:- Test passes- Other tests still pass- Output pristine (no errors, warnings)**Test fails?** Fix code, not test.**Other tests fail?** Fix now.
Could it bypass safety checks?Looks for skipped website security checks, excessive file access, or actions that skip your approval.No risks found
Could it mislead the AI or hide text?Checks the skill instructions for requests to ignore you, influence the report, or hide text in invisible characters.No risks found
Could it change links or payment recipients without asking?Looks for forced referral or payment changes combined with instructions to hide the change.No risks found

Inside this skill

8 instruction sections

The Skill makes test-driven development the default for features, fixes, refactoring, and behavior changes: write and verify a failing test, add minimal implementation, verify it passes, then refactor.

View source
SKILL.md:18In the instructionsOpen original file
**Always:**- New features- Bug fixes- Refactoring- Behavior changes
SKILL.md:59In the instructionsOpen original file
    red -> verify_red;    verify_red -> green [label="yes"];    verify_red -> red [label="wrong\nfailure"];    green -> verify_green;    verify_green -> refactor [label="yes"];    verify_green -> green [label="no"];    refactor -> verify_green [label="stay\ngreen"];    verify_green -> next;    next -> red;}

When tests are written or changed, the Skill directs the agent to load the companion guide, which favors hand-derived expectations, real behavior, and avoiding assertions that merely validate mocks.

View source
SKILL.md:206In the instructionsOpen original file
When writing or changing any test, read [writing-good-tests.md](writing-good-tests.md) for the rules that keep tests honest:- Name the production change that would make the test fail — before writing it- Assert on real behavior, never on mock behavior- Keep test-only code in test utilities, out of production classes- Understand a dependency's side effects before mocking it
writing-good-tests.md:27In the instructionsOpen original file
**Derive expectations independently.** Use literals and hand-checkedfixtures; table-driven tests with literal `want` values are the preferredshape. An expectation computed by the code under test — or its helpers —passes no matter what that code does:

The Skill requires actually running the project's npm test command to verify both the red and green stages, rather than only generating test code.

View source
SKILL.md:113In the instructionsOpen original file
### Verify RED - Watch It Fail**MANDATORY. Never skip.**```bashnpm test path/to/test.test.ts```
SKILL.md:168In the instructionsOpen original file
### Verify GREEN - Watch It Pass**MANDATORY.**```bashnpm test path/to/test.test.ts```
Start here · InstructionsSKILL.md
test-driven-development
Lines connect the instruction file to its sections, not an observed execution order. Select a section to read the source. 4 more sections are available in the original file.

File reference map

References: 1
Files making referencesReferenced content
Lines show actual file references, not execution order. Select a node to highlight its connections and inspect the files and source locations. Dashed lines include files that still need locating.
Files and check records2 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 included
  • writing-good-tests.mdFull 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.mdInstructions
  • writing-good-tests.mdSupporting file

Operations mentioned in code and instructions

Run commands
SKILL.md:117In the instructionsOpen original file
```bashnpm test path/to/test.test.ts
SKILL.md:172In the instructionsOpen original file
```bashnpm test path/to/test.test.ts
SKILL.md:259In the instructionsOpen original file
**Verify RED**```bash$ npm test
Lines read
520
File checksum (to compare versions)
f48f36efa64e7f085cf6a0aa035bfec0a8ae6d7b1caabf7cd9302865ea807fc7