KROKO
БесплатноБез исполняемых скриптовНе проверенUse when writing or reviewing code to hard limits.
от sakib-dalal179 установок в других каталогахОб этом скилле
KROKO
Write code a tool can prove is small, leak-free, recursion-free and readable — then prove it, with the gate shipped in this skill.
When to Use
- Writing new code where the user wants it small, simple, safe, or "NASA-grade".
- Reviewing or refactoring code that has grown too large, too nested, or too clever.
- Setting up a repository's limits, or an
AGENTS.mdthat binds every agent. - Answering "how should an agent write code" — the answer is this procedure, run.
- Any request touching comments, docstrings, or documentation-in-source.
- Before claiming a refactor simplified something: measure both versions.
Not for: pre-commit plumbing (requesting-code-review), bulk mechanical cleanup
(simplify-code), or choosing a stack (before-you-build).
The axiom
Generated code is fluent whether or not it is correct, so an agent's self-assessment carries no signal. Measured: across 80 curated tasks and 100+ models, generated code chose the insecure implementation 45% of the time and missed 86% of XSS defects, with no improvement across model generations even as syntax correctness rose (Veracode 2025 GenAI Code Security Report). Across 211M changed lines, AI-assisted work shows ~4x growth in duplicated blocks, with copy/paste exceeding moved code for the first time in the dataset (GitClear).
Therefore: the only trustworthy signal is tool output. Run the gate, then report its verdict rather than an opinion about it.
Procedure
① Read before writing. Read the target files in full (not grepped), read the neighbouring conventions, and verify every external API against its real documentation. Never assume a signature, flag or config key from memory — that is the single largest source of agent-introduced breakage. Zero lines written until this is done.
② Bound the problem. Input ranges, each failure mode and what it returns, the resource ceiling (memory, entries, iterations, timeouts), and the one thing that must not break. If a loop cannot be bounded, the design is wrong, not the loop.
③ Choose the smallest structure. In order: delete code -> standard library -> platform primitive -> one function -> one module -> one dependency. An abstraction needs two existing call sites, never a hypothetical third.
④ Write in gate-green increments. Signature with asserted preconditions -> straight-line happy path -> one branch at a time, re-running the gate after each -> failure paths -> tests. A 400-line first draft is 400 unverified assumptions.
⑤ Name by what a thing is. One word per concept project-wide. No data, info,
util, helper, handle, process, mgr, svc, cfg, tmp — these are the tell
of generated code. No type suffixes. Booleans read as assertions (canRetry).
⑥ Comment as a last resort that carries the why. See the seven rules below.
⑦ Handle failure once, visibly. Name the exception type; never swallow; never
return a default from a failure path — a silent return [] is a memory leak of
information, because the caller now believes the set is empty.
⑧ Run the gate, then the tests, then the scan. Any non-zero exit stops the step. Fix it. Never suppress, never whitelist.
⑨ Report the evidence. Exact commands, exit codes, gate output verbatim or faithfully summarised, and what remains unverified.
The hard budget
Full table with quoted origins in references/limits.md.
| Constraint | Limit | Code |
|---|---|---|
| Lines per function | 60 | K002 |
| Nesting depth | 3 | K003 |
| Parameters | 4 | K004 |
| Cognitive complexity | 15 | K005 |
| Recursion, direct or mutual | 0 | K001 |
| Unbounded loops | 0 | review |
| Assertions per function | >=2, or >=1 plus a named raise | review |
| Module-level mutable state | 0 | K007 |
| Swallowed errors | 0 | K006 |
| Placeholder / commented-out / banner comments | 0 | K008-K010 |
| Undocumented public API | 0 | K011 |
| Compiler and analyser warnings | 0 | CI |
| Diff before splitting | 300 lines | review |
Anything over a limit is not "a large function", it is unfinished. A function passes 60 lines because it is doing two jobs; finding the second job is the work.
Comments — the seven rules
Full doctrine, with language-specific forms, in references/comment-doctrine.md.
The principle: a comment exists to say what the code cannot say. Apply the test "if I delete this, what is lost?" — if nothing, delete it.
- Say why, not what. The code states the mechanism; the comment states the reason and the constraint behind it.
- Never narrate the code back. Overlapping words with the line beneath is a duplicated line (K014).
- Sentences, capitalised, punctuated — even fragments, even one-word notes (K013).
- Document the public surface only. Module and every exported function (K011). No comment on a self-evident private one-liner.
- State the contract the signature cannot hold: empty input, raised errors, caller obligations,
Установить KROKO в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл KROKO?
Use when writing or reviewing code to hard limits.
Как установить скилл KROKO?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл KROKO запускает скрипты?
Нет, скилл состоит только из инструкций (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