Skip to content
Skills Library
Programming · Building & coding

performance

/performance

Use when optimizing application performance — caching strategies, eager loading, query optimization, Redis patterns, or background job design.

Licence
MIT
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when optimizing application performance — caching strategies, eager loading, query optimization, Redis patterns, or background job design.

Original author description

Use when optimizing application performance — caching strategies, eager loading, query optimization, Redis patterns, or background job design.

How it works

  1. When to use
  2. Procedure: Optimize performance
  3. Conventions
  4. Output format
  5. Gotcha
  6. Do NOT
  7. Auto-trigger keywords
Original SKILL.md headings · 79 lines, 441 words
SKILL.md preview
---
model_tier: medium
name: performance
description: "Use when optimizing application performance — caching strategies, eager loading, query optimization, Redis patterns, or background job design."
domain: engineering
workspaces:
  - engineering
packs:
  - engineering-base
---

# performance

## When to use

Use when optimizing slow endpoints, designing caching, or improving query performance.

Do NOT use when:
- Database schema design (use `database` skill)
- Queue job creation (use `jobs-events` skill)

## Procedure: Optimize performance

### Step 0: Identify the bottleneck

1. Don't optimize prematurely — measure first.
2. Use `DB::enableQueryLog()` or Telescope to find slow queries.
3. Check for N+1 queries on list endpoints.
4. Search for existing cache services in the project.

**Performance complexity is a claim, and a claim needs evidence.** No cache
layer, no denormalised column, no materialised view, no read replica ships on
"this will be slow" — it ships on a profile, a query log, or a timing that names
the bottleneck. The added complexity is permanent (invalidation bugs, stale
reads, a second source of truth); the speedup is hypothetical until measured.
State the measurement in the change, or do not add the mechanism.

**Carve-out — this does not override the `scale-discipline` floor.** Where that
pack is installed, R-A2 *mandates* an index on every FK and every WHERE / ORDER
BY column, and R-A4 governs duplicated data by waiver. Those are structural
defaults that ship with the query, not optimisations awaiting a profiler; the
evidence gate above applies to *added mechanisms* (caches, denormalisation,
replicas, bespoke indexes beyond parity), never to the floor's baseline.

### Step 1: Apply the right fix

| Bottleneck | Fix |
|---|---|
| N+1 queries | Eager loading with `with()` |
| Slow queries | Add indexes, optimize (see `database` skill) |
| Repeated expensive queries | Cache with TTL |
| Blocking API calls | Queue as background job |
| Large datasets | Paginate, chunk, cursor |
| Missing counts | `withCount()` instead of loading relations |

### Step 2: Verify

Re-measure after fix. Check that cache invalidation works correctly.

## Conventions

→ See guideline `php/performance.md` for caching patterns, Redis, response time targets.

## Output format

1. Optimized code with before/after performance comparison
2. Caching strategy or query optimization applied

## Gotcha

- Cache invalidation bugs are worse than slow queries — don't add caching everywhere.
- Eager loading N+1 is the #1 win — always check list endpoints.
- Don't cache ORM collections/entities with loaded relations (Eloquent, Doctrine, Prisma) — too large.
- Always include tenant ID in cache keys (multi-tenant).

## Do NOT

- Do NOT cache without tenant isolation in multi-tenant contexts.
- Do NOT use `get()` or `all()` on large tables — paginate or chunk.
- Do NOT add indexes blindly — analyze query patterns first.

## Auto-trigger keywords

- performance
- caching
- eager loading
- query optimization
- Redis

Versions

RepositoryScoreLicence
This page · event4u-app/agent-config100MIT
ericrisco/rsc-harness100MIT
yonatangross/orchestkit100MIT
yonatangross/orchestkit100MIT
davila7/claude-code-templates100MIT
motormetrics/motormetrics100MIT
motormetrics/motormetrics100MIT
arxdsilva/ai-loops100MIT
krzysztofsurdy/code-virtuoso100MIT

Database snapshot: 13.11.2026 · package version 5154f0446178 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90FastAPI Caching
    This skill should be used when the user asks to "add caching", "implement Redis cache", "cache API response", "invalidate cache", "add cache layer", "optimize with caching", or mentions Redis, caching strategies, cache invalidation, or performance optimization. Provides Redis…
  • 90nextjs-performance
    Audit and optimize Next.js application performance when the user asks about Next.js performance, caching, or rendering strategies
  • 90caching-strategy
    Implement Redis/Memcached patterns and invalidation strategies. Use when: caching strategy.
  • 100redis-development
    Redis performance optimization and best practices. Use this skill when working with Redis data structures, Redis Query Engine (RQE), vector search with RedisVL, semantic caching with LangCache, or optimizing Redis performance.
  • 95database-expert
    Advanced database design and administration for PostgreSQL, MongoDB, and Redis. Use when designing schemas, optimizing queries, managing database performance, or implementing data patterns.
  • 100django-redis-caching
    Django Redis caching with django-cacheops. This skill should be used when implementing caching, adding cache invalidation, optimizing API performance, modifying models that affect cached data, or debugging cache-related issues in the Django backend.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.