Find and fix performance bottlenecks — N+1 queries, missing indexes, sync bottlenecks, caching gaps.

MITAuto-check: notesBackend & APIs

Install Spine Perf

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill spine-perf -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace spine-perf --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/ai-agency/tonone/skills/spine-perf .claude/skills/spine-perf && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
spine-perf
GitHub stars
2.8k
Token cost
~1.3k tokens
SKILL.md length
522 words
Files
2
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Find and fix performance bottlenecks — N+1 queries, missing indexes, sync bottlenecks, caching gaps.

  • Works in 9 steps: Run perf_scan.py → Detect Environment → Read the Code Path → …
  • Asked why is this slow
  • SKILL.md covers Steps and Delivery
  • Calls python

What it does

Spine Perf is an agent skill from jeremylongshore/tons-of-skills-marketplace. Find and fix performance bottlenecks — N+1 queries, missing indexes, sync bottlenecks, caching gaps. Use when asked "why is this slow", "performance issue", "optimize this endpoint", or "N+1 queries".

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `.claude-plugin/plugin.json`).

It sits in Backend & APIs, covering Caching and ORMs and data access. 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. The licence is MIT.

When your agent uses it

  • Asked why is this slow
  • Performance issue
  • Optimize this endpoint

Example prompts

  • “why is this slow”
  • “performance issue”
  • “optimize this endpoint”
  • “/spine-perf”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion

Workflow steps

9 steps, taken from the step headings in SKILL.md.

  1. Run perf_scan.py
  2. Detect Environment
  3. Read the Code Path
  4. Identify N+1 Queries
  5. Check for Missing Indexes
  6. Identify Synchronous Bottlenecks
  7. Check Caching Opportunities
  8. Check Serialization Overhead
  9. Present the Report

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Bash
    • Glob
    • Grep
    • WebFetch
    • WebSearch
    • Task
    • TodoWrite

    …and 1 more on the same allowed-tools line.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Spine Perf loads about 1.3k tokens when it runs. Until then it costs about 53 tokens; SKILL.md has 522 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~53
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 522 words, ~1,282 tokens.

Download SKILL.mdSave it as .claude/skills/spine-perf/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
spine-perf
description
Find and fix performance bottlenecks — N+1 queries, missing indexes, sync bottlenecks, caching gaps. Use when asked "why is this slow", "performance issue", "optimize this endpoint", or "N+1 queries".
allowed-tools
Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion
version
0.9.8
author
tonone-ai <hello@tonone.ai>
license
MIT

Find and Fix Performance Bottlenecks

You are Spine — the backend engineer from the Engineering Team.

Follow the output format defined in docs/output-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.

Steps

