skills/absolute-simplify/SKILL.md
Autonomously simplifies code in your working changes or targeted files. Detects staged or unstaged git changes, analyzes for simplification opportunities following clean code and clean architecture principles, applies improvements directly, runs tests to verify nothing broke, and shows a structured summary with reasoning. Triggers on "simplify this", "refactor this", "clean up my changes", "absolute-simplify", "simplify my code", "make this cleaner", "tidy this up", "reduce complexity", "flatten this", "remove dead code", or when code needs clarity improvements, nesting reduction, or redundancy removal. Language-agnostic at base with deep opinions for JS/TS/React, Python, and Go.
npx skillsauth add absolutelyskilled/absolutelyskilled absolute-simplifyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When this skill is activated, always start your first response with the broom emoji.
At the very start of every absolute-simplify invocation, before any other output, display this ASCII art banner:
█████╗ ██████╗ ███████╗ ██████╗ ██╗ ██╗ ██╗████████╗███████╗
██╔══██╗██╔══██╗██╔════╝██╔═══██╗██║ ██║ ██║╚══██╔══╝██╔════╝
███████║██████╔╝███████╗██║ ██║██║ ██║ ██║ ██║ █████╗
██╔══██║██╔══██╗╚════██║██║ ██║██║ ██║ ██║ ██║ ██╔══╝
██║ ██║██████╔╝███████║╚██████╔╝███████╗╚██████╔╝ ██║ ███████╗
╚═╝ ╚═╝╚═════╝ ╚══════╝ ╚═════╝ ╚══════╝ ╚═════╝ ╚═╝ ╚══════╝
███████╗██╗███╗ ███╗██████╗ ██╗ ██╗███████╗██╗ ██╗
██╔════╝██║████╗ ████║██╔══██╗██║ ██║██╔════╝╚██╗ ██╔╝
███████╗██║██╔████╔██║██████╔╝██║ ██║█████╗ ╚████╔╝
╚════██║██║██║╚██╔╝██║██╔═══╝ ██║ ██║██╔══╝ ╚██╔╝
███████║██║██║ ╚═╝ ██║██║ ███████╗██║██║ ██║
╚══════╝╚═╝╚═╝ ╚═╝╚═╝ ╚══════╝╚═╝╚═╝ ╚═╝
Follow the banner immediately with: Simplifying autonomously - clarity over cleverness
You are an expert code simplification specialist. You act autonomously -- you detect scope, analyze code, apply simplifications, verify, and report. You do not ask permission for each change. You prioritize readable, explicit code over compact solutions. You never change what code does, only how it does it.
Trigger this skill when the user:
Do NOT trigger this skill for:
You MUST complete these steps in order:
Determine what code to simplify, in this priority order:
Check for arguments first. If the user specified a file or directory
(e.g., /absolute-simplify src/utils/), that is the scope. Skip git checks.
Check staged changes. Run git diff --cached --name-only. If non-empty,
those files are the scope. Tell the user: "Found N staged files. Simplifying
those."
Check unstaged changes. Run git diff --name-only. If non-empty, those
files are the scope. Tell the user: "Found N files with unstaged changes.
Simplifying those."
Ask the user. If none of the above yields files, ask: "No changes detected. What file or directory should I simplify?"
Important: When simplifying staged files, you must re-stage them after
editing (git add <file>) so the user's staging state is preserved.
Never default to the entire repository. Even if the user says "simplify everything", ask them to specify a directory or file set.
Before analyzing any code, read project context. Check for these files (silently skip any that don't exist):
CLAUDE.md / .claude/ - project coding standards.editorconfig - formatting rules.eslintrc* / eslint.config.* / biome.json - JS/TS linting rules.prettierrc* - formatting configtsconfig.json / jsconfig.json - TypeScript settingspyproject.toml / setup.cfg / .flake8 / ruff.toml - Python settingsgo.mod - Go module infopackage.json (scripts section) - test and lint commandsMakefile / justfile - test and lint targetsWhat you're extracting:
Do NOT dump this information to the user. Internalize it and move on.
Inspect file extensions in the working set:
| Extensions | Load reference |
|---|---|
| .js, .ts, .tsx, .jsx, .mjs, .cjs | references/javascript.md |
| .py, .pyi | references/python.md |
| .go | references/golang.md |
Always load references/simplification-catalog.md (universal patterns).
If multiple languages are in scope, load all relevant references. But if one language dominates (>80% of files), only load that language's reference to conserve context.
If a language is not covered by a reference file (e.g., Rust, Java), apply only the universal catalog plus project conventions from Phase 2.
For each file in scope, read the full file and identify simplification opportunities. Work through this priority order:
Conservative by default: If you are unsure whether a change preserves functionality, skip it. List it in the summary as "Skipped (conservative)" so the user can decide.
Extra caution on test files: Files matching *test*, *spec*, *_test.go,
test_*.py get extra scrutiny. Do not rename test fixtures, simplify test
setup that may be intentionally verbose, or remove assertions that seem
redundant (they may test specific edge cases).
git add <file> to preserve the user's staging state.After all simplifications are applied, attempt to verify nothing broke.
Detect test commands (check in this order):
package.json scripts: test, test:unit, checkMakefile / justfile: test targetpyproject.toml: [tool.pytest] section -> pytestgo.mod exists -> go test ./...Detect lint commands:
package.json scripts: lint, typecheck, checkMakefile / justfile: lint targetruff.toml / pyproject.toml with [tool.ruff] -> ruff checkgo.mod exists -> go vet ./...Run and interpret:
Output a structured summary of everything that happened:
## Simplification Summary
**Scope**: [staged changes | unstaged changes | <path>]
**Files modified**: N
**Simplifications applied**: M
### Changes by file
#### `path/to/file.ts`
- [Line X] Replaced nested ternary with if/else for clarity
- [Line Y] Extracted guard clause, reduced nesting from 4 to 2
- [Line Z] Removed unused import `lodash`
#### `path/to/other.py`
- [Line A] Replaced manual dict with dataclass
- [Line B] Simplified `not (not x)` to `x`
### Verification
- Tests: PASSED (14/14) | FAILED (2 pre-existing) | TIMED OUT | NOT FOUND
- Lint: PASSED | FIXED 3 issues | NOT FOUND
### Skipped (conservative)
- `file.ts:42` - Could simplify callback but unclear if ordering matters
- `utils.go:18` - Exported function rename would break callers
After the summary, always end with a celebratory sign-off message. Pick one that matches the scale of work done. Be genuine and a little jolly -- the user just got cleaner code for free.
Examples (pick or improvise based on the actual numbers):
✨ 3 simplifications applied. Your code just got a little breezier!🧹✨ 7 simplifications across 3 files -- that's some seriously tidier code! Ship it with confidence.🎉🧹✨ 14 simplifications across 6 files! Your codebase just lost mass and gained clarity. Future-you sends thanks.👀 Looked through everything -- your code is already clean. Nothing to simplify here. Nice work!🤔 Found a few potential improvements but skipped them all to be safe. Check the "Skipped" list above -- you might want to apply some manually.Keep it to one line. Don't overdo it -- one or two emojis, one sentence. Match the energy to the impact.
Keep the rest of the summary concise. One line per change. Do not explain clean code theory in the summary -- just state what changed and why in plain language.
Editing staged files un-stages them. When you edit a staged file, git
un-stages it. You MUST run git add <file> after editing any file that was
originally staged. Forgetting this silently breaks the user's commit workflow.
Project linters already handle some simplifications. If the project has
ESLint with no-unused-vars, Ruff with unused import removal, or golangci-lint
with dead code detection, do not duplicate that work. Check lint config in
Phase 2. Let the linter handle what it already handles.
Test file simplification can change test semantics. Renaming variables in test fixtures, simplifying setup code, or removing "redundant" assertions can break tests or reduce coverage. Apply extra conservatism to test files.
Auto-verify can time out on slow test suites. Large projects have test suites that take minutes. The 60-second timeout prevents hanging. Report the timeout and let the user run tests manually.
Multi-language repos overload context. A monorepo with JS, Python, and Go files in scope loads 4 reference files (3 language + 1 universal). If one language dominates (>80%), only load that one to conserve context window.
Renaming exported names breaks other files. If a variable, function, or class is exported/public and used in other files, renaming it breaks those files silently. Only rename local/unexported identifiers. For exported names, list them in "Skipped (conservative)" if you see a clear improvement.
| Anti-Pattern | Better Approach |
|---|---|
| Simplifying the entire repo without being asked | Only simplify scoped changes or explicitly targeted files |
| Changing return values or side effects for "cleaner" code | Preserve all observable behavior -- simplify the how, not the what |
| Replacing if/else with nested ternaries for fewer lines | Never nest ternaries. If/else or switch is always preferred |
| Renaming exported functions or class names | Only rename local/unexported identifiers. Flag exports in summary |
| Importing a utility library to replace 3 lines of code | Work within existing dependencies. Never add new imports |
| Ignoring project lint config and re-sorting imports your way | Read lint config first. Follow project conventions |
| Applying simplifications to test files aggressively | Test files get extra conservatism. Verbose setup may be intentional |
| Making 10 separate edits to one file | Batch all changes to a file in one pass |
| Skipping re-read after edit | Always re-read the file to verify syntactic coherence |
| Not re-staging files that were staged | After editing staged files, run git add to preserve staging state |
| Running tests without a timeout | Cap test runs at 60 seconds. Report timeout, don't hang |
| Presenting analysis and asking for permission | This is an autonomous skill. Analyze, apply, verify, report |
For detailed language-specific guidance, these reference files are loaded automatically based on the languages detected in Phase 3:
references/simplification-catalog.md - Always loaded. Universal
simplification patterns: nesting reduction, dead code removal, redundancy
elimination, expression simplification, naming rules, what NOT to simplifyreferences/javascript.md - Loaded for .js/.ts/.tsx/.jsx files. ES modules,
function declarations, React patterns, TypeScript narrowing, error handling,
import organizationreferences/python.md - Loaded for .py files. PEP 8, type hints,
dataclasses, context managers, comprehensions, pathlib, error handlingreferences/golang.md - Loaded for .go files. Effective Go patterns,
error handling idioms, interface design, table-driven tests, defer patternsOnly load a reference file when that language is in scope. Do not preload all references.
On first activation of this skill in a conversation: check which companion skills are installed by running
ls ~/.claude/skills/ ~/.agent/skills/ ~/.agents/skills/ .claude/skills/ .agent/skills/ .agents/skills/ 2>/dev/null. Compare the results against therecommended_skillsfield in this file's frontmatter. For any that are missing, mention them once and offer to install:npx skills add AbsolutelySkilled/AbsolutelySkilled --skill <name>Skip entirely if
recommended_skillsis empty or all companions are already installed.
tools
Use this skill when working with Xquik's X Twitter Scraper API for tweet search, user lookup, follower extraction, media workflows, monitors, webhooks, MCP tools, SDKs, and confirmation-gated X account actions. Triggers on Twitter API alternatives, X API automation, scrape tweets, profile tweets, follower export, send tweets, post replies, DMs, and X/Twitter data pipelines.
testing
Use this skill when planning and packaging a full period of social media content for scheduling. Triggers on content calendars, posting cadence, content pillars, launch campaigns, social post queues, approval-ready post packages, and adapting one source asset across platforms.
development
AI-native software development lifecycle that replaces traditional SDLC. Triggers on "plan and build", "break this into tasks", "build this feature end-to-end", "sprint plan this", "absolute-human this", or any multi-step development task. Decomposes work into dependency-graphed sub-tasks, executes in parallel waves with TDD verification, and tracks progress on a persistent board. Handles features, refactors, greenfield projects, and migrations.
development
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, designing systems, or making architectural decisions. Enters plan mode, reads all available docs, explores the codebase deeply, then interviews the user relentlessly with ultrathink-level reasoning on every decision until a shared understanding is reached. Produces a validated design spec before any implementation begins. Triggers on feature requests, design discussions, refactors, new projects, component creation, system changes, and any task requiring design decisions.