/code-quality:tdd-workflowfrom code-quality
Guides the red-green-refactor TDD cycle with test naming conventions, Arrange-Act-Act structure, and isolation rules. Useful when writing features or bug fixes test-first.
Ships in code-quality. 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.
None: SKILL.md is the whole skill.
RED → GREEN → REFACTOR
↑__________________|
should_[expected behavior]_when_[condition]
Examples:
should_return_empty_array_when_no_itemsshould_throw_error_when_invalid_inputshould_calculate_total_when_items_presentit('should calculate discount when coupon applied', () => {
// Arrange - Set up test data
const cart = new Cart();
cart.addItem({ price: 100 });
const coupon = new Coupon('10OFF', 10);
// Act - Execute the behavior
cart.applyCoupon(coupon);
// Assert - Verify the result
expect(cart.total).toBe(90);
});
beforeEach for common setupafterEachStep 1: RED
describe('Cart', () => {
it('should add item to cart', () => {
const cart = new Cart();
cart.addItem({ id: 1, name: 'Book', price: 29.99 });
expect(cart.items).toHaveLength(1);
});
});
Run test → FAILS (Cart doesn't exist)
Step 2: GREEN
class Cart {
items = [];
addItem(item) {
this.items.push(item);
}
}
Run test → PASSES
Step 3: REFACTOR
class Cart {
private _items: CartItem[] = [];
get items(): ReadonlyArray<CartItem> {
return this._items;
}
addItem(item: CartItem): void {
this._items.push(item);
}
}
Run test → Still PASSES
Repeat the cycle for each new behavior.
| Type | Purpose | Example |
|---|---|---|
| Stub | Return fixed data | jest.fn().mockReturnValue(42) |
| Mock | Verify interactions | expect(mock).toHaveBeenCalled() |
| Spy | Track calls | jest.spyOn(obj, 'method') |
| Fake | Simplified implementation | In-memory database |
What SKILL.md sets; muted values are Claude Code's defaults
lownpx claudepluginhub florianbruniaux/claude-code-plugins --plugin code-quality18 skills in this plugin
/ast-grep-patternsStructural code search and refactoring with ast-grep: choose it over Grep, then write tested pattern and YAML rule recipes. Use when renaming calls or changing an API signature across a large codebase, migrating a framework, or finding code by shape (async functions without try/catch, empty catch blocks, long parameter lists). Not for plain text searches, which Grep handles faster./audit-codebaseCodebase health audit scoring 7 categories with progression plan/check-cache-bugsAudit Claude Code setup for cache bugs (CC#40524): sentinel, --resume/--continue, attribution header + ArkNill B3/B4/B5/design-patternsDetect, suggest, and evaluate GoF design patterns in TypeScript/JavaScript codebases. Use when refactoring code, applying singleton/factory/observer/strategy patterns, reviewing pattern quality, or finding stack-native alternatives for React, Angular, NestJS, and Vue./diagnoseInteractive troubleshooting assistant for Claude Code issues/eval-skillsAudit a project or library of skills for metadata, trigger boundaries, workflow completion criteria, local resource closure, instruction economy, tool scope, effort, and routing evidence. Use before shipping skills, after importing a skill collection, or when a skill triggers too often or not at all.Other plugins' skills for the same job