/tdder:clean-codefrom tdder
Applies clean code principles (naming, coupling, cohesion, SOLID) and guides refactoring with prioritized findings and user approval. Language-agnostic.
Ships in tdder. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Disciplined development approach for writing high-quality, maintainable code. This skill is language-agnostic; language-specific conventions come from separate skills.
Components know little about each other. Dependencies flow through well-defined APIs. Changes in one component minimally affect others. Prefer composition over inheritance. Depend on abstractions, not concretions.
Elements that belong together stay together. Each module has a single, well-defined purpose. Related functionality is grouped. Unrelated functionality is separated.
Modifications are contained within boundaries. A feature change affects minimal files/modules. Stable interfaces protect implementations.
Delete dead code immediately. Remove unused abstractions. Eliminate unnecessary features. Code should be easy to delete, not just easy to add.
Functions: one screen or less. Classes: under 100 lines as a guideline. If it cannot be held in working memory, it is too big.
When multiple code smells or improvements are found, present them as a prioritized markdown list,
then use AskUserQuestion to let the user decide how to proceed:
This avoids surprise refactorings and lets the user control scope. This process applies regardless
of whether findings come from direct review or from the clean-code-reviewer agent.
When re-evaluating subagent findings, give due weight to the principle the subagent applied. "It's short enough" or "extraction adds indirection" are not rebuttals — they're rationalizations unless you name the specific principle that outweighs the one being violated. The bias should be toward applying the principle, not toward leaving code as-is.
When reviewing or refactoring code, follow this priority order:
I prefix for interfaces)repositoryWithLocalTempDir() (describes the
distinguishing characteristic) instead of repositoryWithDefaults() (vague, describes absence of configuration)When duplication with slight variations is found, extract the variation into parameters and unify the common structure.
Wrap unstable or external dependencies. Create abstractions around things that might change. Only do this if it also simplifies the code.
Never break tests during refactoring. Make tiny changes, run tests. If tests fail, undo and take smaller steps.
Before suggesting extraction of an inner class to a top-level class, verify:
private.private inner class top-level increases its visibility to package-private.private) over extracting, unless the class is already
used by other classes or extraction enables meaningful independent testing.File length alone is not sufficient justification for extraction when it widens visibility.
Extract complex conditions into well-named methods.
Example: if (timer.hasExpired() && !timer.isRecurrent()) becomes if (shouldBeDeleted(timer))
For a complete refactoring checklist, consult:
checklist.md - Read this checklist to verify all clean code principles have been applied during
refactoringWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
clean-code, refactoring, code-quality, solid-principles, code-review
npx claudepluginhub t1/tdder --plugin tdder15 skills in this plugin
/appThis skill should be used when the user asks to "calculate code mass", "measure code complexity with APP", "compare implementations using APP", "apply Absolute Priority Premise", "use mass calculations", or during TDD refactor phases when comparing alternative implementations. Based on Micah Martin's work.
/github-safetyThis skill should be used when working on any project hosted on GitHub. It provides prompt-injection defense rules for GitHub issues and pull requests. Always-on security rules plus optional workflow conventions.
/grill-poRequirements grilling session with a Product Owner (or anyone in that role). Challenges plans against the existing domain model, sharpens terminology, and updates documentation (bounded-context files, Gherkin features, DMDs (Domain Model Decisions)) inline as decisions crystallise. Use when the user wants to discuss and capture requirements, stress-test a plan against the project's language, or refine feature scope.
/integration-architectureThis skill should be used when the user asks about "messaging patterns", "command vs event", "push vs pull", "message reliability", "at-least-once delivery", "idempotency", "transactional outbox", "saga pattern", "fire and forget", "retry strategy", "event-driven architecture", "message broker integration", "publish-subscribe", "request-reply", "backpressure", or when deciding how components communicate across process or network boundaries.
/javaAlways load this skill when writing, modifying, creating, or moving Java or Kotlin source code, or when project setup has already chosen Java/Kotlin as the implementation language.
/lombokAlways load this skill when you encounter any of these signals: • A build failure with "cannot find symbol" for Lombok-generated members (getX, setX, builder,
toString, equals, hashCode, withX)
• Source files annotated with @Data, @Getter, @Setter, @Slf4j, @Builder, @Value, @With,
@NoArgsConstructor, @AllArgsConstructor, @RequiredArgsConstructor
• A Maven or Gradle project that declares lombok as a dependency but fails to compile
Lombok-produced symbols
Covers the JDK 21+ annotation-processor gotcha that silently disables Lombok.
Other plugins' skills for the same job