AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Razor

skill-blader-razor-razor · by blader

Minimize local diff size against merge base for uncommitted branch work using only behavior-preserving, scope-preserving architectural reductions.

No reviews yet
0 installs
33 views
0.0% view→install

Install

$ agentstack add skill-blader-razor-razor

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-blader-razor-razor)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
7mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Razor? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

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 HEAD) (origin/latest by 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:
  1. Primary: reduce non-comment insertions.
  2. Secondary: reduce non-comment total churn.
  • Optimize at PR architecture level first:
  1. Identify duplication and redundant abstractions spanning multiple files/components.
  2. Prefer ideas that remove whole cross-file patterns or flows, not local line edits.
  3. 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.MD every 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

  1. Establish base and merge base.
  2. Measure unified diff (status, numstat, name-status, untracked files, untracked code lines).
  3. Compute baseline metrics:
  • insertions
  • deletions
  • total churn
  • comment-line additions (reported separately, not targeted)
  1. 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" -- hunks.
  1. 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.
  1. Write/update TRIM_CODEX.MD with:
  • 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 cuts vs local cleanup (local cleanup only when no higher-impact architectural cuts remain).
  • Ordered execution sequence and validation gates.
  • Iteration history.
  1. Apply viable behavior-preserving ideas.
  2. Format touched files.
  3. Run targeted validation.
  4. Re-measure and refresh TRIM_CODEX.MD with before/after metrics and applied/skipped status.
  5. Rerun fresh planning on the updated tree.

Output contract

Always return:

  1. Base ref and merge-base SHA.
  2. Before stats and after stats (insertions, deletions, churn).
  3. Primary and secondary percent reductions.
  4. Comment-line additions count (reported separately).
  5. Ranked behavior-preserving ideas and applied changes.
  6. Confirmation TRIM_CODEX.MD was refreshed this iteration.
  7. Confirmation every diff file was fully read this iteration.
  8. Explicit statement whether any additional behavior-preserving, scope-preserving reductions remain after fresh rerun.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.