skimmable
БесплатноБез исполняемых скриптовНе проверенEnforce code readability and state minimisation before opening or updating a pull request. Use when code is functionally complete and needs a final…
от ckorhonen★ 35 звёзд на GitHubОб этом скилле
Skimmable
Review the change as if a tired reviewer must understand it in one fast pass.
Prefer deleting code to explaining code.
Keep the pass narrow: improve readability, state modelling, and diff clarity without changing product behaviour unless the current behaviour is obviously dead, redundant, or inconsistent with types.
Checklist
Apply these rules aggressively:
- Make the code obvious on first read.
- Reduce the number of states the code can represent.
- Reduce parameter count.
- Remove optional parameters unless they are truly required by callers.
- Replace boolean flags and loose option bags with discriminated unions when behaviour differs by mode.
- Handle every known variant exhaustively.
- Fail on unknown variants immediately.
- Trust static types inside the typed core; do not add defensive branches for impossible states.
- Assert at boundaries when loading data, parsing input, or reading external systems.
- Prefer early returns over nested conditionals.
- Keep functions cohesive; do not split logic into many tiny wrappers.
- Avoid clever helpers, indirection, and generic abstractions.
- Remove overrides, escape hatches, and customisation points unless there is a proven need.
- Remove dead paths, temporary compatibility layers, and unrelated edits.
- Bias toward fewer lines and fewer moving parts.
Working method
Follow this order:
1. Trim the diff
Remove changes that do not help the main goal of the PR.
Delete:
- incidental renames
- opportunistic refactors
- styling churn with no behavioural value
- compatibility code for callers that no longer exist
- unused helpers, types, branches, and comments
If a simplification requires a separate behavioural decision, stop and call it out instead of smuggling it into the readability pass.
2. Simplify data shape first
Reduce complexity in types before touching control flow.
Prefer:
- required fields over optional fields
- one obvious input shape over many flexible ones
- discriminated unions over booleans or loosely related fields
- named domain types over generic maps and stringly typed objects
Ask of every argument:
- Is it required?
- Can it be derived?
- Can two arguments become one domain object?
- Is it just an override for an API that is too flexible?
3. Simplify control flow
Make happy paths short and visible.
Prefer:
- early returns
- straight-line code
- one level of indentation where possible
- local branching near use
Avoid:
- nested
ifpyramids - defensive
elsebranches for impossible states try/catchfor expected values- hidden branching spread across helper functions
4. Make invalid states loud
Assert at boundaries.
Use assertions when:
- decoding external data
- reading files, env vars, or request payloads
- converting untyped data into typed domain values
- checking invariants that must hold
After the boundary, write simple code that trusts the asserted shape.
5. Exhaust variants
When code depends on a variant, make the variant explicit and handle all cases.
Prefer a switch on a discriminant.
End with an exhaustive check or assertion if the language allows it.
Do not silently ignore unknown values.
6. Collapse unnecessary abstraction
Inline small one-use wrappers when they hide the real logic.
Keep helper functions only when they:
- remove real duplication
- encode a domain concept
- make the caller meaningfully clearer
Do not split a 20-line readable function into five 4-line helpers just to look tidy.
Preferred patterns
Keep arguments few and strict
Bad signs:
- more than 3 parameters
- multiple booleans
- optional callback plus optional overrides plus optional config
- passing values already available on an object
Prefer:
- one required object when the fields belong together
- one discriminated union when there are modes
- separate functions when the behaviours are actually different
Prefer discriminated unions over booleans
If a boolean changes behaviour, model the behaviour directly.
Use:
kind: "draft" | "published"source: "cache" | "network"status: "idle" | "loading" | "success" | "error"
Avoid:
isDraftuseCacheisLoadingpluserrorplusdataon the same object unless the state machine truly permits all combinations
Prefer assertions over defensive code
At boundaries, assert once. Inside, trust the assertion.
Avoid repetitive checks like:
if (!user) returnif (!user.id) returnif (typeof user.id !== "string") return
when types and boundary validation already guarantee the shape.
Prefer one obvious path
If there is a default behaviour, encode it directly.
Do not add overrides like sortOrder = "desc", strategy = "auto", separator = ",", shouldLog = false unless callers truly need them.
Every option multiplies states.
Review prompts
Use these prompts during the pass:
- Can this function lose a parameter?
- Can this object lose an optional field?
- Can
Установить skimmable в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл skimmable?
Enforce code readability and state minimisation before opening or updating a pull request. Use when code is functionally complete and needs a final simplification pass focused on skimmability: reducing arguments, removing optionality and overrides, collapsing unnecessary abstractions, preferring discriminated unions, adding assertions at boundaries, handling variants exhaustively, deleting incidental changes, and making the diff shorter, clearer, and easier to review.
Как установить скилл skimmable?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл skimmable запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic