Command Palette

Search for a command to run...

Назад к скиллам
скилл № 91275

code-quality

TaskPlanner's code standard and its quality pass. The standard - simplicity first (smallest correct change, replace don't accumulate), the A1-A9 code rules…

БесплатноБез исполняемых скриптов
smekaiот smekai★ 26 звёзд на GitHub

Установить code-quality в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

TaskPlanner code standard and quality pass

One standard, used two ways:

  • Writing or reviewing code and tests: follow Part 1 and Part 2. Every change should trace to a rule there.
  • A quality pass (before a release, a tech-debt review): Part 3 measures the code against Parts 1 and 2, ranks the findings and fixes the accepted ones.

The rule ids (A1–A9) and the testing rules come from the Isotopy standard and keep their numbers, so a finding reads the same in both repositories.

Part 1 — The code standard

Each rule says what it means here and where to look.

Simplicity first

These two govern every other rule, in analysis and in fixes:

  • Smallest correct change. Solve exactly what the finding needs and bring the code you touch up to the standard. No repo-wide rewrite, no speculative abstraction, no option nobody asked for. A rule that would need a framework to satisfy is a finding to report, not a framework to build.
  • Replace, don't accumulate. A new approach deletes the old one in the same change: its code, its tests and its docs. A new ?? old fallback, an adapter between two models, or an A | B parameter with a cast is the alarm that two things should have been one. Before calling a change done, look at its net line count: a capability may add lines, a replacement that adds lines means the old thing is still there.
  • A replacement keeps what the old code accepted. Before swapping a local parser, check or helper for a shared one, put real inputs the old one took through both. If the new one accepts less (a timestamp form, a casing, an empty value), that is a behaviour change: widen the shared one or keep the case, never drop it silently.

A1 — Comments are a smell

A function that needs a comment is badly named or badly factored: rename or extract first. Source files carry almost no comments (npm run lint already fails on them outside tests). The survivors are WHY: lines, and a WHY: must point at intricate local logic right at the line (a regex, a platform quirk, cron's day-field rule). A design rationale is not a WHY: — it goes to A8. Tests may explain themselves freely. The detailed keep/remove list is the comment-hygiene skill.

A2 — SOLID; depend on interfaces

One reason to change per module. Receive a dependency rather than importing a concretion where a seam exists: TaskStore receives ConfigManager and FileStore — copy that shape. A module doing two jobs is split along the axis that changes independently. No barrel files beyond the public entry src/core/index.ts; callers import the file they need.

A3 — Fat domain, thin edges

src/core/ is the domain; the harnesses (mcp/, views/*) are edges.

  • Pure core: model/, parser/, util/, filter/, view/, ai/ — no I/O.
  • I/O core: store/, config/ — reading and writing files, nothing else to decide.
  • Edges map, they don't decide. An MCP tool handler, a webview message handler or a mod hook turns input into a core call and a result into output. A rule about tasks (which state a new task goes to, when a task is due, what a valid schedule is) in a harness is a finding: it belongs in core, where every harness gets it and a test can reach it.
  • Moving a rule into core gathers every condition first. List what each harness checked and which task fields bear on the rule (state, waiting date, schedule), and make the core rule the union. A condition one edge applied and the others forgot is the bug the move exists to fix, not one to carry along.
  • A new core constraint reaches every edge's UI. When core starts refusing an input (Recurring without a schedule), find each form, menu and command that offers it and stop offering it there, so the user never picks a choice that only errors.

Placement test: does the file name a TaskPlanner concept (task, state, board, run)? If it would make as much sense in another product, it is a util.

A4 — Long-running work is a workflow

Not applicable today: TaskPlanner has no long-running work. Recurring tasks are deliberately not this — an external scheduler runs them and records the result through taskplanner_record_run. If a change starts to run, wait for or retry work inside TaskPlanner, stop and raise it.

A5 — Classes where there is state or a lifecycle

Free functions threading the same mutable state want to be a class that owns it (TaskStore, ConfigManager). A class with no state is a namespace and should be functions.

A6 — Name the shapes

Inline object literals that carry structure get a name: a message payload, an options bag, a config blob, a style block in a webview. A literal repeated twice exists once, named — this includes state names ('Done', 'Recurring', …) and file names ('RECURRING.md').

A7 — Lean on the types

  • Discriminated unions over stringly-typed state; exhaustive switch closed with a never assertion.
  • No as that papers over a real gap, no as unknown as in lo
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл code-quality?

TaskPlanner's code standard and its quality pass. The standard - simplicity first (smallest correct change, replace don't accumulate), the A1-A9 code rules (comments as a smell, SOLID, fat domain and thin edges, named shapes, strict types, evidence in Markdown) and the AAAAA testing rules - applies whenever code or tests are written, refactored or reviewed in this repository. The pass measures the code against it, ranks findings and fixes them in small behaviour-preserving steps; use it before a release, for a tech-debt review, or when asked to analyse, clean up or improve the code.

Как установить скилл code-quality?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл code-quality запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить code-quality с