shrinkray
Shrinks repositories while preserving behavior by removing dead code, duplication, and verbosity with measured verification.
Skill by 0xdewy
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/0xdewy-shrinkray
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/shrinkray
What's inside
- Skill name
shrinkray- Description
- Shrinks repositories while preserving behavior by removing dead code, duplication, and verbosity with measured verification. Only use when explicitly requested.
- License
- MIT
- Instructions
- 79 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (8)
- SKILL.md
- evals.json · evals/
- subagent-prompts.md · references/
- deadcode_scan.py · scripts/
- dependency_index.py · scripts/
- detect_runner.py · scripts/
- less_code_pass.py · scripts/
- measure_loc.py · scripts/
SKILL.md (first lines)
# Shrinkray
Reduce repository size while preserving behavior. Prefer direct edits for a
small target; use agents only when evidence identifies independent bloat
categories that benefit from parallel work.
Size and dead-code work only; bug, security, and architecture cleanup is
`code-smellz`, and build minification is not this skill. Load
`../common/patterns/execution-contract.md`,
`../common/patterns/quarantine-loop.md`, and
`../common/patterns/scaling.md`. Use `references/subagent-prompts.md` only when
dispatching a role.
## Modes
- `--quick`: deterministic pass, then directly apply clear dead-code and
verbosity findings. No agent budget.
- `--standard`: dispatch the 2-3 primary roles justified by evidence once.
Budget: 3.
- `--thorough`: add structural roles, use propose-then-implement, and repeat
the shared loop to convergence. Budget cap: 5.
Default non-interactive runs to `--standard`; use `--quick` for an obviously
small target.
## Evidence passes
After Phase 0 captures baseline LOC and tests, run these before dispatch:
1. **Phase 0.4:** run
`scripts/less_code_pass.py <WORKSPACE> <WORKSPACE>`. For Python,
JavaScript, TypeScript, and Rust it invokes `less-code` (`lc`), which applies
and verifies transformations with its own frozen-suite/API/doc gates and
reverts a failing layer. Pass `--test-command` when runner detection has
high confidence so it uses the Phase 4 suite. The tool and supported
language are optional; record a skip reason and continue when `ran` is
false. Record `total_loc_removed` and per-language `tests_ok` from
`less_code_pass.json`. Do not send its already-applied changes through agent
triage or `git apply`.
2. **Phase 0.5:** run `scripts/deadcode_scan.py` and
`scripts/dependency_index.py` on the resulting tree. The first combines
language dead-code tools and type checking. The second records caller and
importer counts, including single-caller symbols, single-importer files,
and single-implementor interfaces.
Use `../common/scripts/detect_runner.py` and `measure_loc.py` for runner and
measurement support. The deterministic pass runs in every mode because it
spends no agent budget.
## Roles and application
Primary roles verify and apply evidence-backed candidates: Dead Code Hunter,
Ghost File Hunter, Verbosity Reducer, and Code Consolidator. Thorough mode may
also use structural roles for standard-library replacement, indirection
inlining, table-driven conversion, shipped-flag removal, and module merging.
Structural roles first propose candidates from the dependency index; the
orchestrator selects proposals before implementation.
Each agent is read-only and writes one findings JSON file; structural roles
also write one proposal JSON. Findings use:
```text
{id, category, file, lines, description, estimated_loc_saved, confidence, source_tool, patch}
```
Use `lines: "all"` for ghost files and categories `dead_code`, `ghost_file`,
`consolidate`, or `verbosity`. Apply ghost files, dead code, consolidation,
then verbosity. Weight tool-certified findings above model-only findings.
Phase 0.4 output is exempt because `lc` applies and verifies its own changes.
Run the shared type-check and test gates after edits. For the second minimizer
pass, re-run `scripts/deadcode_scan.py` on each changed file and feed new
findings into the same iteration's triage. Finish with:
```text
DONE: <WORKSPACE> — <lines> lines removed across <iterations> iterations (-<pct>% LOC)
```From 0xdewy/skills, MIT.
More from 0xdewy/skills
- 0.570score
agentify
0xdewy
Maps git-tracked code with a ranked outline, scoped expansion, and symbol or call-site XREFs.
SkillAFreshness: AClaude Code +9 - 0.570score
audit-debian-server
0xdewy
Audit, harden, and monitor Debian or Ubuntu application servers.
SkillAFreshness: AClaude Code +9 - 0.570score
code-smellz
0xdewy
Finds and fixes repository-wide correctness, security, architecture, and maintainability problems with bounded review.
SkillAFreshness: AClaude Code +9 - 0.570score
frontend-qa
0xdewy
Drives a local web app in a headless browser to find and fix functional failures and visual defects, then proves each fix with a re-run.
SkillAFreshness: AClaude Code +9 - 0.570score
git-show
0xdewy
Visualize repository fleets, PR stacks, and local work in an interactive HTML dashboard or compact text tree.
SkillAFreshness: AClaude Code +9 - 0.570score
rust-evm
0xdewy
Low-level EVM, Rust, and Foundry reference for revm, forge/cast/anvil, bytecode, opcodes, traces, calldata, storage, gas, Yul/assembly, evmole, CREATE2…
SkillAFreshness: AClaude Code +9 - 0.570score
spec-reconciler
0xdewy
Reconciles source-anchored claims across schemas, code, tests, docs, and generated clients using declared authority.
SkillAFreshness: AClaude Code +9 - 0.570score
student-counsel
0xdewy
A Student does the work and Socrates examines it by elenchus until the work can answer every question without contradiction, or the round cap lands.
SkillAFreshness: AClaude Code +9 - 0.570score
vfs-docs
0xdewy
Builds self-describing docs/ trees where directory shape and filenames carry the meaning, so an agent orients from `tree docs/` alone.
SkillAFreshness: AClaude Code +9 - 0.570score
invariant-miner
0xdewy
Mines evidence-backed invariants and falsifies them with generative tests, shrinking reproducible counterexamples.
SkillAFreshness: AClaude Code +9 - 0.570score
llm-providers
0xdewy
Developer reference for connecting to OpenAI, Anthropic, Gemini, DeepSeek, GLM, MiniMax, MiMo, Mistral, xAI, Qwen, Kimi, Cohere, OpenRouter, Together, and…
SkillAFreshness: AClaude Code +9 - 0.570score
pr-describe
0xdewy
Writes or rewrites a pull request's title and description so a reader with no context understands why, what changed, and how to verify it.
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 2
- Last commit (this folder)
- Oct 11, 2026 (17 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/0xdewy/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from 0xdewy
- 0.570score
audit-debian-server
0xdewy
Audit, harden, and monitor Debian or Ubuntu application servers.
SkillAFreshness: AClaude Code +9 - 0.570score
agentify
0xdewy
Maps git-tracked code with a ranked outline, scoped expansion, and symbol or call-site XREFs.
SkillAFreshness: AClaude Code +9 - 0.570score
frontend-qa
0xdewy
Drives a local web app in a headless browser to find and fix functional failures and visual defects, then proves each fix with a re-run.
SkillAFreshness: AClaude Code +9 - 0.570score
git-show
0xdewy
Visualize repository fleets, PR stacks, and local work in an interactive HTML dashboard or compact text tree.
SkillAFreshness: AClaude Code +9 - 0.570score
code-smellz
0xdewy
Finds and fixes repository-wide correctness, security, architecture, and maintainability problems with bounded review.
SkillAFreshness: AClaude Code +9 - 0.570score
invariant-miner
0xdewy
Mines evidence-backed invariants and falsifies them with generative tests, shrinking reproducible counterexamples.
SkillAFreshness: AClaude Code +9
Cite this page
shrinkray skill. Agent Mart. https://agentmart.dev/skills/0xdewy-shrinkray (last updated 2026-10-24)