tdd-tidy

tdd-tidy is a skill for Claude Code from msbaek/msbaek-claude-plugins. It costs 114 tokens per session (1,147 once invoked), scanned A, original, MIT.

A guided method for tidying code through small, independent refactoring steps, with stated goals, limits, rules, and output requirements.

In plain words
What is it for?
Use it when improving existing code without changing its behavior, especially when you need a disciplined refactoring process.
Why use it?
It gives code cleanup a clear structure and keeps each change focused and reviewable.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is Local Tidying Process(단계·순서는 `../../agents/references/tidying-process.md` 정본)를 순서대로 적용하고,.

Part of the msbaek-tdd plugin — 28 skills, 10 agents, 2 hooks shipped together

Good fit Use it when improving existing code without changing its behavior, especially when you need a disciplined refactoring process.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/msbaek/msbaek-claude-plugins
agentmods
npx agentmods add skills/msbaek/msbaek-claude-plugins/tdd-tidy

Made for: Claude Code.

Or install msbaek-tdd, the plugin that ships this one along with the rest of its 28 skills, 10 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tdd-tidy

README.md
[![agentmods](https://agentmods.dev/badge/skills/msbaek/msbaek-claude-plugins/tdd-tidy/github.svg)](https://agentmods.dev/skills/msbaek/msbaek-claude-plugins/tdd-tidy)
Your own site
<a href="https://agentmods.dev/skills/msbaek/msbaek-claude-plugins/tdd-tidy"><img src="https://agentmods.dev/badge/skills/msbaek/msbaek-claude-plugins/tdd-tidy/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tdd-tidy

Your own site · 80×15
<a href="https://agentmods.dev/skills/msbaek/msbaek-claude-plugins/tdd-tidy"><img src="https://agentmods.dev/badge/skills/msbaek/msbaek-claude-plugins/tdd-tidy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,147 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00114 $0.01147
Opus 5.5 $0.00046 $0.00459
Sonnet 5.5 $0.00023 $0.00229
Haiku 4.5 $0.00011 $0.00115

Measured 2mo ago against content hash e92bd566cfa2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tdd-tidy 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 2mo 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.

msbaek-tdd/skills/tdd-tidy/SKILL.md · 103 lines

How it starts

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

Tidying Skill — Composed Method 지향 독립 리팩토링

git diff로 최근 변경된 Java 파일을 자동 탐지하여, tdd-blue agent의 Local Tidying Process를 TDD 사이클 없이 독립 실행합니다.

GOAL

  • 성공 = 변경된 파일의 코드 냄새가 안전하게 제거되고, 모든 테스트가 통과하며, refactor: 커밋 완료됨
  • git diff 기준으로 대상 파일이 정확히 식별됨
  • Local Tidying Process가 적용됨 (단계·순서는 ../../agents/references/tidying-process.md 정본)
  • 모든 기존 테스트가 통과함
  • 하나의 refactor: 커밋으로 완료됨 (변경이 있는 경우)

CONSTRAINTS

Hard Rules

  • 동작 변경 금지 — 구조 개선만 수행
  • 테스트 수정 금지 — 구조 변경이 테스트를 실패시키면 되돌리기
  • 80% 규칙 — 지금 할 수 있는 수준에서 80% 이하로 리팩토링
  • git add -A 금지 — 변경된 파일만 명시적으로 추가

OUTPUT FORMAT

실행 절차

1. 대상 파일 수집

인자가 전달된 경우 해당 commit ref와 비교, 없으면 unstaged + staged 변경 파일 수집:

# 인자 없음: unstaged + staged 변경 파일
git diff --name-only -- '*.java'
git diff --cached --name-only -- '*.java'

# 인자 있음: 특정 commit과 비교
git diff --name-only <commit-ref> -- '*.java'
  • 테스트 파일(*Test.java, *Tests.java, *Spec.java)은 제외
  • 변경 파일이 없으면: "tidying 대상 Java 파일이 없습니다." 안내 후 종료
2. 대상 파일 확인

수집된 파일 목록을 사용자에게 보여주고 확인:

다음 파일에 Tidying Process를 적용합니다:
- src/main/java/com/example/OrderService.java
- src/main/java/com/example/PaymentProcessor.java

진행할까요?
3. tdd-blue agent 호출

사용자 확인 후 tdd-blue agent를 standalone 모드로 호출:

[standalone] 다음 파일에 Local Tidying Process를 적용해주세요:
- src/main/java/com/example/OrderService.java
- src/main/java/com/example/PaymentProcessor.java

Local Tidying Process(단계·순서는 `../../agents/references/tidying-process.md` 정본)를 순서대로 적용하고,
One Pile 적용 시에는 항상 별도 커밋(refactor: one-pile [대상])으로 먼저 분리하고, 나머지 tidying은 별도 refactor: 커밋으로 완료해주세요.
Extract Method는 같은 클래스 내부(private 메서드 추출)로 한정한다. 다른 클래스로 옮기는 Domain Logic 이동(새 클래스가 생기는 분리 포함)은 수행하지 않는다 (system-wide-refactoring 스킬 전담).
4. 결과 보고

tdd-blue agent 완료 후 사용자에게 결과 보고:

  • 적용된 tidying 단계
  • 변경된 파일과 주요 개선 사항
  • 커밋 해시 (변경이 있는 경우)

tidying 과정에서 발견된 징후에 따라 선택 기법 제안:

추가로 적용 가능한 기법이 발견되었습니다:
[발견 시에만 해당 항목 표시]
- /decompose-conditional — [파일명]의 if/then/else가 복잡합니다
- /replace-temp-with-query — [파일명]에서 임시 변수가 반복 계산됩니다
- /explicit-parameters — [파일명]에서 암묵적 필드 의존이 발견되었습니다
- /naming-process — 의도가 불분명한 이름이 [N]건 있습니다
- /intent-revealing-names — [파일명]에 긴 메서드가 남아 이름 주도 관통 리팩토링(grouping→comment→extract→6단계 rename)이 필요합니다
- /encapsulate-collection — [파일명]에서 컬렉션이 직접 노출됩니다
- /consolidate-conditional — [파일명]에서 동일 결과 조건문이 분산됩니다
- /introduce-assertion — [파일명]에서 암묵적 가정이 발견되었습니다
- /replace-loop-with-pipeline — [파일명]에서 명령형 루프를 Stream으로 변환 가능합니다
적용할 기법을 선택하세요 (slash command 또는 skip)

Read the full file on GitHub · 103 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. 2mo ago Changed · +70 tokens per session e92bd566cfa2
  2. 2mo ago Changed 10ec6bab5bbb
  3. 3mo ago First seen · 103 lines · 44 tokens per session scan A fae314eaea84

Subscribe to this mod's changes

tdd-tidy is a skill published in the GitHub repository msbaek/msbaek-claude-plugins (8 stars, last pushed 1mo ago), licensed MIT. It adds 114 tokens to every session and 1,147 once invoked, about $0.0005 per session on Opus 5.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-31.

Related

tdd-tidy compared with skills from other repositories

tdd-tidy next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tdd-tidymsbaek/msbaek-claude-pluginsSkill81mo agoMITA114Claude Code
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill82ktodayMITA200Claude Code, Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill102ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill396ktodayMITA36Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill15ktodayCC0-1.0A113Claude Code, Codex
systematic-debuggingobra/superpowersSkill333k7d agoMITA21Claude Code