code-simplification
Simplifies/refactors working code for clarity without changing behavior.
Skill by ajyadav013
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ajyadav013-code-simplification
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/code-simplification
What's inside
- Skill name
code-simplification- Description
- Simplifies/refactors working code for clarity without changing behavior. Use when code is harder to read or maintain than it should be. Distinct from code-review-and-quality (assesses only) and over-engineering-review (delete-list only).
- License
- MIT
- Instructions
- 328 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- alld-014-kiss-principle.md · references/
SKILL.md (first lines)
# Code Simplification
> Inspired by the [Claude Code Simplifier plugin](https://github.com/anthropics/claude-plugins-official/blob/main/plugins/code-simplifier/agents/code-simplifier.md). Adapted here as a model-agnostic, process-driven skill for any AI coding agent.
## Overview
Simplify code by reducing complexity while preserving exact behavior. The goal is not fewer lines — it's code that is easier to read, understand, modify, and debug. Every simplification must pass a simple test: "Would a new team member understand this faster than the original?"
## When to Use
- After a feature is working and tests pass, but the implementation feels heavier than it needs to be
- During code review when readability or complexity issues are flagged
- When you encounter deeply nested logic, long functions, or unclear names
- When refactoring code written under time pressure
- When consolidating related logic scattered across files
- After merging changes that introduced duplication or inconsistency
**When NOT to use:**
- Code is already clean and readable — don't simplify for the sake of it
- You don't understand what the code does yet — comprehend before you simplify
- The code is performance-critical and the "simpler" version would be measurably slower
- You're about to rewrite the module entirely — simplifying throwaway code wastes effort
## The Five Principles
### 1. Preserve Behavior Exactly
Don't change what the code does — only how it expresses it. All inputs, outputs, side effects, error behavior, and edge cases must remain identical. If you're not sure a simplification preserves behavior, don't make it.
```
ASK BEFORE EVERY CHANGE:
→ Does this produce the same output for every input?
→ Does this maintain the same error behavior?
→ Does this preserve the same side effects and ordering?
→ Do all existing tests still pass without modification?
```
### 2. Follow Project Conventions
Simplification means making code more consistent with the codebase, not imposing external preferences. Before simplifying:
```
1. Read AGENTS.md / project conventions
2. Study how neighboring code handles similar patterns
3. Match the project's style for:
- Import ordering and module system
- Function declaration style
- Naming conventions
- Error handling patterns
- Type annotation depth
```
Simplification that breaks project consistency is not simplification — it's churn.
### 3. Prefer Clarity Over Cleverness
Explicit code is better than compact code when the compact version requires a mental pause to parse.
```typescript
// UNCLEAR: Dense ternary chain
const label = isNew ? 'New' : isUpdated ? 'Updated' : isArchived ? 'Archived' : 'Active';
// CLEAR: Readable mapping
function getStatusLabel(item: Item): string {
if (item.isNew) return 'New';
if (item.isUpdated) return 'Updated';
if (item.isArchived) return 'Archived';
return 'Active';
}
```
```typescript
// UNCLEAR: Chained reduces with inline logic
const result = items.reduce((acc, item) => ({
...acc,
[item.id]: { ...acc[item.id], count: (acc[item.id]?.count ?? 0) + 1 }
}), {});
// CLEAR: Named intermediate step
const countById = new Map<string, number>();
for (const item of items) {
countById.set(item.id, (countById.get(item.id) ?? 0) + 1);
}
```
### 4. Maintain Balance
Simplification has a failure mode: over-simplification. Watch for these traps:
- **Inlining too aggressively** — removing a helper that gave a concept a name makes the call site harder to read
- **Combining unrelated logic** — two simple functions merged into one complex function is not simpler
- **Removing "unnecessary" abstraction** — some abstractions exist for extensibility or testability, not complexity
- **Optimizing for line count** — fewer lines is not the goal; easier comprehension is
### 5. Scope to What Changed
Default to simplifying recently modified code. Avoid drive-by refactors of unrelated code unless explicitly asked to broaden scope. Unscoped simplification creates noise in diffs and risks unintended regressions.
## The Simplification Process
### Step 1: Understand Before Touching (Chesterton's Fence)
Before changing or removing anything, understand why it exists. This is Chesterton's Fence: if you see a fence across a road and don't understand why it's there, don't tear it down. First understand the reason, then decide if the reason still applies.
```
BEFORE SIMPLIFYING, ANSWER:
- What is this code's responsibility?
- What calls it? What does it call?
- What are the edge cases and error paths?
- Are there tests that define the expected behavior?
- Why might it have been written this way? (Performance? Platform constraint? Historical reason?)
- Check git blame: what was the original context for this code?
```
If you can't answer these, you're not ready to simplify. Read more context first.
### Step 2: Identify Simplification OpportunitiesFrom ajyadav013/claude-kit, MIT.
More from ajyadav013/claude-kit
- 0.602score
data-engineering-bigquery-gcs
ajyadav013
BigQuery medallion architecture (bronze/silver/gold), parameterized queries, MERGE upserts, partitioning, CDC dedup, Temporal orchestration.
SkillBFreshness: B★ 14Claude Code +9 - 0.602score
design-patterns-and-conventions
ajyadav013
Cross-cutting design patterns, naming, folder layout, and anti-patterns for production Python/FastAPI backends.
SkillBFreshness: B★ 14Claude Code +9 - 0.602score
api-and-interface-design
ajyadav013
Stable API and interface design patterns.
SkillBFreshness: B★ 14Claude Code +9 - 0.602score
backend-repo-architecture
ajyadav013
Canonical backend repository structure for Python/FastAPI — multi-mode entrypoint, app factory, ConnectionManager, BaseDao, flat vs versioned layout.
SkillBFreshness: B★ 14Claude Code +9 - 0.602score
auth-and-rbac
ajyadav013
FastAPI auth patterns — session/JWT chains, argon2id hashing, pyotp TOTP/Email OTP, role-based access control, x-user-data gateway forwarding.
SkillBFreshness: B★ 14Claude Code +9 - 0.602score
async-python-patterns
ajyadav013
Async Python for high-performance services.
SkillBFreshness: B★ 14Claude Code +9 - 0.602score
cron-and-scheduled-jobs
ajyadav013
Scheduled jobs across two mechanisms — Kubernetes CronJobs (schedule in Helm values, MODE=cron) and Temporal Schedules.
SkillBFreshness: B★ 14Claude Code +9 - 0.602score
docker-shared
ajyadav013
Shared Docker building blocks — base images for private registries, .dockerignore conventions, compose fragment reuse with YAML anchors.
SkillBFreshness: B★ 14Claude Code +9 - 0.602score
dockerfile-backend
ajyadav013
Multi-stage Dockerfiles for Python/FastAPI backends — builder vs runtime, slim vs alpine, system deps, layer caching, non-root users.
SkillBFreshness: B★ 14Claude Code +9 - 0.602score
anthropic-vertex-integration
ajyadav013
Claude on Vertex AI via the AnthropicVertex SDK — lazy ADC client init, env-based project/region resolution, async helpers, backoff retry.
SkillBFreshness: B★ 14Claude Code +9 - 0.602score
api-pagination-filtering-sorting
ajyadav013
HTTP query parameter conventions for pagination, filtering, sorting, and search with standardized response metadata.
SkillBFreshness: B★ 14Claude Code +9 - 0.602score
distributed-systems-patterns
ajyadav013
Distributed data placement and replication — consistent hashing/vnodes, sharding, N/W/R quorums, KV-store and cache anatomy, gossip failure detection, B-tree…
SkillBFreshness: B★ 14Claude Code +9
Signals
- Stars
- 14
- Forks
- 5
- Open issues
- 9
- Last commit (this folder)
- Aug 22, 2026 (2 months ago)
- Last release
- Sep 7, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ajyadav013/claude-kit
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ajyadav013
- 0.602score
dockerfile-backend
ajyadav013
Multi-stage Dockerfiles for Python/FastAPI backends — builder vs runtime, slim vs alpine, system deps, layer caching, non-root users.
SkillBFreshness: B★ 14Claude Code +9 - 0.602score
api-and-interface-design
ajyadav013
Stable API and interface design patterns.
SkillBFreshness: B★ 14Claude Code +9 - 0.602score
cron-and-scheduled-jobs
ajyadav013
Scheduled jobs across two mechanisms — Kubernetes CronJobs (schedule in Helm values, MODE=cron) and Temporal Schedules.
SkillBFreshness: B★ 14Claude Code +9 - 0.602score
docker-shared
ajyadav013
Shared Docker building blocks — base images for private registries, .dockerignore conventions, compose fragment reuse with YAML anchors.
SkillBFreshness: B★ 14Claude Code +9 - 0.602score
anthropic-vertex-integration
ajyadav013
Claude on Vertex AI via the AnthropicVertex SDK — lazy ADC client init, env-based project/region resolution, async helpers, backoff retry.
SkillBFreshness: B★ 14Claude Code +9 - 0.602score
api-pagination-filtering-sorting
ajyadav013
HTTP query parameter conventions for pagination, filtering, sorting, and search with standardized response metadata.
SkillBFreshness: B★ 14Claude Code +9
Cite this page
code-simplification skill. Agent Mart. https://agentmart.dev/skills/ajyadav013-code-simplification (last updated 2026-10-24)