kanso-principles

kanso-principles is a skill for Claude Code from blakecyze/kanso. It costs 43 tokens per session (1,290 once invoked), scanned A, original, MIT.

A set of standing rules for keeping code concise, clear, and free of unnecessary additions.

In plain words
What is it for?
Use it when generating, reviewing, modifying, or discussing code, especially when deciding whether a comment, guard, or new piece of logic is justified.
Why use it?
It helps prevent redundant comments, needless checks, and extra complexity during code writing, review, and changes.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions subagents; mentions Claude Code; mentions Codex.

Part of the kanso plugin — 11 skills, 1 hook shipped together

Good fit Use it when generating, reviewing, modifying, or discussing code, especially when deciding whether a comment, guard, or new piece of logic is justified.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/blakecyze/kanso/kanso-principles
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add blakecyze/kanso --skill kanso-principles
Clone the repo
git clone --depth 1 https://github.com/blakecyze/kanso

Made for: Claude Code.

Or install kanso, the plugin that ships this one along with the rest of its 11 skills, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for kanso-principles

README.md
[![agentmods](https://agentmods.dev/badge/skills/blakecyze/kanso/kanso-principles/github.svg)](https://agentmods.dev/skills/blakecyze/kanso/kanso-principles)
Your own site
<a href="https://agentmods.dev/skills/blakecyze/kanso/kanso-principles"><img src="https://agentmods.dev/badge/skills/blakecyze/kanso/kanso-principles/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for kanso-principles

Your own site · 80×15
<a href="https://agentmods.dev/skills/blakecyze/kanso/kanso-principles"><img src="https://agentmods.dev/badge/skills/blakecyze/kanso/kanso-principles.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,290 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.01290
Opus 5 $0.00022 $0.00645
Sonnet 5 $0.00009 $0.00258
Haiku 4.5 $0.00004 $0.00129

Measured 9d ago against content hash b8b74e3ec58d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

kanso-principles scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/kanso-principles/SKILL.md · 113 lines

How it starts

The opening of the file, as written. The whole thing — 113 lines — stays where its author put it; the contents beside it link to each section on GitHub.

kanso-principles

Standing context for any code-related task. These rules override default verbosity and defensive habits. They apply equally to code you write, code you review, and code you modify.

The single governing principle: prefer deletion over addition. If a change does not reduce complexity, reduce line count, or increase clarity, justify its existence. Code earns its place.

The anti-dilution taxonomy

1. No tautological comments

A comment must explain why, not restate what. If the comment echoes the code, delete the comment or rewrite it to carry business context, constraints, or intent.

Bad: // Filter users by age above users.filter(u => u.age > 18).

Good: // Legal requirement: 18+ only above the same line.

2. No temporal or step-marker comments

Artefacts of the prompt that produced the code. Delete them before they commit.

Bad: // Step 1: fetch user, // Now validate, // Add retry logic as requested

Good: no comment, or a comment explaining why the retry exists.

3. No defensive programming theatre

Cascading try/catch, null checks on already-typed values, isinstance checks on typed parameters, and exception handlers that silently swallow errors and return None/null. Silent errors are the deadliest errors.

Let exceptions propagate. Handle them at the boundary where the recovery strategy is known. If an invariant is guaranteed by the type system, trust it.

4. No filler variables

const result = compute(x); return result; is just return compute(x);

Intermediate variables earn their place by adding a meaningful name or being referenced more than once.

5. No zero-entropy names

userDataProcessingResult, helperFunction, dataManager. Statistically probable, domain-free, and unreadable at a glance.

Prefer: adults, invoice, sessionExpired. Short names are fine when the context makes them clear.

6. No premature abstraction

A factory for one implementation, an interface for one consumer, a base class for one subclass. These are costs without benefits. Solve the problem that exists now, not one that might exist later.

Read the full file on GitHub · 113 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 113 lines · 43 tokens per session scan A b8b74e3ec58d

Subscribe to this mod's changes

kanso-principles is a skill published in the GitHub repository blakecyze/kanso (3 stars, last pushed 6d ago), licensed MIT. It adds 43 tokens to every session and 1,290 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.