simplify_skill
- Shell
145
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill brianlovin/claude-config --skill simplify- SKILL.md3.0 KB
Overview
This skill simplifies and refines recently modified code for clarity and consistency while preserving exact functionality. It runs automatically after code changes, applying project-specific standards and readability-focused transformations. The goal is cleaner, more maintainable code without altering behavior or outputs.
How this skill works
The skill detects recently modified or touched files and analyzes those sections for complexity, redundancy, and style inconsistencies. It then applies a set of deterministic edits: renaming for clarity, consolidating related logic, replacing nested ternaries with if/else or switch statements, reordering and normalizing imports, and enforcing explicit function and prop typing where required. All edits are scoped to the changed code unless a broader review is explicitly requested.
When to use it
- Immediately after writing or modifying code to improve readability before committing.
- When a pull request needs clarity-focused cleanup without changing behavior.
- To enforce project coding standards and consistent patterns across recent edits.
- Before handoff or code review to reduce reviewer friction and highlight intent.
- When recent changes introduce complex branching or nested expressions that hurt readability.
Best practices
- Limit edits to files or sections modified in the current session to avoid unintended changes.
- Prefer explicit, named functions (function keyword) and clear return annotations for top-level functions.
- Replace nested ternary operators with if/else chains or switch statements for multiple conditions.
- Keep related logic consolidated but avoid combining unrelated responsibilities into one function.
- Favor clear variable and function names over clever or compact one-liners.
Example use cases
- Refactor a recently added React component to add explicit Props types and convert arrow functions to named functions.
- Simplify a utility that contains nested ternaries and redundant branches by rewriting control flow with if/else.
- Normalize import statements and file extensions after a series of quick edits introduced inconsistent imports.
- Remove redundant helper abstractions introduced during rapid prototyping while preserving behavior.
- Clean up conditional logic and add clearer variable names after a bug-fix commit to improve maintainability.
FAQ
No. All transformations are explicitly designed to preserve exact functionality, outputs, and public APIs.
Which files does it modify?
By default it targets files that were recently modified or touched in the current session. Broader scope reviews require explicit instruction.
Does it enforce project standards automatically?
Yes. It applies the project-specific standards configured for the repository, including import ordering, function styles, and explicit types.