kanso-context

kanso-context is a skill for Claude Code from blakecyze/kanso. It costs 58 tokens per session (2,909 once invoked), scanned A, original, MIT.

A guide for curating agent context files such as AGENTS.md and CLAUDE.md, which tell coding agents how to work in a particular codebase.

In plain words
What is it for?
Use it to audit, prune, or update repository instructions when agents repeatedly make the same mistakes.
Why use it?
It helps remove stale or excessive instructions and focus the context on guidance that improves agent reliability.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

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

Good fit Use it to audit, prune, or update repository instructions when agents repeatedly make the same mistakes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/blakecyze/kanso/kanso-context
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-context
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-context

README.md
[![agentmods](https://agentmods.dev/badge/skills/blakecyze/kanso/kanso-context/github.svg)](https://agentmods.dev/skills/blakecyze/kanso/kanso-context)
Your own site
<a href="https://agentmods.dev/skills/blakecyze/kanso/kanso-context"><img src="https://agentmods.dev/badge/skills/blakecyze/kanso/kanso-context/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-context

Your own site · 80×15
<a href="https://agentmods.dev/skills/blakecyze/kanso/kanso-context"><img src="https://agentmods.dev/badge/skills/blakecyze/kanso/kanso-context.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,909 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.00058 $0.02909
Opus 5 $0.00029 $0.01455
Sonnet 5 $0.00012 $0.00582
Haiku 4.5 $0.00006 $0.00291

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

Security

Grade A, and why

kanso-context 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 8d 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-context/SKILL.md · 270 lines

How it starts

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

kanso-context

Curates agent context files to improve AI-agent reliability on this codebase. Primary target is AGENTS.md (cross-tool standard). CLAUDE.md is only updated when guidance is genuinely Claude-specific.

The principles from kanso-principles apply. This skill is biased toward deletion.

The governing evidence

This skill's design is pinned to the empirical record as of 2026:

  • Vercel benchmark: a lean ~8KB AGENTS.md with a compressed docs index hit 100% on agent evaluations. Skills-only context hit 53%. Skills with explicit invocation instructions hit 79%.
  • ETH Zurich AGENTbench: LLM-generated context files reduced success rates by 0.5-2% and inflated cost by over 20%. Developer-written context files added 4%.
  • Real-world prevalence study (2,303 files): only 14.5% of context files include security or performance guidance. This is the largest systematic gap.
  • Median effective length: ~485 words for Claude Code, ~150 lines ceiling for AGENTS.md. Longer files degrade agent performance.

Three practical implications:

  1. This skill does not generate context from scratch. It prunes, curates, flags gaps, and asks the user to fill them. Generation without the user's input is the failure mode the research warns against.
  2. Less is more. The default action on any file over 150 lines is to propose deletions.
  3. Security and performance guidance is the universal gap. Flag it if missing and relevant.

Modes

$ARGUMENTS selects the mode:

  • audit (default) — review existing context files, produce a findings report. No edits.
  • prune — act on audit findings to remove stale, redundant, or noisy content. Edits with approval.
  • init — bootstrap a minimal AGENTS.md for a repo that doesn't have one. Interactive; asks the user for inputs.
  • sync — compare context files against recent PRs (last 20-30 merged) to find drift: instructions that no longer match how the code actually works.

If no argument is given, default to audit.

Read the full file on GitHub · 270 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. 8d ago First seen · 270 lines · 58 tokens per session scan A 225ba9dcd746

Subscribe to this mod's changes

kanso-context is a skill published in the GitHub repository blakecyze/kanso (3 stars, last pushed 5d ago), licensed MIT. It adds 58 tokens to every session and 2,909 once invoked, about $0.0003 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.