simplify

simplify is a skill for Claude Code from marcoguillermaz/Tierward. It costs 0 tokens per session (572 once invoked), scanned A, original, MIT.

A scan of changed source files for patterns that make code harder to read, such as deep nesting, repeated local logic, unused code, and fixed values hidden in the code.

In plain words
What is it for?
It helps flatten nested conditions, extract repeated helpers, simplify conditionals, and remove dead code in changed files.
Why use it?
It points out small, low-risk refactors that can make recently changed code easier to understand and maintain.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter.

Part of the tierward plugin — 29 skills, 1 command, 1 hook, 1 MCP server shipped together

Good fit It helps flatten nested conditions, extract repeated helpers, simplify conditionals, and remove dead code in changed files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/marcoguillermaz/tierward/simplify
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 marcoguillermaz/Tierward --skill simplify
Clone the repo
git clone --depth 1 https://github.com/marcoguillermaz/Tierward

Made for: Claude Code.

Or install tierward, the plugin that ships this one along with the rest of its 29 skills, 1 command, 1 hook, 1 MCP server.

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 simplify

README.md
[![agentmods](https://agentmods.dev/badge/skills/marcoguillermaz/tierward/simplify.svg)](https://agentmods.dev/skills/marcoguillermaz/tierward/simplify)
Your own site
<a href="https://agentmods.dev/skills/marcoguillermaz/tierward/simplify"><img src="https://agentmods.dev/badge/skills/marcoguillermaz/tierward/simplify.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 572 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.
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.00000 $0.00572
Opus 5 $0.00000 $0.00286
Sonnet 5 $0.00000 $0.00114
Haiku 4.5 $0.00000 $0.00057

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

Security

Grade A, and why

simplify 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 7d 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.

packages/cli/templates/tier-l/.claude/skills/simplify/SKILL.md · 68 lines

How it starts

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

Applicability

Run on files changed in the current block after writing (Phase 2). Skip for trivial 1-file changes with <20 lines modified.

Input: the user invokes /simplify optionally followed by file paths. If no paths given, use git diff --name-only HEAD to find changed files. Filter to source files only (skip config, docs, generated files).


Step 1 - Scan each file for simplification opportunities

For every source file in scope, check these 6 patterns:

S1 - Early returns

Nested if/else where the else (or if) branch is a short return, throw, or continue. Invert the condition and return early to flatten the block.

S2 - Nesting depth

Any block nested >3 levels deep. Extract the inner logic into a named function, or apply guard clauses (S1) to reduce depth.

S3 - Local duplication

Two or more blocks within the same file that repeat the same logic (>3 lines identical or near-identical). Extract into a local helper.

S4 - Conditional simplification

  • Ternaries nested inside ternaries
  • Boolean expressions that can collapse (if (x) return true; return false;return x;)
  • Switch/match with identical arms that can be merged

S5 - Dead code

  • Unreachable code after return/throw/break
  • Commented-out code blocks (>3 lines)
  • Unused local variables, parameters, or imports (only flag if confidence is high)

S6 - Magic values

Repeated literal values (strings, numbers) used >2 times in the same file. Extract to a named constant at file/module scope.


Step 2 - Apply fixes

For each finding:

  1. Apply the simplification directly using the Edit tool.
  2. Keep changes minimal - do not restructure surrounding code.
  3. Preserve existing tests - if a rename would break imports, skip it.

Step 3 - Summary

Output a compact summary:

/simplify - [N] files scanned, [M] changes applied

| File | Change | Pattern |
|---|---|---|
| path/to/file.ext | description of change | S1/S2/S3/S4/S5/S6 |

If no changes needed: /simplify - [N] files scanned, all clean ✓

Read the full file on GitHub · 68 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. 7d ago First seen · 68 lines · 0 tokens per session scan A 6a107e2cf574

Subscribe to this mod's changes

simplify is a skill published in the GitHub repository marcoguillermaz/Tierward (4 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 572 tokens. 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-31.