focused-tdd
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "focused-tdd" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-a609752bf8fc11416ed7644f7a72b1bee073d0af0e922051ac6380c6b835fd94. Verify the upstream source and version against https://github.com/jMerta/codex-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Use this pattern when a user requests test-driven development (TDD), writing a regression test before a fix, or implementing deterministic business rules, state transitions, authorization boundaries, idempotency, or similar behaviors. Apply this pattern when observing a focused failing test materially reduces risk; it follows strict TDD, regression-first, or proportionate verification strategies.
Introduction source: third_party · jMerta · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Use when the user asks for test-first development, TDD, or a regression test before a fix, or when implementing deterministic business rules, state transitions, authorization boundaries, idempotency, and other behavior where observing a focused failing test would materially reduce risk. Selects strict TDD, regression-first, or proportional validation.
- Testing
- Not tested
Browse files
Frontmatter
name: focused-tdd
description: Use when the user asks for test-first development, TDD, or a regression test before a fix, or when implementing deterministic business rules, state transitions, authorization boundaries, idempotency, and other behavior where observing a focused failing test would materially reduce risk. Selects strict TDD, regression-first, or proportional validation.Focused TDD
Treat test-first development as a risk-reduction technique, not a universal ceremony.
Choose the workflow
Inspect the changed behavior, nearby code, existing tests, and repository instructions. State the selected approach briefly before editing.
Use strict RED-GREEN-REFACTOR only when all apply:
- The change has an observable behavioral contract.
- A deterministic automated test can exercise the owning layer.
- The focused test is expected to run quickly enough for repeated feedback.
- Watching the test fail would materially increase confidence in the implementation.
Use regression-first for a confirmed bug when one focused test can reproduce its failure mechanism.
Use proportional validation for exploratory, behavior-preserving, generated, documentation-only, configuration-heavy, primarily visual, or externally dependent work. Add tests after implementation only when they protect meaningful behavior.
Do not:
- create a test for every function, branch, or implementation detail;
- build a new test harness whose cost exceeds the changed risk;
- rewrite existing user code merely because it predates a test;
- manufacture a RED step when the behavior already exists;
- claim TDD when the new test was never observed failing for the intended reason.
Run a focused cycle
RED
- Write one minimal test for one independently observable behavior.
- Prefer real domain or application code. Mock only slow, nondeterministic, or external boundaries.
- Run the narrowest command that exercises the test.
- Confirm an assertion fails because the behavior is missing. Fix setup or fixture failures until the signal is meaningful.
- If the test passes, determine whether the behavior already exists. Adjust the scenario or stop; do not force a failure.
GREEN
- Implement the smallest coherent change that satisfies the contract.
- Run the same focused test.
- Fix production code when the contract is correct; change the test only when the asserted contract was wrong.
REFACTOR
Refactor only when it improves the changed design enough to justify another cycle. Keep the focused test green and do not expand scope under the label of cleanup.
Repeat once per observable behavior, not once per method or file.
Keep validation proportional
- Run the focused test during the loop; run broader checks once after behavior stabilizes.
- Stop strict cycling after two environment or harness failures unrelated to the behavior. Continue with the best proportional validation and report the blocker.
- Test rules at their owning layer: transport mapping at the boundary, business rules in domain/application code, persistence contracts against the real adapter or database when needed, and user interaction in frontend tests.
- Add negative authorization, tenant, idempotency, concurrency, or transition cases only when the changed risk requires them.
- Follow repository-specific commands and verification guidance instead of inventing a parallel test workflow.
Report evidence
Approach: strict TDD | regression-first | proportional validation
RED: [test and expected failure, or why RED was not valuable]
GREEN: [focused passing command]
Broader validation: [commands and results]
Remaining gap: [only a material unverified risk]Version history
-
3.0.0
GitHub ↗
Original release notes
# Codex skills 3.0.0 (2026-08-18) This release publishes a focused catalog of 20 maintained engineering, product, documentation, review, and operations skills for current Codex and GitHub usage. ## Highlights - Add nine reusable workflows for focused TDD, visual PR explanations, product-idea management, Polish and English UI copy, and architecture, backend, frontend, security/privacy, and test-coverage reviews ([#11](https://github.com/jMerta/codex-skills/pull/11)). - Modernize Git, GitHub Actions, debugging, documentation, release, regex, dependency, and VPS workflows ([#10](https://github.com/jMerta/codex-skills/pull/10)). - Rewrite every skill description around concrete user requests and invocation triggers. - Refresh commit and pull request templates with exact PR creation and visual-evidence guidance. - Add `agents/openai.yaml` discovery metadata to every published skill. - Strengthen catalog validation for skill names, frontmatter, referenced files, body size, UI metadata, malformed YAML keys, and exact skill-token prompts. - Reject stale `skills.json`, run CLI tests in CI, and refresh GitHub Actions to current major versions. ## Breaking changes - Remove `agents-md`, `coding-guidelines-gen`, `coding-guidelines-verify`, `create-cli`, `plan-work`, `sessions-to-blog`, `ui-ux-pro-max`, and `video-transcript-downloader` from the published catalog. - Existing local installations are not deleted automatically. The `init-ledger` CLI command remains available; only the `agents-md` skill is removed. - Require Node.js 18 or newer for the npm CLI. ## Security - Upgrade the CLI archive extractor from `tar` 6.2.1 to 7.5.22 after npm and OSV reported twelve path traversal, overwrite, parser, and denial-of-service advisories against the resolved version. - Prefer GitHub connector context with explicit fallbacks and mutation gates in GitHub-related workflows. - Add direct and transitive CVE/advisory auditing, dependency-path verification, patched-version selection, and time-bounded override guidance. - Add dependency release-age, lockfile, provenance, integrity, lifecycle-script, and dependency-review checks. - Detect the active VPS firewall and keep package refreshes, restarts, pruning, and configuration changes behind explicit approval. ## Upgrade notes - Review locally installed removed skills before deleting them; upgrading the catalog does not modify an existing skills directory. - Skill contributors must add valid `agents/openai.yaml` metadata and install PyYAML before running the local validator. ## Verification - `python scripts/build_skills_json.py --check` - `python -m unittest discover -s scripts -p "test_*.py"` - `python scripts/validate_skills.py` - `python scripts/check_invisible_chars.py --all` - `npm ci --ignore-scripts --prefix cli` - `npm audit --omit=dev --prefix cli` - `npm test --prefix cli`
-
2.0.0
GitHub ↗
Original release notes
# Codex skills 2.0.0 (2026-02-06) ## Highlights - Standardize skill installs to the new `.agents/skills` catalog (`~/.agents/skills` by default, or `--dir .agents/skills` for repo-local installs). - Simplify the CLI: remove multi-agent installs and replace `--agent` with `--dir`. - Update the skill catalog: add `ui-ux-pro-max`; remove `frontend-design`, `brave-search`, and `oracle`. ## Breaking changes - CLI: removed `--agent` / multi-agent install targets. Use `--dir <dir>` instead. - CLI: default install dir changed from `~/.codex/skills/` to `~/.agents/skills/`. - Skills removed from the catalog: `frontend-design`, `brave-search`, `oracle`. ## Upgrade notes - If you previously installed skills into `~/.codex/skills/`, reinstall into the new default: - `npx codex-skills install-all` - To install into a repo (portable), use: - `npx codex-skills install-all --dir .agents/skills` - If you added scripts to PATH, update it to the new location: - macOS/Linux: `export PATH="$PATH:$HOME/.agents/skills/agent-scripts"` - Windows (PowerShell): add `$HOME\\.agents\\skills\\agent-scripts` to PATH ## Deprecations - None. ## Features - Skills: add `ui-ux-pro-max`. - CLI: add `--dir <dir>` and make installs more robust on Windows (retry deletes for transient file locks). ## Fixes - `python3 scripts/validate_skills.py` no longer requires `PyYAML`. ## Performance - None. ## Security - None. ## Dependencies - None. ## Operations / infrastructure - None. ## Database / migrations - None. ## Known issues - None. ## Verification - `python3 scripts/build_skills_json.py` - `python3 scripts/validate_skills.py` - `npm test` (cli) ## Risk / notes - Users must reinstall skills if they relied on the legacy `~/.codex/skills/` location or the removed skills.
-
1.6.0
GitHub ↗
Original release notes
# Codex skills 1.6.0 (2026-01-02) ## Highlights - Add new skills sourced from agent-scripts: brave-search, create-cli, frontend-design, oracle, and video-transcript-downloader. - Add a CLI command to install shared agent-scripts. - Document Brave Search API key setup in the README. ## Breaking changes - None. ## Upgrade notes - Optional: run `npx codex-skills install-agent-scripts` to install shared scripts alongside skills. ## Deprecations - None. ## Features - CLI: add `install-agent-scripts` to install shared scripts. - Skills: add brave-search, create-cli, frontend-design, oracle, and video-transcript-downloader. - Docs: add Brave Search API key setup instructions. ## Fixes - None. ## Performance - None. ## Security - None. ## Dependencies - None. ## Operations / infrastructure - None. ## Database / migrations - None. ## Known issues - None. ## Verification - `python scripts/build_skills_json.py` - `npm test` (cli) ## Risk / notes - No migrations or config changes required.
-
1.5.0
GitHub ↗
Original release notes
# Codex skills 1.5.0 (2025-12-23) ## Highlights - Add a global AGENTS.MD ledger template and CLI init-ledger command to generate it. - Introduce a new verify command plus a richer CLI test suite for local installs. - Add new skills: branch-cleaner, regex-builder, and rebase-assistant. ## Breaking changes - None. ## Upgrade notes - Optional: run `npx codex-skills init-ledger` to create the global ledger at `~/.codex/AGENTS.MD`. - Optional: use `npx codex-skills verify <skill-name>` to validate local skill installs. ## Deprecations - None. ## Features - CLI: add init-ledger for the global AGENTS.MD template. - CLI: add verify for local skill validation and add test coverage for CLI flows. - Skills: add branch-cleaner, regex-builder, and rebase-assistant. - Docs: highlight install-all and document the global ledger workflow. ## Fixes - Pages: ensure the release workflow dispatches the pages deploy. ## Performance - None. ## Security - None. ## Dependencies - None. ## Operations / infrastructure - Add a release workflow dispatch for pages builds. ## Database / migrations - None. ## Known issues - None. ## Verification - `npm test` ## Risk / notes - No migrations or config changes required.
-
1.4.0
GitHub ↗
Original release notes
# codex-skills 1.4.0 (2025-12-19) ## Highlights - Added `install-all` to install every skill in the catalog with one command. ## Breaking changes - None. ## Upgrade notes - None. ## Deprecations - None. ## Features - New `install-all` / `install-everything` CLI command for bulk installs. ## Fixes - None. ## Performance - None. ## Security - None. ## Dependencies - None. ## Operations / infrastructure - None. ## Database / migrations - None. ## Known issues - None. ## Verification - `python scripts/validate_skills.py` - `node cli/bin/codex-skills.js --help` ## Risk / notes - None.
Only the five most recent versions are shown. View full version history at the source ↗
Current listing version
0.0.1
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供聚焦式TDD方法论,有效降低确定性业务规则实现风险
- 区分strict TDD、regression-first和proportional validation三种策略,适配不同场景
Highlights
- description清晰定义适用场景,包括测试优先开发和回归测试前置
Highlights
- 文档结构完整,包含工作流程选择、RED-GREEN-REFACTOR循环和证据报告模板
- 步骤划分清晰,有明确出口条件和端到端示例
Areas to improve
-
description写错位置 Reported severity: Minor
description内容位于skill_body内部而非顶层frontmatter
Recommendation: 将description移至顶层frontmatter,确保符合平台规范
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.