TDD Guide
alirezarezvani/claude-skills
Test-driven development skill for writing unit tests, generating test fixtures and mocks, analyzing coverage gaps, and guiding red-green-refactor workflows across Jest, Pytest, JUnit, Vitest, and…
Procedure for designing and writing Matft's XCTest cases with high coverage — boundary values, dtypes, memory layouts, NaN/inf, empty arrays, broadcasting, platform differences, performance and…
$ npx skills add jjjkkkjjj/Matft --skill test-design -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install jjjkkkjjj/Matft test-design --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/jjjkkkjjj/Matft.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/test-design .claude/skills/test-design && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "test-design" agent skill from https://github.com/jjjkkkjjj/Matft/tree/main/.claude/skills/test-design into .claude/skills/test-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "test-design", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/jjjkkkjjj/Matft/tree/main/.claude/skills/test-designType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add jjjkkkjjj/Matft --skill test-design -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install jjjkkkjjj/Matft test-design --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jjjkkkjjj/Matft.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/test-design .agents/skills/test-design && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "test-design" agent skill from https://github.com/jjjkkkjjj/Matft/tree/main/.claude/skills/test-design into .agents/skills/test-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "test-design", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jjjkkkjjj/Matft --skill test-design -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install jjjkkkjjj/Matft test-design --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jjjkkkjjj/Matft.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/test-design .cursor/skills/test-design && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "test-design" agent skill from https://github.com/jjjkkkjjj/Matft/tree/main/.claude/skills/test-design into .cursor/skills/test-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "test-design", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/jjjkkkjjj/Matft.git --path .claude/skills/test-design--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add jjjkkkjjj/Matft --skill test-design -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install jjjkkkjjj/Matft test-design --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jjjkkkjjj/Matft.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/test-design .gemini/skills/test-design && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "test-design" agent skill from https://github.com/jjjkkkjjj/Matft/tree/main/.claude/skills/test-design into .gemini/skills/test-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "test-design", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install jjjkkkjjj/Matft test-designInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add jjjkkkjjj/Matft --skill test-design -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/jjjkkkjjj/Matft.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/test-design .github/skills/test-design && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "test-design" agent skill from https://github.com/jjjkkkjjj/Matft/tree/main/.claude/skills/test-design into .github/skills/test-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "test-design", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jjjkkkjjj/Matft --skill test-design -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install jjjkkkjjj/Matft test-design --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jjjkkkjjj/Matft.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/test-design .opencode/skills/test-design && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "test-design" agent skill from https://github.com/jjjkkkjjj/Matft/tree/main/.claude/skills/test-design into .opencode/skills/test-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "test-design", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
test-designProcedure for designing and writing Matft's XCTest cases with high coverage — boundary values, dtypes, memory layouts, NaN/inf, empty arrays, broadcasting, platform differences, performance and…
Test Design is an agent skill from jjjkkkjjj/Matft. Procedure for designing and writing Matft's XCTest cases with high coverage — boundary values, dtypes, memory layouts, NaN/inf, empty arrays, broadcasting, platform differences, performance and agreement with NumPy — with expected values generated by numpy (python/gen.py) instead of written by hand. Use this skill whenever tests are written or extended in Matft: implementing a new function or fixing a bug test-first (TDD), adding coverage for an existing function, reviewing whether tests are sufficient, or…
Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including reference files and assets (for example `assets/gen_template.py`, `evals/evals.json` and `references/generator.md`).
It sits in Testing & QA, covering Test generation and Test-driven development. It works with NumPy and Python. The repository describes itself as: Numpy-like library in swift. (Multi-dimensional Array, ndarray, matrix and vector library). The licence is BSD-3-Clause.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 618dcfc. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships script files (Python), which the agent can run.
Shell commands in SKILL.md call:
swiftFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Test Design loads about 2k tokens when it runs, and up to ~5.4k if it reads all its reference files. Until then it costs about 240 tokens; SKILL.md has 1,011 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from jjjkkkjjj/Matft at commit 618dcfc, republished under its BSD-3-Clause licence (© jjjkkkjjj). 1,011 words, ~1,977 tokens.
.claude/skills/test-design/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.Matft promises "behaves like NumPy". Most of the bugs found so far were not in the main path but at the edges:
integer wraparound, zero-length dimensions corrupting the heap, slice views reading past their data,
complex imaginary parts copied from the real part, vDSP behaving differently on x86_64, NaN dropped by a kernel.
A test that only checks f([1, 2, 3]) in .Float catches none of these.
This skill turns "write tests" into a systematic pass over the viewpoints where Matft actually breaks,
with every expected value coming from numpy so the test cannot encode a misunderstanding.
TDD is required in this repository (CLAUDE.md): write the tests, watch them fail, then implement.
Before writing anything, run the numpy counterpart in Python and read its docs for the target function:
signature and defaults, the output dtype rule, the output shape for each axis/keepdims,
what it does with NaN, inf, empty input, negative axes, out-of-range parameters.
Also note where Matft deliberately differs (see "Matft conventions" below) so you don't report them as bugs,
and check Sources/ for the existing signature if the function exists.
Use the venv from python/README.md (.venv/bin/python). If it does not exist, create it as the README says.
Read references/viewpoints.md and go through every viewpoint for the target. For each one, decide
cover (list the concrete cases) or N/A (with a one-line reason, e.g. "no axis parameter").
Write the plan as a short table in your reply before writing code. The table is what makes the coverage
reviewable: a missing row is visible, an unexplained gap is not.
| Viewpoint | Cases | Notes |
|---|---|---|
| Values / boundaries | 0, ±1, negatives, ties, max/min of each int type | |
| dtype | Float, Double, Int, UInt8, Bool, Complex | output dtype == np.result_type |
| ... | ... |
Size the plan to the change: a new public function gets the full pass; a one-line bug fix gets the failing case plus the neighbouring viewpoints that the same code path touches (e.g. a fix in a reduction kernel → axes, layouts, dtypes).
Expected values are never computed by hand or copied from Matft's own output — that would make the test agree with the bug. Choose one of:
python/gen_numpy_gaps_coverage.py for numpy-level functions, gen_fft_audio_coverage.py,
gen_image_coverage.py), or create python/gen_<area>_coverage.py from assets/gen_template.py.
Each case writes the Swift expression and the numpy expression side by side, so a reviewer can check them
against each other. The output file starts with // Generated by ... Do not edit by hand.
Register a new generator in the table of python/README.md. Details: references/generator.md.// numpy: np.diff(a, n=4, axis=1).shape -> (3, 0)).Compare arrays with XCTAssertClose (= np.testing.assert_allclose, NaN matches NaN, inf must match exactly)
and pass checkType: true — a wrong output dtype is a numpy mismatch too. For exact Int / Bool results use
rtol: 0, atol: 0. Avoid XCTAssertEqual(MfArray, MfArray): == ignores the mftype, treats floats within 1e-5
as equal, wraps integers into the type (UInt8 index 299 "equals" 43) and never matches NaN, so it hides exactly
the bugs this skill is looking for. XCTAssertEqual is fine for shapes and Swift scalars. Tolerances: Float rtol/atol ≈ 1e-5..1e-6, Double 1e-10..1e-12;
loosen only with a comment explaining why (e.g. accumulated FFT error).
Run only the new tests and confirm they fail for the expected reason (not a compile error in the test itself):
swift test --filter MatftTests.<ClassName>If a case unexpectedly passes before the implementation, it is not testing the change — tighten it. If an existing function fails a new case, you found a bug: keep the test, fix the bug in the same PR (TDD), and mention it in the PR description.
Implement the minimum to pass, then run swift test (all). Then check the platform viewpoints that apply
(references/viewpoints.md §Platform): x86_64 for new vDSP usage, WASI for code with a fallback path.
Add a performance case only when the function is a hot path: an elementwise kernel, reduction, sort/search,
indexing/setter, conversion, linear algebra, FFT, or anything that scales with a large array. Skip it for
small helpers, creation of small arrays, and error handling — and say so in the plan.
Procedure (references/viewpoints.md §Performance):
add a measureWithWarmup test in Tests/PerformanceTests/<Area>PefTests.swift using PerfFixtures,
and register the same expression in CASES of scripts/benchmark.py with its numpy counterpart.
Include a non-contiguous (transposed) input variant if the kernel has a separate strided path.
Measuring and reporting the numbers is the benchmark skill's job.
End with the plan table updated to what was actually covered, the test files touched, the Red → Green results (counts of failures before and passes after), and any bugs found or cases left N/A.
These differ from numpy on purpose. Write the expected value in Matft's convention and say so in a comment.
[1], not a 0-d scalar (the generator helpers convert 0-d to [1])..Double is stored as Float32: integers above 2^24 lose precision unless .Double;
Bool is stored as 0/1 Float. Integer results out of range wrap like numpy's fixed-width ints.MfType.result_type follows numpy for array–array integer promotion; otherwise the higher priority wins
(integers do not widen when combined with Float).precondition (a crash), which XCTest cannot catch. Only test errors of APIs
that throws; for precondition paths, note the intended behavior in the plan instead of testing it.XCTAssertClose(actual, expected, rtol:, atol:, checkType:) — assert_allclose with the worst index in the message.layoutVariants(a) — the same logical array as row/column major, offset view, prefix view, strided view,
reversed view and transposed view. Loop over it: for (name, x) in layoutVariants(A) { ... name }.rowValues(x) — values in row-major order as [Double].© jjjkkkjjj, BSD-3-Clause. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 4 other files (references, assets) in .claude/skills/test-design of jjjkkkjjj/Matft.
Open the folder on GitHubat commit 618dcfc
Test Design next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Test Design this skilljjjkkkjjj/Matft | 147 | — | ~2k | Automated safety check: Pass | BSD-3-Clause | |
| TDD Guidealirezarezvani/claude-skills | 28k | — | ~3.4k | Automated safety check: Pass | MIT | |
| TDD GuideLeoYeAI/openclaw-master-skills | 2.2k | — | ~1.4k | Automated safety check: Pass | MIT | |
| TDD GuideaAAaqwq/AGI-Super-Team | 105 | 2 repos | ~1.1k | Automated safety check: Pass | MIT | |
| Python Testingathola/claude-night-market | 341 | — | ~800 | Automated safety check: Pass | MIT | |
| Light Experiment CodingLight0305/Light-skills | 640 | — | ~2.3k | Automated safety check: Pass | MIT |
alirezarezvani/claude-skills
Test-driven development skill for writing unit tests, generating test fixtures and mocks, analyzing coverage gaps, and guiding red-green-refactor workflows across Jest, Pytest, JUnit, Vitest, and…
LeoYeAI/openclaw-master-skills
Test-driven development skill for writing unit tests, generating test fixtures and mocks, analyzing coverage gaps, and guiding red-green-refactor workflows across Jest, Pytest, JUnit, Vitest, and…
aAAaqwq/AGI-Super-Team
Test-driven development workflow with test generation, coverage analysis, and multi-framework support
athola/claude-night-market
Python testing patterns with pytest, fixtures, TDD, mocking, async and integration tests.
Light0305/Light-skills
Builds the code for a frozen research experiment test-first, with leakage controls, seed handling and saved evidence so results can be rerun and audited.
google/adk-python
Checks that every Python code block in a Markdown file actually compiles and runs, by extracting each block to a temporary file, executing it in an isolated subprocess, and writing a pass/fail…
jjjkkkjjj/Matft
Procedure for writing and updating Matft's documentation (the Docusaurus site in website/ and the doc comments on the public API that become the Swift-DocC API reference).
jjjkkkjjj/Matft
Procedure for benchmarking Matft's PerformanceTests against Numpy and reporting the results (and, when asked, updating the speed comparison table on the docs site, website/docs/performance.md).
jjjkkkjjj/Matft
Procedure for adding tests for Matft's image processing (Matft.image., indexing or channel swapping on images, etc.), generating comparison images that put the result next to an OpenCV reference…
jjjkkkjjj/Matft
Procedure for releasing a new version of Matft (decide the version → check tests → write release notes → create and push an annotated tag → publish a GitHub Release).
Categories
Procedure for designing and writing Matft's XCTest cases with high coverage — boundary values, dtypes, memory layouts, NaN/inf, empty arrays, broadcasting, platform differences, performance and…. Test Design is an agent skill from jjjkkkjjj/Matft.py) instead of written by hand.
Test Design fits situations like: tests are written; extended in Matft: implementing a new function; fixing a bug test-first (TDD); adding coverage for an existing function.
Run `npx skills add jjjkkkjjj/Matft --skill test-design -a claude-code`. Or copy the skill folder (.claude/skills/test-design in jjjkkkjjj/Matft) into .claude/skills/test-design in your project. Claude Code loads it when a task matches its description.
Run `npx skills add jjjkkkjjj/Matft --skill test-design -a codex`. Or copy the skill folder (.claude/skills/test-design in jjjkkkjjj/Matft) into .agents/skills/test-design in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jjjkkkjjj/Matft --skill test-design -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/test-design, .gemini/skills/test-design, .github/skills/test-design and .opencode/skills/test-design in your project.
Going by SKILL.md and its folder, Test Design needs Python for the scripts in its folder and the command-line tools its instructions call (swift). Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Test Design is published under the BSD-3-Clause licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2k tokens (SKILL.md is roughly 7.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.4k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Test Design: TDD Guide (alirezarezvani/claude-skills, 28k stars), TDD Guide (LeoYeAI/openclaw-master-skills, 2.2k stars), TDD Guide (aAAaqwq/AGI-Super-Team, 105 stars) and Python Testing (athola/claude-night-market, 341 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
jjjkkkjjj (a GitHub user) maintains it in jjjkkkjjj/Matft, which has 147 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on September 27, 2026.
Source: jjjkkkjjj/Matft on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.