memstack-development-test-writer

A test-writing guide for creating unit, integration, component, and end-to-end tests. It includes mock choices, edge cases, naming, and ways to connect tests to continuous integration.

In plain words
What is it for?
Use it when adding tests, checking coverage, testing functions and components, mocking external boundaries, or verifying error and boundary cases.
Why use it?
It helps catch incorrect behavior and unusual inputs instead of producing tests that only pass for the normal case or depend too much on implementation details.

Skill for Claude CodeCodex

Part of the memstack plugin — 53 skills, 2 commands, 5 hooks shipped together

Install

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.

agentmods
npx agentmods add skills/cwinvestments/memstack/test-writer
Any agent
npx skills add cwinvestments/memstack --skill test-writer
Clone the repo
git clone --depth 1 https://github.com/cwinvestments/memstack

Made for: Claude Code, Codex.

Or install memstack, the plugin that ships this one along with the rest of its 53 skills, 2 commands, 5 hooks.

Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,750 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00070 $0.03750
Opus 5 $0.00035 $0.01875
Sonnet 5 $0.00014 $0.00750
Haiku 4.5 $0.00007 $0.00375

Measured 3d ago against content hash c40f4dd509bc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

memstack-development-test-writer 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 3d 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.

skills/development/test-writer/SKILL.md · 473 lines

How it starts

The opening of the file, as written. The whole thing — 473 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Test Writer — Generating test suite...

Generates comprehensive test suites with unit, integration, and e2e tests, proper mocking strategies, edge case coverage, naming conventions, and CI integration patterns.

Activation

When this skill activates, output:

Test Writer — Generating test suite...

Then execute the protocol below.

Context Guard

Context Status
User says "write tests", "add tests", "test coverage" ACTIVE
User says "unit tests", "integration tests", "component tests", "e2e tests" ACTIVE
User says "mocking", "edge cases", "test this function" ACTIVE
User wants to refactor existing code DORMANT — use Refactor Planner
User wants to change database schema DORMANT — use Migration Planner

Common Mistakes

Mistake Why It's Wrong
"Testing implementation, not behavior" Tests that break when you refactor internals are brittle. Test WHAT it does, not HOW.
"No edge cases" Happy path tests catch 20% of bugs. Boundaries, nulls, empty inputs, and error paths catch the rest.
"Mocking everything" Over-mocking creates tests that pass but don't catch real bugs. Mock boundaries, not internals.
"Test names like test1, test2" Names should describe behavior: "returns empty array when no items match filter". Self-documenting tests.
"No test isolation" Tests that depend on each other or shared state create flaky test suites that nobody trusts.

Protocol

Step 1: Gather Test Requirements

If the user hasn't provided details, ask:

  1. Target — what code needs tests? (function, class, module, API endpoint)
  2. Language/framework — what tech stack? (JS/TS + Jest/Vitest, Python + pytest, Go, etc.)
  3. Test level — unit, integration, e2e, or all three?
  4. Current coverage — any existing tests? What percentage?
  5. Priority — critical paths first, or comprehensive coverage?

Step 2: Analyze the Code Under Test

Read the full file on GitHub · 473 lines

Changes

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.

  1. 3d ago First seen · 473 lines · 70 tokens per session scan A c40f4dd509bc

Subscribe to this mod's changes

memstack-development-test-writer is a skill published in the GitHub repository cwinvestments/memstack (417 stars, last pushed 6d ago), licensed MIT. It adds 70 tokens to every session and 3,750 once invoked, about $0.0003 per session on Opus 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-08-30.

Related

Other skills, from other repositories

moai-ref-testing-pyramid

Test pyramid strategy, coverage targets, test patterns, and quality metrics reference. Agent-extending skill that amplifies manager-develop test-creation and quality-validation work with production-grade testing patterns. NOT for: production code implementation, architecture design, DevOps, security audits.

modu-ai/moai-adk · 61 tokens

qa

Systematically QA test a web application and fix bugs found. Runs QA testing, then iteratively fixes bugs in source code, committing each fix atomically and re-verifying. Use when asked to "qa", "QA", "test this site", "find bugs", "test and fix", or "fix what's broken". Proactively suggest when the user says a…

GCWing/BitFun · 160 tokens

qa-only

Report-only QA testing. Systematically tests a web application and produces a structured report with health score, screenshots, and repro steps — but never fixes anything. Use when asked to "just report bugs", "qa report only", or "test but don't fix". For the full test-fix-verify loop, use /qa instead. Proactively…

GCWing/BitFun · 111 tokens

ccc-qa

QA workflow. Runs unit + integration + E2E tests, coverage delta, edge case enumeration, flaky test quarantine. Delegates to qa-engineer agent.

KevinZai/commander · 36 tokens

testing

· Write/debug tests: unit, integration, E2E, TDD, mocks, fixtures, a11y, perf. Triggers: 'test', 'spec', 'TDD', 'playwright', 'vitest', 'jest', 'pytest', 'coverage', 'flaky'. Not for security tests (use security-audit).

iuliandita/skills · 72 tokens

dev-testing

测试规范 — 单元测试/集成测试/API测试/E2E测试四类覆盖标准与触发条件.

devcodex-labs/devcodex · 27 tokens