cw-slice
БесплатноБез исполняемых скриптовНе проверен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…
от codewhale-hq★ 41 217 звёзд на GitHubОб этом скилле
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
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.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 -30Search 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.
Check the contracts you are about to walk into. One of these is guard-tested, the rest are convention — either way, move them with their code, not around it:
- One turn loop:
crates/engine/src/core/engine/turn_loop.rs, guarded bycrates/core/tests/single_turn_loop.rs. A second loop fails the guard; changing the shape means changing the guard with it. - One base prompt:
BASE_PROMPTincrates/engine/src/prompts/text.rs. - The subagent tool is
agent;agent_open/agent_eval/agent_close/delegate_to_agentare removed surfaces. If the shape must move, move the code and add the guard test that judges the new shape — the convention is not a fence around the area. - The system prompt + tool catalog are a session-pinned KV-cache prefix
(
docs/CACHE.md). Any new session-context contributor must state its cache effect — frozen prefix vs. append-only history. Never splice a volatile fact into the prefix. crates/engine/src/core/is a module inside the engine crate (codewhale-engine).crates/coreis a different crate that runs no turns. Do not confuse them.- Repeatedly misidentified as dead, verify consumers before removing:
runtime/src/context_budget.rs,runtime/src/prompt_zones.rs,engine/src/tools/remember.rs,config/src/route/.
- One turn loop:
Read the scoped guidance for the files you will touch.
crates/tui/AGENTS.mdowns the UI contracts (one owner per fact,codewhale_palette::grammarsemantics, typed state enums, toast routing,tr(locale, MessageId::...)for user prose).crates/localization/locales/AGENTS.mdowns string changes.web/AGENTS.mdowns the site.docs/MOTION_CONTRACT.mdowns motion. Design law lives indocs/design/, not in a prototype file someone left in a sibling directory.Bound the slice. One coherent change, reviewable in one sitting, that leaves the tree building and green.
AGENTS.md's two corollaries keep slices honest: an abstraction must delete caller code, and a migration ships its last consumer or does not start.Fix the evidence bar now, not after. Decide before writing code what will prove this works, and write it into your plan:
- the focused test or existing check that covers the behavior
(
scripts/dev-test.sh --listmaps an area to its fastest invocation); - whether the change is visible enough to need cw-dogfood;
- whether it is cross-cutting enough to need the full sweep in cw-gates.
- the focused test or existing check that covers the behavior
(
Write the implementation, then prove it runs. A bug fix may add the one regression test that would have caught it; no other new tests and no new code comments (
AGENTS.md); update or delete existing tests the change makes wrong.
Red flags / don't
- Don't add a module that "bridges", "mirrors", "stages", or "wraps" something that already exists without naming that thing in the commit message.
- Don't fork a singleton (turn loop, base prompt, delegation axis, lifecycle system) without moving its guard test and consumers with it. T
Установить cw-slice в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл cw-slice?
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?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл cw-slice запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic