shrinkray
Shrinks repositories while preserving behavior by removing dead code, duplication, and verbosity with measured verification.
Skill by 0xdewy
Chalk Labs
Need help deploying shrinkray?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
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
Clean a repository without changing intended behavior. Never commit.
Load `../common/patterns/execution-contract.md` and
`../common/patterns/scaling.md`. Load `references/subagent-prompts.md` only
when dispatching a role.
## Focus
- `--focus size` (default): dead code, unreferenced files, duplication,
verbosity.
- `--focus correctness`: real defects, plus localized structural fixes with a
measurable gain.
- `--focus security`: reachable vulnerabilities and high or critical reachable
dependency advisories (`npm audit`, `pip-audit`, `cargo audit`,
`govulncheck` when installed).
- `--focus all`: all three.
Not this skill: build minification, a findings-only review (`red-team`), a
PR or diff review (`pr-smellz`), or one obvious fix (just make it).
Work directly by default. Dispatch the focus's roles only when the target is
too large for one context: `--standard` 1-3 roles chosen from the evidence,
`--thorough` adds the size structural roles. Cap 5 iterations.
## Loop
1. **Setup.** Resolve `WORKSPACE` and read the project goal from its README
or manifest. Run `git status --short`; outside git,
warn and snapshot files before editing. Detect the runner with
`scripts/detect_runner.py`, measure LOC with `scripts/measure_loc.py`, and
run the tests once as the baseline. Record all of it in `session.json`.
2. **Evidence.** Run `scripts/less_code_pass.py <repo> <WORKSPACE>`
(add `--test-command` when the runner is certain). `lc` applies and
verifies its own changes; record `total_loc_removed`, or the skip reason
when `ran` is false. Then run `scripts/deadcode_scan.py` and
`scripts/dependency_index.py` with the same arguments. A missing tool is
recorded, not fatal. Every focus uses these as leads.
3. **Find.** Review directly or dispatch roles. Findings are JSON:
`{id, category, file, lines, description, evidence, confidence, source_tool}`.
Rank tool-certified findings above model-only ones.
4. **Triage.** Drop low confidence. Where findings overlap, keep the larger
gain. Flag public-API changes for human review instead of applying. Write
`STAGED_CHANGES.md` before any edit. Nothing left: go to the report.
5. **Apply.** Order: correctness, security, unreferenced files, dead code,
consolidation, verbosity. For each change, edit, save that change's diff
to `WORKSPACE/changes/<id>.patch`, run the cheapest check (type checker,
`py_compile`, `node --check`), and reverse the patch if it adds errors.
6. **Verify.** Run the full suite and available type-check and lint gates.
On failure, reverse this iteration's patches newest first until green. If
a reverse fails, stop and report the touched files and failed command.
7. **Repeat** from step 2 until a rescan finds no high or medium findings,
fewer than 2 changes survive an iteration, or 5 iterations ran. Flag the
run unstable when most of an iteration's changes were reverted.
## Report
LOC and test results before and after, changes kept and reverted per
category, and items left for human review. Tell the user to review
`git diff` and commit themselves. End with:
```text
DONE: <WORKSPACE> — <kept> changes across <iterations> iterations, -<lines> LOC (-<pct>%), verification <passed|partial|blocked>
```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 (20 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
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get shrinkray running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
shrinkray skill. Agent Mart. https://agentmart.dev/skills/0xdewy-shrinkray (last updated 2026-10-24)