simplify-code

simplify-code is a skill for Claude Code from DDS-Solutions/AI-TadPole-OS. It costs 32 tokens per session (1,014 once invoked), scanned A, a copy of simplify-code, MIT.

A guide to making complicated code easier to understand by removing unnecessary abstractions, dead code, deep nesting, and indirect logic while keeping its behaviour.

In plain words
What is it for?
Use it during refactoring to simplify wrappers, factories, interfaces, configuration objects, and other structures that add complexity without clear benefit.
Why use it?
It reduces the mental effort needed to read, change, and maintain code.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it during refactoring to simplify wrappers, factories, interfaces, configuration objects, and other structures that add complexity without clear benefit.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dds-solutions/ai-tadpole-os/simplify-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 DDS-Solutions/AI-TadPole-OS --skill simplify-code
Clone the repo
git clone --depth 1 https://github.com/DDS-Solutions/AI-TadPole-OS

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/dds-solutions/ai-tadpole-os/simplify-code/github.svg)](https://agentmods.dev/skills/dds-solutions/ai-tadpole-os/simplify-code)
Your own site
<a href="https://agentmods.dev/skills/dds-solutions/ai-tadpole-os/simplify-code"><img src="https://agentmods.dev/badge/skills/dds-solutions/ai-tadpole-os/simplify-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 simplify-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/dds-solutions/ai-tadpole-os/simplify-code"><img src="https://agentmods.dev/badge/skills/dds-solutions/ai-tadpole-os/simplify-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,014 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 91% copy Near-identical to another mod 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.00032 $0.01014
Opus 5 $0.00016 $0.00507
Sonnet 5 $0.00006 $0.00203
Haiku 4.5 $0.00003 $0.00101

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

Security

Grade A, and why

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

Origin

This is a copy

91% identical to simplify-code — 9 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agent/skills/simplify-code/SKILL.md · 138 lines

How it starts

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

[!IMPORTANT] AI Context & Knowledge Heritage

  • Subsystem: Agent Skills Registry / simplify-code
  • Architecture: @docs ARCHITECTURE:Documentation
  • Failure Path: Information drift, legacy terminology, or documentation mismatch.
  • Observability: Traceability via execution/parity_guard.py ([SKILL])

Simplify Code — Reduce Unnecessary Complexity

The best code is the code you don't have to write. The second best is the code anyone can read.

Core Principle

Complexity is a cost. Every abstraction, every indirection, every clever pattern
adds cognitive load. Simplify ruthlessly unless complexity serves a clear purpose.

Simplification Checklist

1. Unnecessary Abstractions

Smell Simplification
Wrapper class that just delegates Remove wrapper, use the inner class directly
Factory that creates only one type Replace with direct constructor
Strategy pattern with one strategy Replace with simple function
Interface with one implementation Remove interface, use the class
Abstract class with one child Merge into the child class
Config object for 2 values Use function parameters

2. Dead Code

Smell Action
Unused imports Remove
Unreachable branches Remove (check tests first)
Commented-out code Remove (it's in git history)
Unused variables/functions Remove
TODO comments older than 6 months Remove or create issue
Feature flags for launched features Remove flag, keep the code

3. Deep Nesting

// ❌ Before: 4 levels deep
function process(data) {
  if (data) {
    if (data.items) {
      for (const item of data.items) {
        if (item.active) {
          doSomething(item)
        }
      }
    }
  }
}

// ✅ After: Early returns + filter
function process(data) {
  if (!data?.items) return

  data.items
    .filter(item => item.active)
    .forEach(doSomething)
}

4. Over-Parameterized Functions

// ❌ Before: 8 parameters
function createUser(name, email, age, role, dept, active, verified, avatar) { }

// ✅ After: Object parameter
function createUser(opts: CreateUserOpts) { }

Read the full file on GitHub · 138 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 · 138 lines · 32 tokens per session scan A 97abc32866a0

Subscribe to this mod's changes

simplify-code is a skill published in the GitHub repository DDS-Solutions/AI-TadPole-OS (8 stars, last pushed yesterday), licensed MIT. It adds 32 tokens to every session and 1,014 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 91% identical to simplify-code, differing in 9 lines, and is treated as a copy.

Related

Other skills, from other repositories

isolating-product-facade-contracts

Plan and execute product isolation migrations to a facade plus contract layer in PostHog, following the Visual review architecture. Use when a product still exposes internals (models/logic/views) across boundaries and needs migration toward contracts.py + facade/api.py + presentation separation, with a PR strategy…

PostHog/posthog · 76 tokens

qa-frontend

Internal PostHog developer frontend/browser QA skill. Use only when a PostHog developer explicitly asks to run frontend QA, browser-test a PR, verify a UI flow against the local PostHog stack, use qa-frontend, or QA current frontend changes with browser/runtime evidence. Do not use for generic code review, PR review…

PostHog/posthog · 142 tokens

walkeros-understanding-development

Use when contributing to walkerOS, before writing code, or when unsure about project conventions. Covers build/test/lint workflow, XP principles, folder structure, and package usage.

elbwalker/walkerOS · 41 tokens

reviewing-personhog-protocol

The full review process for personhog coordination-protocol changes — leases, fencing, handoffs, supervisors, failure budgets, warming, and changelog semantics. Use before pushing or requesting review on any personhog protocol changeset, when asked for an exhaustive or careful review of personhog code, and after any…

PostHog/posthog · 111 tokens

splitting-oversized-modules

Split an oversized Python module (a thousand-plus-line logic.py, models.py, api.py, or its test file) into a package of one module per concern, mechanically and provably without changing behavior. Use on a request to split / break up / decompose a god module or move functions out of one, once a human has agreed to…

PostHog/posthog · 197 tokens

establishing-code-ownership

Determine which PostHog team owns a file, directory, or code path, or enumerate all code a team owns (via distributed owners.yaml, products//product.yaml, and .github/CODEOWNERS). Use when assigning a reviewer, attributing a bug or slow query to a team, routing work, scoping a team-wide audit, or answering "who owns…

PostHog/posthog · 94 tokens