test-implementation
Skill2 starsChanged 36 days agoMITView on GitHub
Test implementation: turn specified behavior into executable setup, invocation, and assertions. Use when implementing or reviewing behavior-verifying tests, agreeing public seams, or avoiding implementation-coupled assertions.
In this repository22 other files it gives its agents.
- atddSkill
- automated-checksSkill
- bddSkill
- behavior-specificationSkill
- choose-orchestrationSkill
- codebase-designSkill
- code-reviewSkill
- compile-instructionSkill
- computer-use-wizardSkill
- gherkinSkill
- goal-loopSkill
- goal-superviseSkill
- high-value-testingSkill
- hvtddSkill
- idiot-bossSkill
- retroSkill
- setup-engineering-skillsSkill
- tddSkill
- testingSkill
- ubuntu-desktop-computer-useSkill
- ubuntu-machine-configurationSkill
- writing-for-agentsSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this reference to implement a check for specified behavior.
- Distinctive: line 10
Before choosing test levels, verification modes, or test doubles: Call the Skill tool with "testing".
- Distinctive: line 12
When shaping an external interface for a test double, read Designing external adapters for testability.
- Distinctive: line 20
Ask: "What's the public interface, and which seams should we test?"
- Distinctive: line 22
When the shape of that interface is itself in question (how deep the module is, where the seam belongs, what the interface should expose): …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Test implementation
Use this reference to implement a check for specified behavior. These rules apply to tests intended to verify behavior, not automatically to temporary developer tests used to explore or implement something.
Before choosing test levels, verification modes, or test doubles: Call the Skill tool with "testing".
When shaping an external interface for a test double, read Designing external adapters for testability.
Seams: where tests go
A seam is the public boundary you test at: the interface where you observe behavior without reaching inside. Tests live at seams, never against internals.
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?"
When the shape of that interface is itself in question (how deep the module is, where the seam belongs, what the interface should expose): Call the Skill tool with "codebase-design". Use the module, interface, depth, seam, adapter, leverage, and locality vocabulary.
Observable behavior
Observe what a caller can see; several assertions may establish one behavior. Use an expectation independent of the implementation, such as a known value or an agreed example.
// Verifies the specified checkout outcome
test("user can checkout with valid cart", async () => {
const cart = createCart();
cart.add(product);
const result = await checkout(cart, paymentMethod);
expect(result.status).toBe("confirmed");
});Implementation coupling
A test that checks an internal collaborator, private method, or its call order can fail after a refactor even when behavior has not changed. Communication at an agreed external boundary can itself be observable behavior; choosing that verification mode belongs to the testing model.
// Checks an internal call instead of the specified checkout outcome
test("checkout calls paymentService.process", async () => {
const mockPayment = jest.mock(paymentService);
await checkout(cart, payment);
expect(mockPayment.process).toHaveBeenCalledWith(cart.total);
});Observe through the public interface rather than bypassing it to inspect internal storage:
// Bypasses the interface
test("createUser saves to database", async () => {
await createUser({ name: "Alice" });
const row = await db.query("SELECT * FROM users WHERE name = ?", ["Alice"]);
expect(row).toBeDefined();
});
// Observes the specified behavior through the interface
test("createUser makes user retrievable", async () => {
const user = await createUser({ name: "Alice" });
const retrieved = await getUser(user.id);
expect(retrieved.name).toBe("Alice");
});Tautological expectations
A test that recomputes the expected value like the implementation can pass by construction. Derive the expectation independently:
// Recomputes the expected value
test("calculateTotal sums line items", () => {
const items = [{ price: 10 }, { price: 5 }];
const expected = items.reduce((sum, i) => sum + i.price, 0);
expect(calculateTotal(items)).toBe(expected);
});
// Uses a known value
test("calculateTotal sums line items", () => {
expect(calculateTotal([{ price: 10 }, { price: 5 }])).toBe(15);
});Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

