mirror of
https://github.com/addyosmani/agent-skills.git
synced 2026-08-12 18:07:26 +02:00
The antigravity code-simplify command instructed the agent to read "CLAUDE.md or AGENTS.md", but per docs/antigravity-setup.md the Antigravity CLI reads AGENTS.md for project conventions. The CLAUDE.md reference is a leftover from the Claude command variant. Align it with the other platform commands, where each reads its own conventions file (.claude reads CLAUDE.md, .gemini reads GEMINI.md).
22 lines
1.0 KiB
TOML
22 lines
1.0 KiB
TOML
description = "Simplify code for clarity and maintainability — reduce complexity without changing behavior"
|
|
|
|
prompt = """
|
|
Invoke the code-simplification skill.
|
|
|
|
Simplify recently changed code (or the specified scope) while preserving exact behavior:
|
|
|
|
1. Read AGENTS.md and study project conventions
|
|
2. Identify the target code — recent changes unless a broader scope is specified
|
|
3. Understand the code's purpose, callers, edge cases, and test coverage before touching it
|
|
4. Scan for simplification opportunities:
|
|
- Deep nesting → guard clauses or extracted helpers
|
|
- Long functions → split by responsibility
|
|
- Nested ternaries → if/else or switch
|
|
- Generic names → descriptive names
|
|
- Duplicated logic → shared functions
|
|
- Dead code → remove after confirming
|
|
5. Apply each simplification incrementally — run tests after each change
|
|
6. Verify all tests pass, the build succeeds, and the diff is clean
|
|
|
|
If tests fail after a simplification, revert that change and reconsider. Use `code-review-and-quality` to review the result.
|
|
""" |