octocode-clean-agentic-code

octocode-clean-agentic-code is a skill for Claude Code, Codex from bgauryy/octocode. It costs 40 tokens per session (799 once invoked), scanned A, original, MIT.

A cleanup guide for safely removing unused code, duplicate helpers, debugging leftovers, and obsolete agent instructions or configuration. It checks references and consumers before deletion and verifies that behavior remains intact.

In plain words
What is it for?
Use it to find cleanup candidates, check public entry points and dynamic loading, preserve live interfaces, and group verified removals into reversible batches.
Why use it?
It reduces clutter without treating an empty search result as proof that code is safe to remove.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to find cleanup candidates, check public entry points and dynamic loading, preserve live interfaces, and group verified removals into reversible batches.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bgauryy/octocode/octocode-clean-agentic-code
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 bgauryy/octocode --skill octocode-clean-agentic-code
Clone the repo
git clone --depth 1 https://github.com/bgauryy/octocode

Made for: Claude Code, Codex.

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 octocode-clean-agentic-code

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/bgauryy/octocode/octocode-clean-agentic-code"><img src="https://agentmods.dev/badge/skills/bgauryy/octocode/octocode-clean-agentic-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 799 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.00040 $0.00799
Opus 5.5 $0.00016 $0.00320
Sonnet 5.5 $0.00008 $0.00160
Haiku 4.5 $0.00004 $0.00080

Measured today against content hash 466a9a2ff3e4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

octocode-clean-agentic-code 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 today.

The scan reads SKILL.md. This mod also ships 23 executable files (scripts/check-diff.mjs, scripts/coverage-diff.mjs, scripts/deps-usage.mjs, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/octocode-clean-agentic-code/SKILL.md · 24 lines

What it actually says

Octocode clean agentic code

  1. Record the requested scope, existing edits and affected checks before cleanup. Save each affected check's baseline report (JUnit XML, TAP, JSON, or a list of failing check names) and coverage report under <workspace>/.octocode/tmp/octocode-clean-agentic-code/; mark a blocked baseline. Skip the baselines when the request is report-only (no edits).
  2. List literal candidates with scan-signals: node <skill-folder>/scripts/scan-signals.mjs [paths] --diff <base> for the change (omit --diff to audit whole paths). Judge each JSON-line candidate with the reference below that names its signal; exit 1 only means rows were printed.
  3. For each candidate, check semantic references, public entry points, configuration, dynamic loading and external consumers. Use Octocode lspSearch references and exact localSearch reads. An empty search alone cannot justify deletion.
  4. Keep live contracts. Defer uncertain removals with the check that would settle them. Group proven removals into reversible batches, update their callers and regenerate derived files at their source. Flag authentication, authorization, deletion, billing and public API changes for human review. Explain any rewrite beyond the candidates, or a file where git diff --numstat shows more added than deleted lines (an untracked file counts as all added).
  5. Replay the affected checks and inspect the diff, then compare with the baseline: node <skill-folder>/scripts/check-diff.mjs <baseline> <after> (check-diff). Exit 1 means introduced holds failures your batch caused: revise the diagnosis or undo only your batch and report the blocker. Report missing checks as unverified; other fields: --help. Preserve existing edits and coverage floors.
Candidate Decision
Dead or duplicate code, checker suppressions, redundant types or dependencies Check the candidate's removal bar and preserve supported consumer behavior.
Comments, instructions or configuration Keep text and configuration with a parser, runtime or external consumer until its contract deliberately changes. For AI-writing tells, chat residue and placeholders, use writing tells. If cleaner wording changes agent behavior, use octocode-agentic. For skill packaging or activation, use octocode-skills.
Agent leftovers or defects Report error masking, reachable stubs and unverified dependencies as SBAR blockers. Keep these out of removal batches. Redact exposed credentials and report them for rotation.
Weak tests or grader gaming, test debt or replacement tests Report confirmed gaming as an SBAR blocker. Preserve the behavioral oracle and coverage floors. Never hide a failure by weakening a check or widening a mask.

Keep defects requiring behavior changes separate from the cleanup. Use octocode-engineer for unresolved design choices.

Report removals, deferrals and checks, including baseline failures and unrun checks. Finish when the diff contains only authorized changes and the affected checks support preserved behavior, or identify what blocked verification. Run the renderer for requested HTML.

Files

What ships with it

47 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. today First seen · 24 lines · 40 tokens per session scan A 466a9a2ff3e4

Subscribe to this mod's changes

octocode-clean-agentic-code is a skill published in the GitHub repository bgauryy/octocode (971 stars, last pushed today), licensed MIT. It adds 40 tokens to every session and 799 once invoked, about $0.0002 per session on Opus 5.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-12-01.

Related

octocode-clean-agentic-code compared with skills from other repositories

octocode-clean-agentic-code next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
octocode-clean-agentic-codebgauryy/octocodeSkill971todayMITA40Claude Code, Codex
code-review-webrampstackco/claude-skillsSkill1.1k15d agoMITA121Claude Code
review-rfcnurettincoban/ai-prd-workflowSkill31713d agoMITA32Claude Code
logic-lensskillmds/skillmdSkill14222d agoMITA37Claude Code
cli-audit-codeDestynova2/cli-code-skillsSkill67d agoMITA92Claude Code
coding-assistantchinkan/RustFoxSkill15yesterdayMITA13Claude Code, Codex
reviewAcKeskin/contextureSkill2todayMITA103Claude Code