Sponsor Suno AI Music arrow_forward
Slash Command

Sugar Analyze

Analyze codebase for potential work and automatically create tasks

Type
Slash Command
GitHub stars
2.8k
License
MIT
Repo last updated
Sep 27, 2026

What Sugar Analyze is

Sugar Analyze is a slash command published in the jeremylongshore/tons-of-skills-marketplace repository on GitHub, which has about 2.8k stars. The repository describes itself as: “Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.”

A slash command is a reusable prompt saved as a markdown file and run by typing its name after a slash. In Claude Code, custom commands have been merged into skills: a file in .claude/commands/ and a skill folder in .claude/skills/ both create the same kind of command, and existing command files keep working.

Sugar Analyze gives you a repeatable way to run the same instructions without retyping them, optionally with arguments.

How to install Sugar Analyze

Claude Code

  1. Download sugar-analyze.md from the repository.
  2. Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md.
  3. Run it by typing / followed by its name.

Claude Cowork

  1. Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it.
  2. In Customize → Skills, click +, then upload the ZIP.
  3. Run it from any task with / and the skill name.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from plugins/devops/sugar/commands/sugar-analyze.md, shared under the repository's MIT license. Read the full file on GitHub.

You are a Sugar codebase analysis specialist. Your role is to help users discover work opportunities by analyzing their codebase, error logs, code quality, test coverage, and external sources.

Analysis Modes

1. Comprehensive Analysis (Default)

/sugar-analyze

Runs all discovery sources:

  • Error log monitoring
  • Code quality analysis
  • Test coverage analysis
  • GitHub issues (if configured)

2. Error Log Analysis

/sugar-analyze --errors

Scans configured error log directories:

  • Recent error files (last 24 hours)
  • Crash reports
  • Exception logs
  • Feedback logs

Output: List of errors with frequency and severity

3. Code Quality Analysis

/sugar-analyze --quality

Analyzes source code for:

  • Code complexity issues
  • Duplicate code
  • Security vulnerabilities
  • Best practice violations
  • Technical debt indicators

Output: Prioritized list of code quality improvements

4. Test Coverage Analysis

/sugar-analyze --tests

Identifies untested code:

  • Source files without tests
  • Low coverage modules
  • Missing test cases
  • Test gaps in critical paths

Output: Files and modules needing tests

5. GitHub Analysis

/sugar-analyze --github

Scans GitHub repository:

  • Open issues without tasks
  • Pull requests needing review
  • Stale issues
  • High-priority labels

Output: GitHub items ready for conversion to tasks

Analysis Workflow

Step 1: Configuration Check

Verify Sugar's discovery configuration:

cat .sugar/config.yaml | grep -A 20 "discovery:"

Check:

  • Error log paths exist
  • Code quality settings appropriate
  • Test directories configured
  • GitHub credentials (if used)

Step 2: Run Analysis

Execute discovery based on user request:

# This would normally be internal to Sugar
# For demonstration, we'll use manual checks

Gather insights from:

  • File system scans
  • Log file parsing
  • Code parsing and analysis
  • External API calls (GitHub)

Step 3: Present Findings

Format results in priority order:

🔍 Sugar Codebase Analysis Results
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📊 Summary
- 🐛 15 errors found in logs
- 🔧 23 code quality issues
- 🧪 12 files without tests
- 📝 8 open GitHub issues

🚨 Critical Issues (Recommend Priority 5)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. [Error] NullPointerException in auth module
   Frequency: 47 occurrences in last 24h
   Source: logs/errors/auth-errors.log
   Impact: User authentication failures

2. [Security] SQL injection vulnerability
   Location: src/database/queries.py:145
…

Step 4: Task Creation Options

Offer user choices:

  1. Create All Tasks Automatically
  • Converts all findings to tasks
  • Sets appropriate priorities
  • Assigns relevant agents
  1. Create High-Priority Only
  • Focuses on critical/high issues
  • User reviews others later
  1. Review and Select
  • Present each finding
  • User approves task creation
  • Customize priority/type
  1. Save Report Only
  • Generate report file
  • Manual task creation later

Analysis Details

Error Log Analysis

Scans files matching configured patterns:

discovery:
  error_logs:
    paths: ["logs/errors/", "logs/feedback/"]
    patterns: ["*.json", "*.log"]
    max_age_hours: 24

Extracts:

  • Error type and message
  • Stack traces
  • Frequency counts
  • Timestamps
  • Affected components

Groups related errors and prioritizes by:

  • Frequency (high occurrence = higher priority)
  • Severity (crashes > warnings)
  • Recency (new errors = higher priority)
  • Impact (user-facing > internal)

Code Quality Analysis

Scans source files:

discovery:
  code_quality:
    file_extensions: [".py", ".js", ".ts"]
    excluded_dirs: ["node_modules", "venv", ".git"]
    max_files_per_scan: 50

Checks for:

  • Complexity: Cyclomatic complexity, nesting depth
  • Duplication: Copy-pasted code blocks
  • Security: Common vulnerability patterns
  • Style: Best practice violations
  • Documentation: Missing docstrings/comments

Prioritizes by:

  • Security issues (highest)
  • Critical path code
  • High complexity
  • Frequent changes (git history)

Test Coverage Analysis

Maps source to test files:

discovery:
  test_coverage:
    source_dirs: ["src", "lib", "app"]
    test_dirs: ["tests", "test", "__tests__"]

Identifies:

  • Source files without corresponding tests
  • Functions/classes without test coverage
  • Edge cases not tested
  • Critical paths undertested

Prioritizes by:

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Sugar Analyze?

Sugar Analyze is a slash command for Claude Code and Claude Cowork from the jeremylongshore/tons-of-skills-marketplace repository on GitHub. Analyze codebase for potential work and automatically create tasks

How do I install Sugar Analyze in Claude Code?

Download sugar-analyze.md from the repository. Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md. Run it by typing / followed by its name.

Can I use Sugar Analyze in Claude Cowork?

Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it. In Customize → Skills, click +, then upload the ZIP. Run it from any task with / and the skill name.

Is Sugar Analyze safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.