/dd-skills:readable-codefrom DD Skills
Enforces readable-code rules from The Art of Readable Code: short functions, flat control flow, clear naming, and language idioms for TS/JS, React, Node, and Python.
Ships in DD Skills. 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.
Apply these rules when writing, reviewing, or refactoring code. Inspired by The Art of Readable Code by Dustin Boswell and Trevor Foucher.
Core principle: Code should be easy to understand. The time it takes someone else (or future you) to understand the code is the ultimate metric.
if inside a loop inside an if, extract the inner block into a helper
function with a descriptive name.continue or break to skip iterations rather than wrapping the body
in a conditional.// Bad: nested and hard to follow
for (const user of users) {
if (user.isActive) {
for (const order of user.orders) {
if (order.isPending) {
process(order);
}
}
}
}
// Good: flat, each function name explains what it does
const activeUsers = getActiveUsers(users);
for (const user of activeUsers) {
processPendingOrders(user.orders);
}
fetchPage
not get, retryCount not n.tmp, data, result, val, info, handle
— unless the scope is tiny (2-3 lines).maxItems not limit. If a boolean, use is, has, should, can
prefixes.num,
max, min, err, id, url are fine; svcMgrCfg is not).camelCase in TS/JS, snake_case
in Python) and the codebase's naming patterns.if (length > 10) not if (10 < length).if/else blocks: positive case first, simpler case first, or the
more interesting case first.if/else. Never nest ternaries.// Bad
if (!(age >= 18 && hasId && !isBanned)) {
deny();
}
// Good
const isEligible = age >= 18 && hasId && !isBanned;
if (!isEligible) {
deny();
}
if (retries > MAX_RETRIES) not if (retries > 3).render(user, true, false) can't be read without
opening the definition.// TODO:, // HACK:, // XXX: with
explanation.// Bad: Prettier wraps this into a tall chain in the middle of the handler
const users = await db
.selectFrom("users")
.where("active", "=", true)
.leftJoin("orders", "orders.userId", "users.id")
.orderBy("users.createdAt", "desc")
.limit(pageSize)
.execute();
// Good: extract a helper so the call site stays clean
function getActiveUsers(db: Database, pageSize: number) {
return db
.selectFrom("users")
.where("active", "=", true)
.leftJoin("orders", "orders.userId", "users.id")
.orderBy("users.createdAt", "desc")
.limit(pageSize)
.execute();
}
const users = await getActiveUsers(db, 20);
// Bad: inline lookup chain — Prettier expands it to 5+ lines
const config = Object.fromEntries(
requiredKeys.map((key) => [key, settings[key] ?? defaults[key] ?? fallbacks[key]]),
);
// Good: extract the lookup
const resolveSetting = (key: string) => settings[key] ?? defaults[key] ?? fallbacks[key];
const entries = requiredKeys.map((key) => [key, resolveSetting(key)]);
const config = Object.fromEntries(entries);
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub denysdovhan/skills --plugin dd-skills4 skills in this plugin
/agent-logUse this skill to maintain an agent log in .agents/log, a decision journal shared by the developer and agents. Trigger when the user explicitly asks to use agent-log or record/update an agent log entry; when planning, implementing, or finalizing a significant feature in a repo with an existing .agents/log; or before non-trivial changes or questions in areas covered by existing entries. Never initialize .agents/log unless the user explicitly asks for an agent log./commitUse this skill when an agent needs to prepare a focused commit, follow repository commit-message conventions, write a clear commit message, and create the git commit cleanly./interactive-debuggingUse this skill when debugging runtime behavior requires live data from the running app, temporary instrumentation, or hypothesis verification through logs. Trigger for async timeouts, stale or incorrect state updates, race conditions, event ordering bugs, intermittent failures, browser/client behavior that static inspection cannot explain, or any issue where the agent should create a local debug HTTP server, insert temporary probes, ask the user to reproduce, inspect .debug/debug.log, then remove all debug instrumentation and assets.Other plugins' skills for the same job