agentleFS
skyvanguardskyvanguard/infra-ops/skills/performance-optimizer/SKILL.md

performance-optimizer

Skill1 starsChanged 10 months agoMITView on GitHub

Use when the user wants to speed up their system, free resources, or resolve performance bottlenecks. Identifies resource hogs and suggests safe optimizations.

20 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use observability-engineer, api-designer and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • xfstudioSkill

    observability-engineer

    Build production-ready monitoring, logging, and tracing systems.

    Also in 3 projects that use this

  • AutumnsGroveSkill

    api-designer

    Design and document RESTful and GraphQL APIs with OpenAPI/Swagger specifications, authentication patterns, versioning strategies, and best practices. Use for: (1) Creating API specifications, (2) Designing REST endpoints, (3) GraphQL schema design, (4) API authentication and authorization, (5) API versioning strategies, (6) Documentation generation

    Also in 4 projects that use this

  • xfstudioSkill

    docker-expert

    Docker containerization expert with deep knowledge of multi-stage builds, image optimization, container security, Docker Compose orchestration, and production deployment patterns. Use PROACTIVELY for Dockerfile optimization, container issues, image size problems, security hardening, networking, and orchestration challenges.

    Also in 3 projects that use this

  • lodetomasiSkill

    database-optimizer

    Database performance optimization: N+1 detection, query analysis, indexing, and ORM tuning

    Also in 3 projects that use this

  • GoogleSkill

    code-reviewer

    Also in 6 projects that use this

  • xenitV1Skill

    clean-code

    Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 16 edited versions we read keep these.

  • 7

    Distinctive

    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:

    Run a baseline measurement across all resource types:

    line 16
  2. Distinctive:

    After optimizations, re-run the relevant baseline checks and show before/after comparison:

    line 127
  3. Distinctive:

    ALWAYS profile before suggesting optimizations

    line 140
  4. Distinctive:

    NEVER delete user data without explicit confirmation

    line 141
  5. Distinctive:

    NEVER disable antivirus or firewall

    line 142
  6. Distinctive:

    Prefer reversible actions over permanent changes

    line 144
  7. Distinctive:

    If a process is unknown, research it before recommending to stop it

    line 145

“Common” is measured: kept by at least 6 in 10 of the 16 edited versions of this file we could read. “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 Optimizer

Overview

Identify performance bottlenecks through systematic profiling, then recommend and optionally execute safe optimizations. Prioritize quick wins with low risk.

Process

Step 1: Profile Current State

Run a baseline measurement across all resource types:

CPU consumers:

PlatformCommand
WindowsGet-Process | Sort-Object CPU -Descending | Select -First 15 Name, Id, CPU, @{N='Mem(MB)';E={[math]::Round($_.WorkingSet64/1MB,1)}}
Linuxps aux --sort=-%cpu | head -16
macOSps aux -r | head -16

Memory consumers:

PlatformCommand
WindowsGet-Process | Sort-Object WorkingSet64 -Descending | Select -First 15 Name, Id, @{N='Mem(MB)';E={[math]::Round($_.WorkingSet64/1MB,1)}}
Linuxps aux --sort=-%mem | head -16
macOSps aux -m | head -16

Disk I/O:

PlatformCommand
WindowsGet-Counter '\PhysicalDisk(*)\% Disk Time' -SampleInterval 2 -MaxSamples 1
Linuxiostat -x 1 2 2>/dev/null || cat /proc/diskstats
macOSiostat -c 2

Startup programs:

PlatformCommand
WindowsGet-CimInstance Win32_StartupCommand | Select Name, Command, Location
Linuxsystemctl list-unit-files --state=enabled --type=service
macOSlaunchctl list | head -20

Disk usage (large files):

PlatformCommand
WindowsGet-ChildItem C:\Users -Recurse -File -ErrorAction SilentlyContinue | Sort-Object Length -Descending | Select -First 10 FullName, @{N='Size(MB)';E={[math]::Round($_.Length/1MB,1)}}
Linuxdu -ah / 2>/dev/null | sort -rh | head -10
macOSdu -ah ~ | sort -rh | head -10

Temp files:

PlatformCommand
Windows(Get-ChildItem $env:TEMP -Recurse -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum).Sum / 1MB
Linuxdu -sh /tmp /var/tmp 2>/dev/null
macOSdu -sh /tmp ~/Library/Caches 2>/dev/null

Step 2: Identify Bottlenecks

Categorize findings:

CategoryThresholdAction Priority
CPU > 80% sustainedHIGHIdentify process, consider stopping
RAM > 85% usedHIGHFind memory hogs, check for leaks
Disk > 90% fullCRITICALFree space immediately
Disk I/O > 70%MEDIUMIdentify I/O heavy processes
Startup items > 15LOWDisable unnecessary items
Temp > 1GBLOWClean temp files

Step 3: Present Optimization Plan

Format as a prioritized list:

## Performance Analysis

### Current Bottlenecks
1. [CRITICAL/HIGH/MEDIUM] - [description] - [impact]

### Recommended Optimizations

#### Quick Wins (safe, immediate effect)
- [ ] [action 1] - Expected gain: [X]
- [ ] [action 2] - Expected gain: [X]

#### Medium Impact (may require restart)
- [ ] [action 1] - Expected gain: [X]

#### Long-term (requires planning)
- [ ] [action 1] - Expected gain: [X]

Step 4: Execute (with permission)

For each optimization the user approves:

  1. Show the exact command
  2. Explain the effect
  3. Execute after confirmation
  4. Verify the result

Safe actions (low risk):

  • Clear temp files
  • Clear browser caches
  • Clear package manager caches
  • Disable unnecessary startup items
  • Close idle processes (user-approved)

Moderate actions (ask first):

  • Stop non-essential services
  • Clear system caches
  • Adjust virtual memory settings
  • Disable visual effects

Never do automatically:

  • Uninstall software
  • Modify registry/system files
  • Disable security services
  • Delete user files
  • Change BIOS/firmware settings

Step 5: Verify Improvement

After optimizations, re-run the relevant baseline checks and show before/after comparison:

### Results
| Metric | Before | After | Improvement |
|--------|--------|-------|-------------|
| Free RAM | X GB | Y GB | +Z GB |
| CPU usage | X% | Y% | -Z% |
| Free disk | X GB | Y GB | +Z GB |

Rules

  • ALWAYS profile before suggesting optimizations
  • NEVER delete user data without explicit confirmation
  • NEVER disable antivirus or firewall
  • Show before/after metrics to prove impact
  • Prefer reversible actions over permanent changes
  • If a process is unknown, research it before recommending to stop it

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.