Skills

Cw Slice

Use before writing code for any Codewhale feature, upgrade, or refactor: find the...

Install

npx skills add codewhale-hq/Codewhale --skill cw-slice -g -a claude-code -y
Repository
codewhale-hq/Codewhale41.2k
Category
Writing
Updated
3d ago
License
MIT
Context cost
Lightabout 1,486 tokens
Runs scripts
No, instructions only

What it does

Use before writing code for any Codewhale feature, upgrade, or refactor: find the existing owner of the behavior, bound the change to one reviewable slice, and fix the evidence bar before you start.

cw-slice

The expensive mistake in this repo is not a bad implementation, it is a second implementation. A new model_*, *_config, provider_*, or "bridge" module beside the one that already does the job ships two systems and a comment that is no longer true. This skill is the ponytail ladder's rung 2 with commands attached: find the thing that already exists, then edit it.

Stage 2 of the loop: cw-orient → slice → cw-gates → cw-dogfood → cw-land → cw-handoff.

When to use

  • Any feature, upgrade, refactor, or "make X work like Y" request.
  • Before creating a new module, trait, config struct, or command.
  • When a plan or issue tells you to build something and you have not yet confirmed it does not already exist.

Workflow

  1. Walk the ladder before opening an editor (AGENTS.md, "The ponytail method", not restated here, since a second copy is what rung 2 forbids). Stop at the first rung that answers. The ladder runs after reading the code, never instead of it: a short diff written without reading the call sites is a guess, not a small change. State the rung only when the choice isn't obvious from the diff itself.

  2. Grep for the predecessor. This is the step that gets skipped and the one that costs the most:

    grep -rn "<the concept, in the words the code would use>" crates --include='*.rs' | head -40
    ls crates
    grep -rln 'model_\|_config\|provider_' crates/*/src --include='*.rs' | head -30
    

    Search behavior and symbols, not just filenames. If you find an owner, edit it. If you are still adding a new layer, its commit message must name the predecessor it replaces, otherwise you are editing the wrong file.

Read the whole SKILL.md on GitHub

More in Writing