/skills:split-boolean-propsfrom skills
Refactors React components with too many boolean props into explicit variants or composed parts. Audits call sites, collapses flags into union types or subcomponents, and verifies rendering parity.
Ships in 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.
Boolean props multiply fast on shared React components. Each added flag doubles the possible states, hides which combinations are valid, and encourages the next request to add one more flag. Auditing real call sites before editing lets you reshape the API around actual usage so invalid combinations disappear.
Search the repository for every import and usage of the target component, including wrapper components, tests, and stories. Check for prop spreads that forward flags indirectly.
Map every audited boolean prop to a clearer shape before writing code:
size="sm" | "md" | "lg" instead of isSmall and isLarge), or split them into dedicated variant components when their markup differs sharply.<Banner.Media> and <Banner.Actions> instead of hasIcon and hasActions).disabled; a state that replaces the content, like loading or empty, becomes a variant value instead.For each boolean you keep, write one call that pairs it with a variant, part or other kept flag it conflicts with and confirm the typechecker rejects it; if none conflicts, it stays a boolean.
Refactor the component around the new variant props and composed parts, removing the replaced boolean props and their nested conditional branches. Keep existing markup, class names, and accessibility attributes equivalent so existing call sites stay visually and structurally identical.
Add the newly requested mode, layout, or section as a new variant value, variant component, or composed subcomponent. Do not add another boolean prop for the new case.
Update every call site, wrapper, test, and story found in step 1 to use the reshaped API. Search the codebase again to confirm no references to the removed boolean props remain.
Show the user the old-to-new prop mapping, the count of migrated call sites, the before-and-after render parity check, and the check proving the new case renders.
Based on vercel-labs/agent-skills (no licence file at pinned commit, ideas only), rewritten by Copybook.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
24 skills in this plugin
/add-pre-commit-checksUse when asked to add pre-commit hooks, set up Husky or lint-staged, stop bad commits, or run Prettier and type checks on commit. Sets up a pre-commit hook that formats staged files, type-checks with the project config, and runs related tests, proven by blocked and fast commits. Not for picking a test set for a change (run-affected-tests)./build-throwaway-prototypeUse when asked to prototype, spike, try an idea out quickly, sanity-check a state model or logic, or mock up what a UI should look like. Builds a throwaway prototype that answers one named design question from one command or one HTML file while leaving production code untouched. Not for building a finished production page (design-web-page)./check-current-docsUse when asked to use the latest docs, check if an API is still current, check which version the project is on, follow modern HTML or CSS best practices, or avoid outdated patterns; also when adding or changing code that calls a library pinned in the project, such as validation with a schema library. Reads the project lockfile and manifest, checks the official docs or browser guidance for the exact pinned versions, implements the current pattern without deprecated calls, and cites each choice with its URL, version, and date read. Not for moving existing code off an old API (migrate-off-deprecated-api)./check-live-deployUse when asked if a merge is live, if the deploy worked, or to check production after shipping and merging. Verifies that the canonical public URL serves the merged commit past any cache and that the change itself works live, reporting live, not live or unknown with evidence. Not for checking code before a merge (verify-work-done)./check-skill-before-installUse when asked to find a skill for a task, if there is a skill that helps, how to do something with an agent, which plugin to use, or to install a skill. Finds two or three candidate skills, reads each one for scripts, network calls, file writes, licence, and name clashes, and recommends one pick with a proposed install command. Not for getting a second opinion on a plan or trade-off (get-second-opinion)./find-root-causeUse when something is broken: a bug, a failing test, a build error, "it doesn't work", or a fix that didn't hold. Reproduces the failure, traces it to the line where it starts, proves one cause with one change, fixes every copy, and stops with a report after two failed fixes. Not for checking finished work before saying done (verify-work-done).npx claudepluginhub heyvhuang/copybook-skills --plugin skillsOther plugins' skills for the same job