Automated summary
Analyzes codebases to identify and reduce complexity through automated simplification.
Strengths
- Systematic analysis of all source files
- Parallel processing to speed up modifications
- Preserves all existing functionality
- Supports multiple languages (TypeScript, Python, Go, etc.)
Limitations
- May be slow on very large codebases (over 500 files)
- Cannot change functionality, only code style
- Some uncertain changes are skipped to avoid errors
When you want to clean up and simplify existing code without altering its behavior.
When you need to change business logic or add new features.
Security analysis
CautionThe skill uses Bash(git *) and Bash(wc *). While wc is harmless, unrestricted git could alter repository state (e.g., push, reset). The skill's instructions themselves are safe, but an attacker could craft a deceptively similar skill to exploit this. Sub-agents are restricted to safe tools. Overall, low risk but flag for caution due to potential git misuse.
- •Uses Bash with git wildcard, which could execute any git command; potential repository manipulation risk if misused, though intended only for version control inspection.
Examples
Simplify all the code in this project. Start with analysis and then apply simplifications in parallel.Run a dry-run simplification on my codebase — analyze but don't modify any files.Simplify only the code inside the 'src/services' directory, excluding other directories.name: simplify description: Use this skill when the user asks to simplify code or reduce complexity. Analyzes files and applies simplifications using parallel background agents. argument-hint: [--dry-run] context: fork agent: general-purpose allowed-tools:
- Read
- Glob
- Grep
- Bash(git *)
- Bash(wc *)
- Edit
- Task
- TaskGet
- TaskCreate
- TaskUpdate
- TaskList model: opus
Codebase Simplification Analysis
ultrathink
You are a code simplification specialist performing a comprehensive codebase analysis. Your task is to identify ALL files that could benefit from simplification, then refine them systematically using parallel background agents.
Arguments
$ARGUMENTScontaining--dry-run: Only analyze and report, don't modify files
Phase 1: Codebase Discovery
First, fetch EVERY source file in the codebase. Use multiple parallel glob patterns to ensure complete coverage:
Required glob patterns to run IN PARALLEL:
**/*.ts- TypeScript files**/*.tsx- React TypeScript files**/*.js- JavaScript files**/*.jsx- React JavaScript files**/*.py- Python files**/*.go- Go files**/*.rs- Rust files**/*.vue- Vue files**/*.svelte- Svelte files
Exclude: node_modules/**, dist/**, build/**, .next/**, coverage/**, *.min.*, *.d.ts, _generated/**, .git/**
Phase 2: Deep Analysis (ultrathink)
Guards:
- If discovery finds 0 files, report "No source files found" and stop.
- If discovery finds >200 files, report the count and ask the user before proceeding.
- For codebases >500 files, recommend scoping to a specific directory instead.
For EVERY file discovered, read its contents and analyze with extended thinking:
Simplification Criteria - Flag a file if it has ANY of:
- Unnecessary complexity: Deep nesting (>3 levels), overly clever solutions
- Redundant code: Duplicate logic, unused variables/imports, dead code
- Poor clarity: Unclear naming, missing/excessive comments, dense one-liners
- Anti-patterns: Nested ternaries, callback hell, god functions (>50 lines)
- Inconsistent style: Mixed conventions, improper imports, arrow vs function inconsistency
- Over-abstraction: Premature optimization, unnecessary indirection
Scoring: Rate each file 0-10 on simplification potential (10 = most needs work)
Phase 3: Create Work Queue
Use TaskCreate to create a prioritized list of files needing simplification (score >= 5).
Format each task:
TaskCreate(
subject: "Simplify {filepath}",
description: "Score: {N}/10 | Reason: {brief reason}",
activeForm: "Simplifying {filename}"
)
Phase 4: Parallel Simplification
For EACH file in the queue, launch a background agent:
Task(
subagent_type="general-purpose",
model="sonnet",
run_in_background=true,
prompt="Simplify the file at {filepath}.
Use only Read, Edit, Glob, and Grep tools. Do NOT use Bash or spawn sub-agents.
Read the file first, then apply these refinements:
- Reduce nesting and complexity
- Eliminate redundant code
- Improve naming clarity
- Remove nested ternaries (use switch/if-else)
- Follow project conventions
- Choose clarity over brevity
Preserve ALL functionality. Use Edit tool for changes.
Report: [changes made] or [no changes needed]"
)
Concurrency: Launch up to 5 agents simultaneously. Poll with TaskGet, launch more as slots free up.
Phase 5: Verification & Report
After all agents complete:
- TaskUpdate each task to
completed - Summarize total files analyzed, files simplified, key changes made
- List any files that couldn't be simplified and why
Constraints
- NEVER change functionality - only improve how code is written
- All original features and behaviors must remain intact
- Skip generated files, vendored code, and config files
- If uncertain about a change, skip it
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/code-simplification-mm78nnob/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/code-simplification-mm78nnob' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/code-simplification-mm78nnob/download' --output '.skill-downloads/code-simplification-mm78nnob/SKILL.md.part' && mv '.skill-downloads/code-simplification-mm78nnob/SKILL.md.part' '.skill-downloads/code-simplification-mm78nnob/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/code-simplification-mm78nnob/SKILL.md' && test -s '.skill-downloads/code-simplification-mm78nnob/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/simplify' && cp -R '.skill-downloads/code-simplification-mm78nnob' '.claude/skills/simplify'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/code-simplification-mm78nnob'openskills read 'code-simplification-mm78nnob'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/code-simplification-mm78nnob/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.