agentleFS
lexicalninjalexicalninja/my-little-scrum-team/skills/performance-analyzer/SKILL.md

performance-analyzer

Skill2 starsChanged 4 months agoMITView on GitHub

Analyzes code for performance issues including inefficient algorithms, unnecessary computations, memory leaks, large file sizes, slow queries, and missing caching. Returns structured performance issue reports with optimization suggestions.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check for inefficient algorithms (O(n²) when O(n) possible)

    line 11
  2. Distinctive:

    Look for memory leaks or inefficient memory usage

    line 13
  3. Distinctive:

    Check file sizes and resource usage

    line 14
  4. Distinctive:

    Check for missing caching where beneficial

    line 16

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Performance Analyzer Skill

Instructions

  1. Analyze code for performance issues
  2. Check for inefficient algorithms (O(n²) when O(n) possible)
  3. Identify unnecessary computations or redundant operations
  4. Look for memory leaks or inefficient memory usage
  5. Check file sizes and resource usage
  6. Review database queries for optimization opportunities
  7. Check for missing caching where beneficial
  8. Return structured performance reports with:
    • File path and line numbers
    • Performance issue type
    • Current code
    • Suggested optimization
    • Expected performance improvement
    • Priority (Must-Fix for blocking issues, Should-Fix for optimizations)

Examples

Input: Inefficient nested loop Output:

### PERF-001
- **File**: `utils.js`
- **Lines**: 30-35
- **Priority**: Should-Fix
- **Issue**: O(n²) nested loop when O(n) solution is possible
- **Current Code**:
  ```javascript
  function findDuplicates(arr1, arr2) {
      const duplicates = [];
      for (let i = 0; i < arr1.length; i++) {
          for (let j = 0; j < arr2.length; j++) {
              if (arr1[i] === arr2[j]) {
                  duplicates.push(arr1[i]);
              }
          }
      }
      return duplicates;
  }
  • Suggested Fix:
    function findDuplicates(arr1, arr2) {
        const set2 = new Set(arr2);
        return arr1.filter(item => set2.has(item));
    }
  • Reason: Using Set reduces time complexity from O(n²) to O(n)
  • Expected Improvement: Significant performance gain for large arrays

## Performance Issues to Detect

- **Inefficient Algorithms**: O(n²) or worse when better solutions exist
- **Unnecessary Computations**: Redundant calculations, repeated operations
- **Memory Leaks**: Unclosed resources, circular references, event listeners
- **Large File Sizes**: Unoptimized images, large bundles, unnecessary dependencies
- **Slow Queries**: N+1 queries, missing indexes, inefficient joins
- **Missing Caching**: Repeated expensive operations without caching
- **Blocking Operations**: Synchronous operations that should be async
- **Inefficient Data Structures**: Wrong data structure for use case
- **Unoptimized Loops**: Inefficient loop patterns
- **Resource Loading**: Missing lazy loading, blocking resources

## Priority Guidelines

- **Must-Fix**: Performance issues that block functionality or cause timeouts
- **Should-Fix**: Performance optimizations that improve user experience
- **Nice-to-Have**: Minor optimizations with small impact

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.