Agent Skillslevy-street/world-of-claudecraft › woc-extract-and-test

woc-extract-and-test

GitHub

用于实现功能、修复缺陷或重构代码。遵循模块优先和测试驱动原则,通过最小化模块边界确保行为正确性。包含加载上下文、选择工作流(Bug修复或新功能)及验证步骤,强调架构规范与数据库性能检查。

.agents/skills/woc-extract-and-test/SKILL.md levy-street/world-of-claudecraft

触发场景

添加新功能行为 修复现有缺陷 从大文件中提取逻辑 在现有架构接缝后移动代码 涉及数据库变更的重构

安装

npx skills add levy-street/world-of-claudecraft --skill woc-extract-and-test -g -y
更多选项

非标准路径

npx skills add https://github.com/levy-street/world-of-claudecraft/tree/main/.agents/skills/woc-extract-and-test -g -y

不安装直接使用

npx skills use levy-street/world-of-claudecraft@woc-extract-and-test

指定 Agent (Claude Code)

npx skills add levy-street/world-of-claudecraft --skill woc-extract-and-test -a claude-code -g -y

安装 repo 全部 skill

npx skills add levy-street/world-of-claudecraft --all -g -y

预览 repo 内 skill

npx skills add levy-street/world-of-claudecraft --list

SKILL.md

Frontmatter
{
    "name": "woc-extract-and-test",
    "description": "Implement World of ClaudeCraft features, bug fixes, and focused refactors using module-first design and behavior-driven tests. Use when adding behavior, fixing a defect, extracting logic from a large file, or moving code behind an existing architectural seam."
}

Extract and Test

Implement the requested behavior with the smallest clean module boundary and direct regression coverage.

Load context

  1. Read the root CLAUDE.md in full.
  2. Read the relevant local CLAUDE.md before opening or editing that area.
  3. Run git status --short and preserve unrelated work.
  4. Inspect the production path, its callers, and nearby tests before choosing a seam.

Apply canonical architecture rules to the concrete change without copying them here.

Before implementing database-backed behavior, invoke woc_database_performance for a read-only checkpoint when the change can affect SQL or query call sites, schema or indexes, query frequency or cardinality, pool configuration, lock scope, timeout policy, or stored-data growth, including database driver/dependency upgrades and PostgreSQL engine/resource/configuration/topology changes. Carry its concrete bounds and evidence requirements into the test-first contract.

Choose the workflow

For a bug fix:

  1. Reproduce the defect through the real production path.
  2. Add a focused test that fails for the intended reason.
  3. Confirm the test is red before changing production code.
  4. Make the smallest coherent fix.
  5. Add nearby edge cases only when they protect the same contract.

For a feature or refactor:

  1. Identify the existing module, coordinator, state owner, or extension seam.
  2. Place behavior in a pure sibling module, current state owner, or thin adapter.
  3. Separate pure decisions from I/O, rendering, global state, and transport.
  4. Give the extracted unit direct tests and keep consumers thin.
  5. When relocating behavior, preserve semantics before redesigning anything.

Do not grow a monolith when a tested sibling is appropriate, introduce a framework for one call site, bypass existing seams to reach private state, or build parallel versions of the same rule. Preserve determinism, parity, localization, and persistence contracts. Do not commit unless explicitly asked.

Validate

Run focused tests while iterating, then:

npm run ci:changed
npx tsc --noEmit

Run domain guards for architecture, localization, persistence, parity, or security when applicable. Re-run woc_database_performance on the finished diff when its database triggers match. Before declaring the implementation ready, run npm run gate.

Report the selected seam, behavior covered, commands run, and remaining manual checks.

版本历史

  • 2edc3ac 当前 2026-07-19 18:52

同 Skill 集合

.agents/skills/woc-codex-audit/SKILL.md
.agents/skills/woc-feature-plan/SKILL.md
.agents/skills/woc-file-issue/SKILL.md
.agents/skills/woc-qa/SKILL.md
.agents/skills/woc-release-malware-audit/SKILL.md
.agents/skills/woc-release-merge-audit/SKILL.md
.agents/skills/woc-review-pr/SKILL.md
.claude/skills/feature-plan/SKILL.md
.claude/skills/file-issue/SKILL.md
.claude/skills/pr-screenshots/SKILL.md
.claude/skills/qa/SKILL.md
.claude/skills/extract-and-test/SKILL.md
.claude/skills/i18n-locale-fill/SKILL.md
.claude/skills/release-malware-audit/SKILL.md
.claude/skills/review-pr/SKILL.md

元信息

文件数
0
版本
8950e61
Hash
c7a4c1b3
收录时间
2026-07-19 18:52

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-30 18:58
浙ICP备14020137号-1 $访客地图$