same-results-less-code

same-results-less-code is a skill for Claude Code, Codex from pproenca/dot-skills. It costs 118 tokens per session (2,838 once invoked), scanned A, original, MIT.

A code-review and refactoring guide for making code shorter and clearer while keeping its behaviour unchanged.

In plain words
What is it for?
It helps review, simplify, and refactor existing code without changing its outputs, errors, side effects, or public interfaces.
Why use it?
It helps find duplication, unnecessary abstractions, derived state, and defensive code that linters usually cannot judge.

Skill for Claude CodeCodex

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

Good fit It helps review, simplify, and refactor existing code without changing its outputs, errors, side effects, or public interfaces.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pproenca/dot-skills/same-results-less-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 pproenca/dot-skills --skill same-results-less-code
Clone the repo
git clone --depth 1 https://github.com/pproenca/dot-skills

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 same-results-less-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/pproenca/dot-skills/same-results-less-code/github.svg)](https://agentmods.dev/skills/pproenca/dot-skills/same-results-less-code)
Your own site
<a href="https://agentmods.dev/skills/pproenca/dot-skills/same-results-less-code"><img src="https://agentmods.dev/badge/skills/pproenca/dot-skills/same-results-less-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 same-results-less-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/pproenca/dot-skills/same-results-less-code"><img src="https://agentmods.dev/badge/skills/pproenca/dot-skills/same-results-less-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 118 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,838 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00118 $0.02838
Opus 5 $0.00059 $0.01419
Sonnet 5 $0.00024 $0.00568
Haiku 4.5 $0.00012 $0.00284

Measured 5d ago against content hash 31892296c3ab, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

same-results-less-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 5d ago.

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/.experimental/same-results-less-code/SKILL.md · 149 lines

How it starts

The opening of the file, as written. The whole thing — 149 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Community Refactoring Best Practices: Same Results, Less Code

Code-review and refactoring guide focused on the parts of code volume that come from judgment and modelling gaps — wrong abstraction choices, hidden semantic duplication, defensive habits, premature generality. This skill deliberately skips what linters and tools like knip, eslint, ruff, tsc --noUnusedLocals, or formatters already catch. It is the second pass: after the mechanical cleanup, what remains?

Core Principles

  1. Preserve behaviour. Every transformation must produce identical observable behaviour — same outputs, same errors, same side effects, same API surface.
  2. Earlier mistakes cascade. A wrong frame multiplies into wrong shapes, which multiply into duplicate logic. Optimise from the top of the lifecycle.
  3. Explain why, not just what. Each rule explains the cost of the anti-pattern so judgment can transfer to novel cases.
  4. Quantify where possible. Prefer "eliminates N lines / prevents X bug class" over "cleaner."
  5. Don't over-refactor. Rule of three: extract abstractions when duplication has actually appeared three times, not in anticipation.

When to Apply

Use this skill when:

  • Reviewing a PR for "could this be simpler?" (the question linters can't answer)
  • Refactoring code that has grown in volume without growing in capability
  • Auditing a module that "feels heavy" — many flags, many layers, many checks
  • Onboarding to an unfamiliar codebase and trying to spot the parts that are accidental volume vs essential complexity
  • Designing a new module and wanting to avoid the common over-abstraction traps
  • Working alongside knip / eslint / ruff and wanting the layer of judgment those tools can't supply

Don't use this skill for:

  • Mechanical cleanup that a linter or formatter already does (unused imports, dead exports, style) — use knip, eslint, ruff, or prettier/black instead.
  • Algorithmic complexity / performance tuning — use complexity-optimizer for that.
  • General cleanup of recently modified code regardless of mental-model gaps — use code-simplifier.

Read the full file on GitHub · 149 lines

Files

What ships with it

45 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. 5d ago First seen · 149 lines · 118 tokens per session scan A 31892296c3ab

Subscribe to this mod's changes

same-results-less-code is a skill published in the GitHub repository pproenca/dot-skills (205 stars, last pushed 24d ago), licensed MIT. It adds 118 tokens to every session and 2,838 once invoked, about $0.0006 per session on Opus 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-09-03.