skimmable

Simplifies code diffs by reducing arguments, optionality, and abstractions before pull request review.

1|Updated May 6, 2026
One-click install
npx skills add https://github.com/surfingalien/FinSurfing --skill skimmable-surfingalien
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: skimmable
Source: https://github.com/surfingalien/FinSurfing/tree/main/.claude/skills/skimmable
Command: npx skills add https://github.com/surfingalien/FinSurfing --skill skimmable-surfingalien

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code that works is often still hard to review: too many parameters, optional fields, boolean flags, nested conditionals, and bloated diffs slow down reviewers and hide bugs. This Skill performs a final readability and state-minimisation pass on functionally complete code before a pull request is opened or updated. ## Core Features & Use Cases - Diff Trimming: Removes incidental renames, opportunistic refactors, dead code, and unrelated edits so the PR contains only necessary changes. - State Simplification: Replaces boolean flags and loose option bags with discriminated unions, reduces parameter counts, and removes unnecessary optional fields and overrides. - Control Flow Flattening: Applies early returns, exhaustive variant handling with assertions, and boundary validation so the typed core stays simple. - Use Case: Before opening a PR on a TypeScript feature branch, run this pass to collapse a six-parameter function with overrides into a two-argument API using a discriminated union, cutting the diff and making the intent obvious to reviewers. ## Quick Start Ask the AI to run the skimmable pass on your current branch diff before opening the pull request.

Frequently Asked Questions about skimmable

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make my code easier to review in a pull request?

Run a skimmability pass that trims incidental changes from the diff, reduces function parameters, replaces boolean flags with discriminated unions, and flattens nested conditionals into early returns. The goal is a shorter diff a reviewer can understand in one fast pass.

How to replace boolean flags with discriminated unions in TypeScript?

Model each behaviour as an explicit variant, such as { kind: "draft" } | { kind: "published" }, instead of flags like isDraft. This prevents impossible state combinations and lets switch statements handle every variant exhaustively.

When should I use assertions instead of defensive checks?

Assert once at boundaries when decoding external data, reading files, or parsing request payloads, then trust the asserted shape inside the typed core. Repeated defensive checks like if (!user) return after validation add noise without safety.

Does this readability pass change product behaviour?

No, the pass is deliberately narrow and avoids behaviour changes unless existing code is obviously dead, redundant, or inconsistent with its types. If a simplification requires a behavioural decision, it is called out separately rather than smuggled into the diff.

When not to split code into helper functions?

Avoid splitting a readable 20-line function into many tiny one-use helpers, which hides the real logic behind indirection. Keep helpers only when they remove real duplication, encode a domain concept, or make the caller meaningfully clearer.