From dev
Use when refactoring code or preparing structural changes — /dev:tidy, "tidy first", "구조 정리", "리팩토링", or any request to separate structural changes from behavioral changes following Kent Beck's Tidy First principles.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dev:tidyThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Follow Kent Beck's "Tidy First" approach by strictly separating structural changes from behavioral changes. Structural change is **ONLY about changing the shape of the code**; the execution result (behavior) must remain 100% identical.
Follow Kent Beck's "Tidy First" approach by strictly separating structural changes from behavioral changes. Structural change is ONLY about changing the shape of the code; the execution result (behavior) must remain 100% identical.
You are operating in a highly restricted sandbox. Do not deviate from these rules.
CLAUDE.md or project README > build tool auto-detect > ASK the user.AI is strictly prohibited from doing the following during a structural change:
if, switch).Separate Atomic Step Required (NOT bundled with other refactoring):
private → public, etc.) — breaks encapsulation, may affect callers. Must be its own atomic step with explicit justification.(Note: Formatting, import sorting, and comment cleanup are allowed in the STRUCTURAL phase and may be batched together, scoped to the files being refactored in the current step only. Do NOT batch formatting across unrelated files.)
1. No Test Baseline Policy
[NO TEST BASELINE].2. Last Green State Rollback Rule (Phase Violation)
git reset --hard HEAD && git clean -fdgit reset --hard <last-known-green-commit> && git clean -fd — identify the exact commit hash where tests last passed.git checkout -- . && git clean -fdgit stash — a clean reset to Last Green State is required.git clean -fd removes ALL untracked files. If the user may have other untracked work in progress, ASK before executing.[PHASE: BEHAVIORAL] if behavior modification is required.3. Strict Atomic Change Rule
4. Test Coverage Awareness
5. Refactoring Scope Boundary
CLAUDE.md, CONTRIBUTING.md), follow the project convention.engineering-guidelines, follow that convention.♻️ refactor: [Pattern Name] Description or 🧹 tidy: Description✨ feat: Description or 🐛 fix: DescriptionYou must follow this exact output structure for EVERY structural change. Determine the appropriate <TEST_COMMAND> for the project. If uncertain, ASK.
Required Output Structure:
CalculateTax()").<TEST_COMMAND> (PASS/FAIL)<TEST_COMMAND> (PASS/FAIL)(Repeat this loop, committing each atomic change, until the structure is ready.)
Before declaring [PHASE: BEHAVIORAL], explicitly confirm the following checklist. If any answer is NO, return to the STRUCTURAL phase. If uncertain about ANY item, ASK the user — do NOT self-approve.
[PHASE: STRUCTURAL]
1. Intent: The `CalculateTotal` function mixes tax calculation and total aggregation.
2. Change: [Pattern: Extract Method] Extracting tax multiplication into a new `CalculateTax` function.
3. Verification:
- Before: `./gradlew test` (PASS)
- After: `./gradlew test` (PASS)
- Confirmation: Tests passed. No behavioral change detected. State is Green.
[PRE-BEHAVIORAL GATE]
- [x] Single Responsibility: CalculateTax separated from CalculateTotal ✅
- [x] Function size: both ≤30 lines ✅
- [x] No duplication in target area ✅
- [x] Naming: domain terms used (Tax, Total) ✅
- [x] Structure ready for discount feature extension ✅
→ Gate PASSED. Proceeding to [PHASE: BEHAVIORAL].
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub ppzxc/engineering-guidelines --plugin dev