blader/razor/blader-razor
Claude Code and agent skill by blader/razor
- community
Checking that the SKILL.md file is still in the repository.
Minimize local diff size against merge base for uncommitted branch work using only behavior-preserving, scope-preserving architectural reductions.
Install
npx vskill@latest install blader/razor/blader-razorSKILL.md
Razor
Reduce local diff size with merge-base-anchored architectural planning and behavior-preserving execution only.
Core Iteration Directive
On every iteration, follow this exact directive:
"Deeply analyze this implementation across the entire PR (not file-by-file in isolation), and create a detailed plan called TRIM_CODEX.MD with the most impactful architectural ideas to dramatically reduce the total size of this PR, without reducing scope or behavior. Comments do not count."
Non-negotiables
- Always anchor to merge base:
MB=$(git merge-base <base-ref> HEAD)(origin/latestby default). - Use unified working-tree diff only:
git diff "$MB". - Include untracked code-file lines in insertion totals.
- Only propose/apply behavior-preserving, scope-preserving reductions.
- Never generate functionality-loss or scope-reduction options.
- Do not remove/trim comments or doc-comments. Comment lines do not count toward reduction targets.
- Keep optimization priority:
- Primary: reduce non-comment insertions.
- Secondary: reduce non-comment total churn.
- Optimize at PR architecture level first:
- Identify duplication and redundant abstractions spanning multiple files/components.
- Prefer ideas that remove whole cross-file patterns or flows, not local line edits.
- Treat file-local cleanups as fallback only after high-impact PR-wide ideas are exhausted.
- Read every line of every file in the diff on every iteration.
- Update
TRIM_CODEX.MDevery iteration before execution, then refresh after re-measurement. - Run formatting on touched files and run targeted validation each pass.
- Never use destructive git commands.
Workflow
- Establish base and merge base.
- Measure unified diff (
status,numstat,name-status, untracked files, untracked code lines). - Compute baseline metrics:
- insertions
- deletions
- total churn
- comment-line additions (reported separately, not targeted)
- Full-diff read (mandatory):
- For each file in
git diff --name-status "$MB", read full current file contents. - For modified files, also review
git diff "$MB" -- <file>hunks.
- Deep architectural analysis:
- Identify structural duplication and avoidable abstraction layers across the full PR surface.
- Map cross-file data/control flow to find consolidation cuts that remove entire repeated paths.
- Rank ideas by expected PR-wide churn reduction; prioritize multi-file high-leverage cuts.
- Write/update
TRIM_CODEX.MDwith:
- Goal and invariants.
- Merge-base baseline and divergence.
- Runtime/test hotspot ranking.
- Architectural diagnosis of churn drivers.
- Ranked behavior-preserving architectural ideas with explicit PR-wide scope (estimated insertion/churn savings, risk, validation notes).
- Clear separation of
PR-wide architectural cutsvslocal cleanup(local cleanup only when no higher-impact architectural cuts remain). - Ordered execution sequence and validation gates.
- Iteration history.
- Apply viable behavior-preserving ideas.
- Format touched files.
- Run targeted validation.
- Re-measure and refresh
TRIM_CODEX.MDwith before/after metrics and applied/skipped status. - Rerun fresh planning on the updated tree.
Output contract
Always return:
- Base ref and merge-base SHA.
- Before stats and after stats (insertions, deletions, churn).
- Primary and secondary percent reductions.
- Comment-line additions count (reported separately).
- Ranked behavior-preserving ideas and applied changes.
- Confirmation
TRIM_CODEX.MDwas refreshed this iteration. - Confirmation every diff file was fully read this iteration.
- Explicit statement whether any additional behavior-preserving, scope-preserving reductions remain after fresh rerun.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingSKILL.md
Popularity
- Repository stars
- 14
- Repository forks
- 1
- 7-day trend score
- 14
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 8 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/blader/razor/blader-razor)