{"id":50615873,"url":"https://github.com/mishanefedov/skillrot","last_synced_at":"2026-06-08T10:00:42.608Z","repository":{"id":361860470,"uuid":"1256165813","full_name":"mishanefedov/skillrot","owner":"mishanefedov","description":"Audit agent skills for CLI drift: find skills that call external tools with flags/subcommands the installed version no longer accepts.","archived":false,"fork":false,"pushed_at":"2026-06-02T13:40:35.000Z","size":459,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-06T08:32:13.491Z","etag":null,"topics":["agent-skills","ai-agents","bun","claude-code","claude-code-plugin","claude-code-skill","claude-plugin","cli","codex","cursor","developer-tools","linter","opencode"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mishanefedov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-06-01T14:20:33.000Z","updated_at":"2026-06-02T09:23:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mishanefedov/skillrot","commit_stats":null,"previous_names":["mishanefedov/skillrot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mishanefedov/skillrot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishanefedov%2Fskillrot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishanefedov%2Fskillrot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishanefedov%2Fskillrot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishanefedov%2Fskillrot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mishanefedov","download_url":"https://codeload.github.com/mishanefedov/skillrot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishanefedov%2Fskillrot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34014821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-07T02:00:07.652Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-skills","ai-agents","bun","claude-code","claude-code-plugin","claude-code-skill","claude-plugin","cli","codex","cursor","developer-tools","linter","opencode"],"created_at":"2026-06-06T08:30:41.527Z","updated_at":"2026-06-07T09:00:57.754Z","avatar_url":"https://github.com/mishanefedov.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"assets/skillrot.svg\" alt=\"skillrot\" width=\"150\" height=\"150\"\u003e\n\n# skillrot\n\n**your skills rot when the tools they call move on**\n\n\u003ca href=\"https://github.com/mishanefedov/skillrot/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/mishanefedov/skillrot?style=flat\u0026color=4ade80\" alt=\"Stars\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/mishanefedov/skillrot/commits/main\"\u003e\u003cimg src=\"https://img.shields.io/github/last-commit/mishanefedov/skillrot?style=flat\" alt=\"Last commit\"\u003e\u003c/a\u003e\n\u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-4ade80?style=flat\" alt=\"License: MIT\"\u003e\u003c/a\u003e\n\u003cimg src=\"https://img.shields.io/badge/agents-Claude%20Code%20·%20Codex%20·%20Cursor%20·%20opencode%20·%20Factory-444\" alt=\"Agents\"\u003e\n\n\u003c/div\u003e\n\nA linter for agent skills. A skill that shells out to `codex`, `gh`, `docker`,\n`supabase`, `bun`, ... is a time bomb: the tool ships a new version, renames a\nflag or drops a subcommand, and the skill keeps confidently emitting the old\ncommand. Nobody gets an error that says *\"this skill is out of date\"* — the\nagent just runs a dead command and fails mid-task.\n\n`skillrot` reads each skill's bash, extracts the `command subcommand --flags` it\nactually uses, and checks them against the installed CLI's own `--help`.\n\n```text\n$ skillrot ~/.claude/skills\n\ndeploy-app\n  ✗ '--legacy-config' on 'compose up' not found in Docker version 27.4.0 --help\n    docker compose up --legacy-config -d\n    deploy-app/SKILL.md:64\n\n1 drift  0 warning  41 checked     (exit 1)\n```\n\nReal run, reproducible with `gh` + `bun` installed (`skillrot examples/stale-skill`):\n\n\u003cdiv align=\"center\"\u003e\u003cimg src=\"assets/demo.png\" alt=\"skillrot catching three renamed flags\" width=\"640\"\u003e\u003c/div\u003e\n\n### Why\n\nI was using a skill that wraps the Codex CLI. Codex shipped a release that\nchanged `codex review` so `--base` can no longer be combined with a prompt. The\nskill kept generating the old form and failed silently, mid-task. That's a whole\nclass of bug — every skill that wraps a CLI is exposed — and nothing was checking\nfor it. (That specific *constraint* case is the [v2 target](#scope); v1 catches\nthe far more common removed/renamed flags and dead subcommands.)\n\n## Try it (no install)\n\n```bash\nnpx skillrot ~/.claude/skills        # or: bunx skillrot ~/.claude/skills\n```\n\nZero install — it runs straight off npm with just Node (or Bun). Point it at any\nskills folder and see if anything's rotten before you decide to keep it around.\n\n## Install\n\nskillrot is both a **skill** (the audit logic) and a small, dependency-free\n**CLI** (the engine). The CLI is a single bundle that runs on plain Node — no\nBun required to use it.\n\n**Homebrew:**\n\n```bash\nbrew install mishanefedov/tap/skillrot\n```\n\n**npm (global command):**\n\n```bash\nnpm install -g skillrot\n```\n\n**Any agent — one line** (downloads a prebuilt, self-contained binary — no\nNode/Bun needed — and registers the skill with every coding agent on the\nmachine):\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/mishanefedov/skillrot/main/install.sh | bash\n```\n\n**Claude Code plugin** (no clone):\n\n```text\n/plugin marketplace add mishanefedov/skillrot\n/plugin install skillrot@skillrot\n/reload-plugins\n```\n\n**Skill-only** via the cross-agent skills installer:\n\n```bash\nnpx skills add mishanefedov/skillrot --skill skillrot --global --all\n```\n\nAgents can self-install by reading [`INSTALL_FOR_AGENTS.md`](INSTALL_FOR_AGENTS.md).\n\n### Works with\n\nAny agent that loads `SKILL.md`-format skills: **Claude Code, Codex, Cursor,\nopencode, Factory, Kiro** (the installer symlinks into each one it finds, plus\nthe shared `~/.agents/skills`). The CLI is agent-agnostic — run it from anything,\nincluding CI.\n\n## Usage\n\n```bash\nskillrot \u003cskills-dir\u003e                 # text report; exit 1 if any drift\nskillrot \u003cskills-dir\u003e --fix           # self-heal: rewrite drifted flags in place\nskillrot \u003cskills-dir\u003e --cost          # context-cost audit (tokens per session)\nskillrot \u003cskills-dir\u003e --json          # machine-readable\nskillrot \u003cskills-dir\u003e --tools codex,gh,docker   # only check these CLIs\nskillrot ./skills/one-skill           # a single skill (dir with SKILL.md)\n```\n\n### Self-healing\n\nWhen a drifted flag has a confident match in the CLI's current `--help` (a\nrename, plural, or extension — `--reviewers`→`--reviewer`, `--frozen`→\n`--frozen-lockfile`), skillrot suggests it inline and `--fix` rewrites the skill\nin place. It only rewrites high-confidence matches, never a guess.\n\n\u003cdiv align=\"center\"\u003e\u003cimg src=\"assets/selfheal.png\" alt=\"skillrot detecting, suggesting, and fixing drifted flags\" width=\"640\"\u003e\u003c/div\u003e\n\n### Context cost (`--cost`)\n\nEvery installed skill's name + description is loaded into **every session** so\nthe agent knows the skill exists — the body only loads when the skill fires. So\na big skill folder quietly taxes your context window before you type anything.\n`--cost` measures that always-on tax, ranks the heaviest descriptions, and flags\nthe ones worth trimming.\n\n```text\n$ skillrot ~/.claude/skills --cost\n67 skills · ≈7.1k tokens injected into every session before you type anything\n(every skill's name + description is always loaded; bodies ≈657k tok load only when a skill fires)\n\nHeaviest always-on descriptions:\n  ≈196 tok   brief        ~/.claude/skills/brief/SKILL.md\n  ≈195 tok   plan-tune    ~/.claude/skills/plan-tune/SKILL.md\n  ...\n```\n\nIt counts one SKILL.md per top-level skill (what an agent actually loads), not\nmirror copies. Token counts are a ~4-chars/token estimate (shown with `≈`).\n\nIt scans `SKILL.md` bash fences and `*.sh` scripts.\n\n## What it catches (v1)\n\n| Drift | Level |\n|---|---|\n| A long flag the installed CLI no longer accepts (`--gone`) | error |\n| A subcommand that no longer exists | error |\n| A missing short flag (`-z`) | warning (noisier, lower confidence) |\n| A CLI the skill calls that isn't installed | warning |\n| A `--help` that couldn't be read | warning |\n\nConservative on purpose: only high-confidence drift is an error. A linter that\ncries wolf gets uninstalled.\n\n## How it works\n\n1. **Extract** — a quote-aware tokenizer pulls `command [subcommand…] --flags`\n   from each skill's bash (unwrapping `sudo`/`env`/`timeout`/`bunx`/...). It\n   targets an allowlist of real CLIs and captures up to two subcommand tokens\n   (`gh pr view`), so flags are checked at the right level. Not a full shell\n   parser — uncertain parses lean toward warnings.\n2. **Introspect** — runs `\u003ctool\u003e [subpath] --help` and `--version`, walking the\n   subcommand path deepest-first so `gh pr view --json` is checked against\n   `gh pr view --help`, not `gh --help`.\n3. **Analyze** — token-boundary flag matching (so `-c` doesn't match inside\n   `--config`).\n4. **Report** — grouped by skill with `file:line`; exit 1 on any error.\n\n## Scope\n\n**v1 catches:** removed/renamed flags, dead subcommands, uninstalled tools —\n**self-heals** confident flag renames with `--fix`, and audits your skills'\nalways-on **context cost** with `--cost`.\n\n**Roadmap (v2):**\n\n- **Semantic constraints** — \"flag A can't be combined with flag B\", required\n  values, mutually exclusive modes (the Codex `--base` case). Reliable detection\n  needs **sandboxed replay**: run the real arg shape with sentinel values inside\n  a disposable, network-less container and read the argument-parse error.\n- **Version stamping** — record the CLI versions a skill was validated against\n  and flag drift since.\n- **Native packaging per agent** (Codex/Cursor marketplaces). The CLI itself\n  already ships with zero prerequisites — `npx skillrot`, `npm install -g`,\n  `brew install`, or a prebuilt binary.\n\n## Prior art\n\n[`cli-tools-skill`](https://github.com/netresearch/cli-tools-skill) makes sure\nthe tools a skill needs are *installed*. skillrot is the other half: it checks\nthey're *used correctly for the version installed*. Presence vs. correctness.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmishanefedov%2Fskillrot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmishanefedov%2Fskillrot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmishanefedov%2Fskillrot/lists"}