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.
npx agentmods add skills/jmxt3/gitscape.ai/code-simplificationnpx skills add jmxt3/gitscape.ai --skill code-simplificationgit clone --depth 1 https://github.com/jmxt3/gitscape.aiWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00051 | $0.01635 |
| Opus 5 | $0.00026 | $0.00817 |
| Sonnet 5 | $0.00010 | $0.00327 |
| Haiku 4.5 | $0.00005 | $0.00163 |
Grade A, and why
code-simplification 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 219 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Code Simplification
Overview
Reduce complexity while preserving exact behavior. The goal is code that a new engineer can read and understand without asking the author questions. Simplification is not optimization — do not change performance characteristics unless that is the explicit goal.
When to Use
- Code works but is harder to read than it should be
- A function is doing more than one thing
- Nested conditionals make the control flow hard to follow
- Variable names are generic (
data,result,temp) - The same logic appears in multiple places
- A reviewer needed to ask what the code does
When NOT to use: Code that is intentionally complex for performance reasons (document with a comment instead of simplifying).
The Chesterton's Fence Rule
"Don't remove a fence you don't understand."
Before simplifying any code, answer: why was it written this way? If you can't answer that, you risk removing a safeguard. Read the git history, grep for related tests, and understand the intent before changing anything.
The Simplification Process
Step 1: Understand Before Touching
- Read the function end-to-end
- Read its callers — what do they expect?
- Read its tests — what behavior is verified?
- Check git history:
git log -p -- path/to/file.py - Do not change anything yet
Step 2: Cover First
If the code lacks tests, add tests before simplifying. You need a safety net:
def test_generate_skill_name_sanitizes_input():
assert generate_skill_name("my repo") == "my-repo"
assert generate_skill_name("My Repo!") == "my-repo"
assert generate_skill_name(" spaces ") == "spaces"
Run them, confirm they pass. Now you can simplify safely.
Step 3: Apply Simplifications Incrementally
Apply one simplification at a time, running tests after each:
Deep Nesting → Guard Clauses
# BAD: Pyramid of doom
def process_skill(skill):
if skill is not None:
if skill.get("name"):
if len(skill["name"]) > 0:
return skill["name"].lower()
return None
return None
# GOOD: Guard clauses
def process_skill(skill):
if not skill:
return None
if not skill.get("name"):
return None
return skill["name"].lower()
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.
- 2d ago First seen · 219 lines · 51 tokens per session scan A f4cdfd29edb0
code-simplification is a skill published in the GitHub repository jmxt3/gitscape.ai (33 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 51 tokens to every session and 1,635 once invoked, about $0.0003 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-08-30.
Other skills, from other repositories
issue-triage
Issue triage: audit open issues, categorize, detect duplicates, cross-ref PRs, risk assessment, post comments. Args: "all" for deep analysis of all, issue numbers to focus (e.g. "42 57"), "en"/"fr" for language, no arg = audit only in French.
issue
Use when starting a chain from a GitHub issue — turning an issue URL or number into a triaged, planned, dispatched, and reviewed pull request. Classifies the thread (bug → root-cause discipline, feature → plan chain, question → drafted reply), synthesizes a spec from the issue's own acceptance criteria, then runs the…
github-secret-hunting
Find leaked API keys, tokens, and credentials in public GitHub repositories.
toolset-design
Design and validate new MCP toolsets, tools, and tool changes. Use when planning a new toolset, adding tools to an existing toolset, reviewing a toolset PR, or deciding whether a new tool is warranted. Covers the full lifecycle: eval-first validation, tool design methodology, consolidation patterns, and review…
github
GitHub operations via gh CLI: issues, PRs, CI runs, code review, API queries.
a11y-remediate
Use to produce a leader-facing remediation proposal from one or more /a11y-audit outputs plus team and product context. Translates audit findings into sprint plans, staffing asks, customer-facing language, compliance rollups, and critical-path analysis. Refuses to fabricate numbers, owners, or commitments beyond the…