code-simplify

code-simplify is an agent for Claude Code from shashankswe2020-ux/whoop-mcp. It costs 33 tokens per session (780 once invoked), scanned B, original, MIT.

A code-refactoring agent that makes existing code easier to read and maintain without changing what it does. It works in small steps and checks the tests after each change.

In plain words
What is it for?
Use it to clean up recently changed code, simplify long or deeply nested functions, improve names and structure, and check that refactoring has not weakened tests or security-sensitive code.
Why use it?
It reduces tangled logic, duplication, and unnecessary complexity while helping protect existing behavior.

Agent for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions CLAUDE.md; mentions subagents.

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.

agentmods
npx agentmods add agents/shashankswe2020-ux/whoop-mcp/code-simplify
Clone the repo
git clone --depth 1 https://github.com/shashankswe2020-ux/whoop-mcp

Made for: Claude Code.

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 code-simplify

README.md
[![agentmods](https://agentmods.dev/badge/agents/shashankswe2020-ux/whoop-mcp/code-simplify.svg)](https://agentmods.dev/agents/shashankswe2020-ux/whoop-mcp/code-simplify)
Your own site
<a href="https://agentmods.dev/agents/shashankswe2020-ux/whoop-mcp/code-simplify"><img src="https://agentmods.dev/badge/agents/shashankswe2020-ux/whoop-mcp/code-simplify.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 780 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
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.00033 $0.00780
Opus 5 $0.00016 $0.00390
Sonnet 5 $0.00007 $0.00156
Haiku 4.5 $0.00003 $0.00078

Measured 6d ago against content hash 2ceaef386418, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade B, and why

code-simplify scanned grade B with 1 finding 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 6d 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.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

tools: ["*"]
.github/agents/code-simplify.agent.md · 104 lines

How it starts

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

Code Simplify Agent

You are a senior engineer focused on reducing code complexity without changing behavior. You simplify incrementally, verifying tests pass after every change.


Skills

Use these skills (invoke with the skill tool) during your workflow:

Skill Use when…
code-simplification Primary skill — guides the simplification process
code-review-and-quality Validating the result after simplifications are applied

Available Sub-Agents

Agent Dispatch when…
code-reviewer After simplification — review the changes for correctness
security-auditor Simplification touches auth, token handling, or input validation
test-engineer Need to verify test coverage still adequate after refactoring

Workflow

When asked to simplify code, follow these steps in order:

Step 1: Understand the Scope

  1. Read CLAUDE.md or .github/copilot-instructions.md for project conventions
  2. Identify the target code — recent changes unless a broader scope is specified
  3. Understand the code's purpose, callers, edge cases, and test coverage

Step 2: Identify Opportunities

Invoke the code-simplification skill, then scan for:

  • Deep nesting in tool handlers → guard clauses or early returns
  • Long functions → split by responsibility (e.g., separate URL building from API calling)
  • Duplicated query-param construction across tools → shared helper in src/api/
  • Duplicated error handling patterns → use the safeTool wrapper consistently
  • Nested ternaries → if/else or switch
  • Generic names → descriptive names matching WHOOP domain (e.g., datarecoveryRecords)
  • Dead code → remove after confirming no callers
  • Unused imports → remove
  • Complex type assertions → proper type narrowing with Zod

Read the full file on GitHub · 104 lines

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. 6d ago First seen · 104 lines · 33 tokens per session scan B 2ceaef386418

Subscribe to this mod's changes

code-simplify is an agent published in the GitHub repository shashankswe2020-ux/whoop-mcp (149 stars, last pushed yesterday), licensed MIT. It adds 33 tokens to every session and 780 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

pb-sync-reviewer

Reviews changes under lib/sync/, import/export, and MCP task write paths against the documented PocketBase v0.23+ gotchas plus prior Codex adversarial data-loss findings. Read-only. Use after editing pb-sync-engine, pb-realtime, pb-auth, task-mapper, sync-coordinator, import/export, or MCP task write handlers.

vscarpenter/gsd-task-manager · 76 tokens

a11y-reviewer

Reviews changed React components against the WCAG AA baseline defined in coding-standards.md Part 2. Read-only — returns findings, does not rewrite code. Use after editing any .tsx/.jsx file in components/ or app/.

vscarpenter/gsd-task-manager · 53 tokens

builder

The local scheduled builder is disabled. scripts/builder-run.sh is an inert tombstone and .claude/commands/build-next.md refuses all issue and repository operations.

vscarpenter/gsd-task-manager · 0 tokens

night-shift

The scheduled night shift no longer executes pull-request code. With GSDTRIAGEBOTLOGIN configured, scripts/triage-run.sh may perform read-only discovery of failing claude/ pull requests, but it never creates a worktree, checks out a head, invokes Claude, or runs branch-controlled build tools.

vscarpenter/gsd-task-manager · 0 tokens

domain

How the engineering skills should consume this repo's domain documentation when exploring the codebase.

vscarpenter/gsd-task-manager · 0 tokens

triage-labels

The skills speak in terms of five canonical triage roles. This file maps those roles to the actual label strings used in this repo's issue tracker.

vscarpenter/gsd-task-manager · 0 tokens