All skills
simota avatar
by shingo imotasimota/agent-skills85 stars
15

Refactoring code: variable naming, function extraction, magic number constants, dead code removal. Does not change behavior. Not for bugs/security (Judge), tests (Radar), or features (Builder).

Use this Skill: https://skilld.dev/gh/simota/agent-skills/zen

This session only. Nothing lands on disk.

referencereview-report-templates.md

≈588 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Review & Report Templates

Purpose: Use this file when Zen is in review mode or needs an exact output anchor for refactoring reports.

Contents

Review Checklist

Readability

  • Variable and function names are descriptive
  • Code is self-documenting
  • No unnecessary magic numbers or strings
  • Complexity is reasonable (CC < 10 when possible)

Structure

  • Functions are focused and usually <20 lines
  • No unnecessary duplication
  • Abstractions fit the actual problem
  • Nesting depth stays <=3 when possible

Correctness

  • Edge cases are handled
  • Error paths remain intact
  • No new null/undefined risk is introduced
  • Logic matches the existing behavior

Maintainability

  • The code is easier to change later
  • No hidden dependency was introduced
  • The result remains testable
  • The change is reversible if needed

Review Output Format

## Zen Code Review

### Summary
[1-2 sentence overall assessment]
**Review Level**: [Quick Scan / Standard / Deep Dive]

### Complexity Analysis
| File | Function | CC | Cognitive | Status |
|------|----------|----|-----------|--------|
| ... | ... | ... | ... | ... |

### Strengths
- [Specific positive point]

### Suggestions
- **[File:Line]** - [Suggestion]
  - Why: [Reasoning]
  - How: [Concrete fix]

### Issues
- **[File:Line]** - [Issue] (Severity: Minor/Moderate/Critical)
  - Impact: [Why this matters]
  - Fix: [Recommended solution]

### Verdict
Approve | Request Changes | Comment Only

Refactoring Report Format

## Refactoring Report: [Component/File]

### Summary
| Metric | Before | After | Change |
|--------|--------|-------|--------|
| Lines of Code | X | Y | -Z% |
| Cyclomatic Complexity (max) | X | Y | -Z% |
| Cognitive Complexity (max) | X | Y | -Z% |
| Functions | X | Y | +Z |
| Max Nesting Depth | X | Y | -Z |
| Code Smells Resolved | - | - | N |

### Changes Applied
1. [Recipe]: [Target] -> [Result]
2. [Recipe]: [Target] -> [Result]

### Test Verification
- Pre-refactor: [Pass/Fail] (X tests)
- Post-refactor: [Pass/Fail] (X tests)
- Coverage: X% -> Y%

### Remaining Opportunities
- [ ] [Next candidate]

Source: SKILL.md on GitHub

1 warning13d5 checks · Risk SAFE
  • Gen Agent Trust Hub13d

    No security issues detected. The skill provides comprehensive and well-structured instructions for code refactoring and quality review. It utilizes standard developer tools, references reputable technical documentation from trusted organizations, and includes explicit safety boundaries to ensure behavior-preserving changes.

  • Socket13d

    No alerts

  • Snyk13d

    Risk: LOW · No issues

  • Runlayer6mo

    1/15 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at e307415. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 2 weeks ago

README badge

README badge for simota/agent-skills/zen