skills/code-smells/dispensables/SKILL.md
Detect and remove Dispensables — pointless and unneeded code elements. Trigger: When identifying Comments as deodorant, Duplicate Code, Lazy Class, Data Class, Dead Code, or Speculative Generality.
npx skillsauth add johnnystefan/test-saas-business code-smells/dispensablesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill enables the agent to identify and remove "Dispensables" — pointless and unneeded code elements whose absence makes the codebase cleaner, more efficient, and easier to understand.
// BAD: Comment explaining a complex expression
// Check to see if the employee is eligible for full benefits
if (employee.flags & HOURLY_FLAG && employee.age > 65) {
/* ... */
}
// GOOD: Refactored using Extract Variable
const isEligibleForFullBenefits =
employee.flags & HOURLY_FLAG && employee.age > 65;
if (isEligibleForFullBenefits) {
/* ... */
}
// BAD: A Data Class with no behavior
class Rectangle {
constructor(
public width: number,
public height: number,
) {}
}
const rect = new Rectangle(10, 20);
const area = rect.width * rect.height; // Client does the work
// GOOD: Behavior moved into the class
class Rectangle {
constructor(
private width: number,
private height: number,
) {}
getArea(): number {
return this.width * this.height;
}
}
tools
Zustand 5 state management patterns. Trigger: When implementing client-side state with Zustand (stores, selectors, persist middleware, slices).
databases
Zod 4 schema validation patterns. Trigger: When creating or updating Zod v4 schemas for validation/parsing (forms, request payloads, adapters), including v3 -> v4 migration patterns.
development
Vitest unit testing patterns with React Testing Library. Trigger: When writing unit tests for React components, hooks, or utilities.
tools
Vite 8 (Rolldown-powered) build tool configuration, plugin API, SSR, and migration guide. Trigger: When working with vite.config.ts, Vite plugins, building libraries, or SSR apps with Vite.