Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

improve

БесплатноБез исполняемых скриптовНе проверен

Analyze changes in the current stack and provide actionable improvement suggestions using parallel multi-agent analysis. Reviews bugs, simplification…

getstackitот getstackit★ 32 звезды на GitHub

Об этом скилле

/improve - Code Improvement Analysis

Analyze changes in the current stack and provide actionable improvement suggestions across multiple dimensions.

Usage

/improve [scope] [--agents=<list>]

Scope options:

  • stack (default) - All changes from main to current branch
  • branch - Only commits on current branch
  • staged - Only staged changes

Agent filter:

  • --agents=all (default) - Run all agents
  • --agents=bugs,perf - Run specific agents only

Execution Steps

Step 1: Gather Context

First, collect information about the changes to analyze:

# Get the main/trunk branch name
git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo "main"

# Get current branch
git branch --show-current

# Get list of changed files
git diff --name-only main...HEAD

# Get the full diff for analysis
git diff main...HEAD

# Get diff stats
git diff --stat main...HEAD

Store this information for the agents:

  • TRUNK_BRANCH: The main branch name
  • CURRENT_BRANCH: Current branch name
  • CHANGED_FILES: List of files changed
  • DIFF_CONTENT: The actual diff
  • DIFF_STATS: Summary statistics

Step 2: Launch Analysis Agents

Launch ALL of the following agents in PARALLEL using the Task tool. Each agent receives the diff and changed files list.

IMPORTANT: You MUST launch all 7 agents simultaneously in a single message with multiple Task tool calls. Do not run them sequentially.


Agent 1: Bug Hunter (bugs)

You are analyzing code changes for potential bugs and edge cases.

CHANGES TO ANALYZE:
- Branch: {CURRENT_BRANCH} vs {TRUNK_BRANCH}
- Files: {CHANGED_FILES}

DIFF:
{DIFF_CONTENT}

LOOK FOR:
1. Nil/null pointer dereferences
2. Missing error checks (especially in Go - never ignore errors)
3. Off-by-one errors in loops/slices
4. Race conditions in concurrent code
5. Resource leaks (unclosed files, connections, channels)
6. Unhandled edge cases (empty inputs, zero values, negative numbers)
7. Logic errors in conditionals
8. Missing input validation
9. Incorrect error wrapping (should use %w for wrapped errors)
10. Panic-inducing code paths

OUTPUT FORMAT (JSON):
{
  "agent": "bugs",
  "findings": [
    {
      "severity": "HIGH|MEDIUM|LOW",
      "title": "Brief description",
      "file": "path/to/file.go",
      "line": 142,
      "description": "Detailed explanation of the issue",
      "suggestion": "How to fix it",
      "effort": "LOW|MEDIUM|HIGH",
      "code_snippet": "relevant code if helpful"
    }
  ]
}

Only report ACTUAL issues found in the diff. Do not report speculative issues or issues in unchanged code.
If no issues found, return empty findings array.

Agent 2: Simplification (simplify)

You are analyzing code changes for simplification and refactoring opportunities.

CHANGES TO ANALYZE:
- Branch: {CURRENT_BRANCH} vs {TRUNK_BRANCH}
- Files: {CHANGED_FILES}

DIFF:
{DIFF_CONTENT}

LOOK FOR:
1. Duplicated code that could be extracted
2. Complex conditionals that could be simplified
3. Deep nesting that could use early returns
4. Long functions that should be split
5. Dead code or unused variables
6. Unnecessary type conversions
7. Verbose patterns with simpler alternatives
8. Boolean parameters that should be typed constants
9. String literals that should be constants
10. Over-engineering (unnecessary abstractions)

PROJECT STYLE RULES:
- Early returns over deep nesting
- switch over if-else chains with 3+ conditions
- Use typed constants instead of boolean parameters
- Remove unused parameters entirely (don't use `_`)

OUTPUT FORMAT (JSON):
{
  "agent": "simplify",
  "findings": [
    {
      "severity": "HIGH|MEDIUM|LOW",
      "title": "Brief description",
      "file": "path/to/file.go",
      "line": 42,
      "description": "What could be simplified",
      "suggestion": "Proposed simplification",
      "effort": "LOW|MEDIUM|HIGH",
      "code_before": "current code",
      "code_after": "simplified code"
    }
  ]
}

Agent 3: Performance (perf)

You are analyzing code changes for performance issues.

CHANGES TO ANALYZE:
- Branch: {CURRENT_BRANCH} vs {TRUNK_BRANCH}
- Files: {CHANGED_FILES}

DIFF:
{DIFF_CONTENT}

LOOK FOR:
1. Unnecessary allocations in hot paths
2. String concatenation in loops (use strings.Builder)
3. Unbounded slice growth (missing capacity hints)
4. N+1 query patterns
5. Missing caching opportunities
6. Blocking operations that could be async
7. Inefficient algorithms (O(n²) when O(n) is possible)
8. Repeated expensive computations
9. Large structs passed by value instead of pointer
10. Unnecessary regex compilation in loops

OUTPUT FORMAT (JSON):
{
  "agent": "perf",
  "findings": [
    {
      "severity": "HIGH|MEDIUM|LOW",
      "title": "Brief description",
      "file": "path/to/file.go",
      "line": 89,
      "description": "Performance issue explanation",
      "impact": "Expected impact on performance",
      "suggestion": "How to optim
Полный SKILL.md на GitHub

Установить improve в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash(git:*)
Read
Grep
Glob
Task

FAQ

Что делает скилл improve?

Analyze changes in the current stack and provide actionable improvement suggestions using parallel multi-agent analysis. Reviews bugs, simplification opportunities, performance, test coverage, documentation, security, and UX. Keywords improve, code review, analysis, bugs, performance, security.

Как установить скилл improve?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл improve запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить improve с