Step 0: Run perf_scan.py
bash
python team/spine/scripts/spine_agent/perf_scan.py [target] [--base-url http://...] [--paths /api/orders /api/users] [--skip-n1] [--skip-endpoints]

Run the real-tool layer first. This executes:

  • N+1 static analysis — scans Python files for ORM query patterns inside loops, raw SQL in loops, string-formatted SQL, and related-field access without eager loading.
  • Endpoint profiler — if --base-url and --paths are given, times each endpoint (3 warmup + 5 measured, reports p50/p95/p99). Flags endpoints >200ms (MEDIUM), >500ms (HIGH), >1000ms (CRITICAL).

The tool writes .reports/spine-perf-<ts>.json and exits 2 on CRITICAL/HIGH findings (CI gate).

Review the JSON report to seed the investigation in Steps 1-7 below.

Step 1: Detect Environment
bash
ls -a

Identify the framework and ORM: package.json (Express/Fastify + Prisma/TypeORM/Drizzle/Sequelize), pyproject.toml (FastAPI/Django + SQLAlchemy/Django ORM), go.mod (GORM, sqlx), Gemfile (Rails + ActiveRecord). Check for caching layers (Redis config), database config, and any existing performance tooling.

Step 1: Read the Code Path

Read the specific code path the user is asking about. If they haven't specified, ask which endpoint or operation is slow. Trace the full request lifecycle:

  • Route handler / controller
  • Middleware that runs on this path
  • Service / business logic layer
  • Database queries (ORM calls, raw queries)
  • External API calls
  • Response serialization
Step 2: Identify N+1 Queries

Look for patterns where:

  • A list is fetched, then each item triggers an additional query (classic N+1)
  • Associations/relations are accessed in a loop without eager loading
  • ORM .map() / .forEach() / list comprehensions trigger lazy-loaded queries

For each N+1 found: explain the query pattern, show the fix (eager loading, join, subquery), and estimate the improvement (e.g., "N+1 with 100 items = 101 queries -> 1 query").

Step 3: Check for Missing Indexes

Review the database queries in the code path and check:

  • Are WHERE clause columns indexed?
  • Are JOIN columns indexed?
  • Are ORDER BY columns indexed?
  • Are there composite indexes for multi-column queries?

Check migration files or schema definitions for existing indexes. Suggest specific indexes to add.

Show full SKILL.md (196 more words)Show less
Step 4: Identify Synchronous Bottlenecks

Flag operations that block the request unnecessarily:

  • Synchronous external API calls that could be parallelized
  • Sequential database queries that are independent and could run concurrently
  • File I/O or computation on the request path that could be offloaded
  • Missing connection pooling causing connection creation overhead
Step 5: Check Caching Opportunities

Identify data that could be cached:

  • Frequently read, rarely written data (user profiles, config, feature flags)
  • Expensive computations or aggregations
  • External API responses with acceptable staleness
  • Database query results for hot paths

For each: suggest cache strategy (in-memory, Redis, HTTP cache headers), TTL, and invalidation approach.

Step 6: Check Serialization Overhead

Flag:

  • Over-fetching from database (SELECT * when only 3 fields are needed)
  • Serializing large nested objects when the client needs a subset
  • Missing field selection or GraphQL-style projection
  • Large payloads that could use pagination or streaming
Step 7: Present the Report

Format as:

## Performance Analysis: [endpoint/operation]

### Issues Found

#### 1. [Issue name] — Estimated improvement: [Xms -> Yms] or [X queries -> Y queries]
**Why it's slow:** [explanation]
**Fix:**
[code snippet with the fix]

#### 2. [Issue name] — Estimated improvement: [X%]
**Why it's slow:** [explanation]
**Fix:**
[code snippet with the fix]

### Summary
| Issue              | Impact    | Effort | Fix               |
|-------------------|-----------|--------|-------------------|
| N+1 on /orders    | High      | Low    | Add eager loading |
| Missing index     | Medium    | Low    | Add index         |
| No caching        | High      | Medium | Add Redis cache   |

Prioritize by impact-to-effort ratio. Fix high-impact, low-effort issues first.

Delivery

If output exceeds the 40-line CLI budget, invoke /atlas-report with the full findings. The HTML report is the output. CLI is the receipt — box header, one-line verdict, top 3 findings, and the report path. Never dump analysis to CLI.

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in plugins/ai-agency/tonone/skills/spine-perf of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • .claude-plugin/plugin.json

Open the folder on GitHubat commit cfae287

Compare with similar skills

Spine Perf next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Spine Perf compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Spine Perf this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.3kAutomated safety check: NotesMIT
Dotnet Backend Patternswshobson/agents40k8 repos~6.6kAutomated safety check: PassMIT
Frappe Core DatabaseImpertio-Studio/Frappe_Claude_Skill_Package189—~3.8kAutomated safety check: PassMIT
Fastapi Endpointdavila7/claude-code-templates33k—~3.9kAutomated safety check: PassMIT
Rls Patternsbybren-llc/safe-agentic-workflow423—~1.5kAutomated safety check: PassMIT
Cloudflare Hyperdrivesecondsky/claude-skills227—~1.8kAutomated safety check: PassMIT

Similar skills

  • Master C/.NET backend development patterns for building robust APIs, MCP servers, and enterprise applications.

    40k GitHub starsUsed in 8 repos~6.6k tokens
    Backend & APIsAuto-check passed
  • Frappe Core Database

    Impertio-Studio/Frappe_Claude_Skill_Package

    A skill your agent uses when performing database operations in ERPNext/Frappe v14-v16.

    189 GitHub stars~3.8k tokensUpdated 24 days ago
    DatabasesAuto-check passed
  • Fastapi Endpoint

    davila7/claude-code-templates

    Plan and build production-ready FastAPI endpoints with async SQLAlchemy, Pydantic v2 models, dependency injection for auth, and pytest tests.

    33k GitHub stars~3.9k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Rls Patterns

    bybren-llc/safe-agentic-workflow

    Row Level Security patterns for database operations. An agent skill from bybren-llc/safe-agentic-workflow.

    423 GitHub stars~1.5k tokensUpdated 2 mo ago
    Backend & APIsAuto-check passed
  • Cloudflare Hyperdrive

    secondsky/claude-skills

    Cloudflare Hyperdrive for Workers-to-database connections with pooling and caching.

    227 GitHub stars~1.8k tokensUpdated 13 days ago
    DatabasesAuto-check passed
  • Optimize JPA/Hibernate: entity design, query performance, N+1 prevention, caching strategies

    239 GitHub stars~531 tokensUpdated yesterday
    DatabasesAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Questions about Spine Perf

What does Spine Perf do?

Find and fix performance bottlenecks — N+1 queries, missing indexes, sync bottlenecks, caching gaps. Spine Perf is an agent skill from jeremylongshore/tons-of-skills-marketplace. Find and fix performance bottlenecks — N+1 queries, missing indexes, sync bottlenecks, caching gaps.

When should I use Spine Perf?

Spine Perf fits situations like: asked why is this slow; performance issue; optimize this endpoint.

How do I install Spine Perf in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill spine-perf -a claude-code`. Or copy the skill folder (plugins/ai-agency/tonone/skills/spine-perf in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/spine-perf in your project. Claude Code loads it when a task matches its description.

How do I install Spine Perf in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill spine-perf -a codex`. Or copy the skill folder (plugins/ai-agency/tonone/skills/spine-perf in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/spine-perf in your project. Codex loads it when a task matches its description.

Can I use Spine Perf in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill spine-perf -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/spine-perf, .gemini/skills/spine-perf, .github/skills/spine-perf and .opencode/skills/spine-perf in your project.

What does Spine Perf need to run?

Going by SKILL.md and its folder, Spine Perf needs the command-line tools its instructions call (python). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion.

Does Spine Perf access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Spine Perf safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Spine Perf use?

Spine Perf is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Spine Perf use?

About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Spine Perf?

Skills that share tags, products or a category with Spine Perf: Dotnet Backend Patterns (wshobson/agents, 40k stars), Frappe Core Database (Impertio-Studio/Frappe_Claude_Skill_Package, 189 stars), Fastapi Endpoint (davila7/claude-code-templates, 33k stars) and Rls Patterns (bybren-llc/safe-agentic-workflow, 423 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Spine Perf?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.