- Home
- Skills
- Alekspetrov
- Navigator
- Nav Simplify
nav-simplify_skill
- Python
142
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 alekspetrov/navigator --skill nav-simplify- SKILL.md11.7 KB
Overview
This skill simplifies and refines recently modified Python (and other supported language) code for clarity, consistency, and maintainability while preserving exact functionality. It runs automatically after implementation steps or on demand, applying project-specific standards and producing human-readable diffs and summaries. The goal is readable, consistent code without changing behavior.
How this skill works
The skill detects modified files (git, user scope, or session context), loads simplification configuration and project standards from CLAUDE.md, and analyzes each file for complexity indicators like deep nesting, long functions, nested ternaries, and unclear names. It applies a set of conservative simplification rules—extract helpers, flatten control flow, consolidate patterns, and rename for clarity—then outputs diffs and a change summary. Changes are staged only after approval unless auto-apply is enabled.
When to use it
- Automatically after backend, frontend, database-migration, or any implementation task that changes code
- On-demand when asking: "simplify this code", "clean up recent changes", or "refactor for readability"
- When recent commits introduced deep nesting, long functions, or inconsistent patterns
- Before final commit to ensure standards from CLAUDE.md are applied
- Avoid invoking for docs-only commits or configuration files (JSON/YAML) unless explicitly requested
Best practices
- Limit scope to modified or staged files to avoid unnecessary churn
- Preserve all behavior—never change logic semantics while simplifying
- Keep meaningful comments that explain intent; remove only comments that restate obvious code
- Respect project rules from CLAUDE.md (naming, imports, error handling) when renaming or restructuring
- Prefer explicit control flow over clever one-liners; avoid nested ternaries and reduce nesting depth
- Run tests and present diffs for review before applying changes when auto_apply is false
Example use cases
- Convert nested ternary expressions to a small, named function to improve readability
- Flatten deep nested conditionals by early returns and helper extraction
- Rename ambiguous variables (x, n) to clear names (userCount, isActive) following project conventions
- Consolidate repeated logic into a single helper and update call sites with minimal diff
- Run as part of an automated pipeline: Implement → Verify → Simplify → Commit
FAQ
No. Changes are designed to preserve exact functionality; any change that risks behavior is flagged for manual review.
Which files are skipped?
By default test files, spec files, markdown, JSON/YAML, and files exceeding max_file_size are skipped unless explicitly forced.