kanso-refactor SKILL.md skillA

kanso-refactor from blakecyze/kanso is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add blakecyze/kanso/kanso-refactor@git:20260708.0b9805a

Pins git:20260708.0b9805a in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
blakecyze/kanso
Path
skills/kanso-refactor/SKILL.md
Versions recorded
5
Latest version
git:20260708.0b9805a, committed Jul 8, 2026
First version recorded
Apr 23, 2026
Size
10,254 bytes
Repository stars
5
License
MIT

Use when the user asks to clean up, tighten, simplify, de-bloat, de-slop, or refactor code. Also use when acting on findings from /kanso-audit or /kanso-nuclear. Behaviour-preserving only.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# kanso-refactor

Behaviour-preserving cleanup. Removes dilution, tightens code, deletes cruft. Never changes behaviour. If a change would alter behaviour, the skill surfaces it as a question instead of making the change.

The principles from `kanso-principles` apply. The anti-dilution taxonomy is the primary target.

## Always run inline

This skill runs in the calling chat — including when invoked as the follow-up to `/kanso-audit`. Never dispatch via the Agent or Task tool, never run as a subagent, never split work into a parallel runner whose output lands in a side window. Edits, summaries, and any clarifying questions all happen in the user's current transcript.

## The hard rule

**Refactoring must not alter behaviour. Behaviour changes must avoid refactoring.**

Mixing the two obscures intent, breaks cherry-picking, and ruins git bisect. If a task requires both, do them in separate commits, each with a single purpose.

Before making any change, ask: would this change produce different outputs for any input the existing tests or usage patterns cover? If yes, it's not a refactor. Stop and ask the user.

Cases where the boundary is tested:
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add blakecyze/kanso/kanso-refactor@sha256:d5591bcd72e1b505

The line at the top of this page pins the label git:20260708.0b9805a, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_tyzvrmgyiisdz6rg.svg)](https://markdownregistry.com/a/art_tyzvrmgyiisdz6rg)

1 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 5 versions of this file, between Apr 23, 2026 and Jul 8, 2026, about one every 19 days.

versioncommittedcommitsizeaudit
git:20260708.0b9805a latest2026-07-08 0b9805a 10,254 BA view · diff
git:20260707.dfb7fc12026-07-07 dfb7fc1 10,032 BA view · diff
git:20260527.328da5e2026-05-27 328da5e 10,005 BA view · diff
git:20260525.6887ad12026-05-25 6887ad1 8,186 BA view · diff
git:20260423.c7a43cc2026-04-23 c7a43cc 7,827 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (10254 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

blakecyze/kanso · 5 stars · license MIT · pushed 2026-11-05 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_tyzvrmgyiisdz6rg
GET https://markdownregistry.com/api/v1/resolve?ref=blakecyze/kanso/kanso-refactor
GET https://markdownregistry.com/api/v1/blob/d5591bcd72e1b5058ab4ef63878dc3b093cca14b975725cbbcb80a6f1c657554

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from blakecyze/kanso

kanso-audit SKILL.md skill
blakecyze/kanso · skills/kanso-audit/SKILL.md · Use when the user asks for a code review, audit, pre-PR check, quality sweep, or pattern analysis of a diff, branch…
git:20260708.0b9805a · audit A · 5 stars
kanso-commit SKILL.md skill
blakecyze/kanso · skills/kanso-commit/SKILL.md · Use when the user asks to commit changes, stage their work, write commit messages, or split the working tree into…
git:20260423.c7a43cc · audit A · 5 stars
kanso-context SKILL.md skill
blakecyze/kanso · skills/kanso-context/SKILL.md · Use when the user asks to update, prune, audit, or create AGENTS.md, CLAUDE.md, or other agent context files. Also use…
git:20260708.0b9805a · audit A · 5 stars
kanso-council SKILL.md skill
blakecyze/kanso · skills/kanso-council/SKILL.md · Use when the user wants a stronger, multi-model, or cross-checked audit: "convene the council", "council review"…
git:20260903.4cfed54 · audit A · 5 stars
kanso-handoff SKILL.md skill
blakecyze/kanso · skills/kanso-handoff/SKILL.md · Use when the user wants the current session's context packaged for the next one: "package this session", "carry this…
git:20260903.7036f15 · audit A · 5 stars
kanso-nuclear SKILL.md skill
blakecyze/kanso · skills/kanso-nuclear/SKILL.md · Use when the user asks for a nuclear review, a thermonuclear audit, a deep maintainability sweep, a structural audit of…
git:20260708.0b9805a · audit A · 5 stars
kanso-pr SKILL.md skill
blakecyze/kanso · skills/kanso-pr/SKILL.md · Use when the user asks to write a pull request description, open a PR, draft PR notes, or summarise a branch for review.
git:20260527.328da5e · audit A · 5 stars
kanso-principles SKILL.md skill
blakecyze/kanso · skills/kanso-principles/SKILL.md · Use when generating, reviewing, modifying, or discussing any code. Sets standing anti-dilution rules for all…
git:20260708.0b9805a · audit A · 5 stars
kanso-prompting SKILL.md skill
blakecyze/kanso · skills/kanso-prompting/SKILL.md · Use when rewriting, sharpening, or producing a prompt for Claude or another current frontier model. Sets standing rules…
git:20260707.acb2268 · audit A · 5 stars
kanso-task SKILL.md skill
blakecyze/kanso · skills/kanso-task/SKILL.md · Use when the user wants a task done well rather than fast, wants a rough or underspecified request sharpened before it…
git:20260708.a70e21b · audit A · 5 stars
kanso-unasked SKILL.md skill
blakecyze/kanso · skills/kanso-unasked/SKILL.md · Use when the user wants to see or clean up what an agent did beyond the request, such as "what did you add that I…
git:20261105.0ac8caa · audit A · 5 stars

Every file in blakecyze/kanso

Other files named kanso-refactor

kanso-refactor SKILL.md skill
blakecyze/skills · skills/kanso/skills/kanso-refactor/SKILL.md · Use when the user asks to clean up, tighten, simplify, de-bloat, de-slop, or refactor code. Also use when acting on…
git:20260901.d29810e · audit A · 5 stars

Browse by kind, by grade A, or by owner.