spine-perf

spine-perf is a skill for Claude Code from tonone-ai/tonone. It costs 55 tokens per session (1,239 once invoked), scanned A, original, MIT.

A performance investigation for backend applications that looks for slow database access, repeated queries, missing indexes, blocking work, and missing caching. It can also measure API response times when a running service and paths are provided.

In plain words
What is it for?
Use it to investigate a slow API, find N+1 queries, check database access, or locate bottlenecks in a backend service.
Why use it?
It helps replace guesses about slowness with specific findings and measurements. It can identify repeated database queries and slow endpoints that need attention.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the TodoWrite tool; mentions Claude Code.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python team/spine/scripts/spine_agent/perf_scan.py [target] [--base-url http://...] [--paths /api/orders /api/users] [--skip-n1] [--skip-endpoints].

Part of the engineering-team plugin — 80 skills shipped together

Good fit Use it to investigate a slow API, find N+1 queries, check database access, or locate bottlenecks in a backend service.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/tonone-ai/tonone
agentmods
npx agentmods add skills/tonone-ai/tonone/spine-perf

Made for: Claude Code.

Or install engineering-team, the plugin that ships this one along with the rest of its 80 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for spine-perf

README.md
[![agentmods](https://agentmods.dev/badge/skills/tonone-ai/tonone/spine-perf/github.svg)](https://agentmods.dev/skills/tonone-ai/tonone/spine-perf)
Your own site
<a href="https://agentmods.dev/skills/tonone-ai/tonone/spine-perf"><img src="https://agentmods.dev/badge/skills/tonone-ai/tonone/spine-perf/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for spine-perf

Your own site · 80×15
<a href="https://agentmods.dev/skills/tonone-ai/tonone/spine-perf"><img src="https://agentmods.dev/badge/skills/tonone-ai/tonone/spine-perf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,239 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00055 $0.01239
Opus 5.5 $0.00022 $0.00496
Sonnet 5.5 $0.00011 $0.00248
Haiku 4.5 $0.00006 $0.00124

Measured 17d ago against content hash d86ac1114c78, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

spine-perf scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 17d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

bundle/engineering-team/skills/spine-perf/SKILL.md · 136 lines

How it starts

The opening of the file, as written. The whole thing — 136 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

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

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

Read the full file on GitHub · 136 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 17d ago First seen · 136 lines · 55 tokens per session scan A d86ac1114c78

Subscribe to this mod's changes

spine-perf is a skill published in the GitHub repository tonone-ai/tonone (76 stars, last pushed 9d ago), licensed MIT. It adds 55 tokens to every session and 1,239 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-27.

Related

Other skills, from other repositories

error-handling-patterns

Master error handling patterns across languages including exceptions, Result types, error propagation, and graceful degradation to build resilient applications. Use when implementing error handling, designing APIs, or improving application reliability.

wshobson/agents · 43 tokens

verifying-external-behavior

Confirms what a third-party library, remote API, build backend, or scraped document actually does before writing code that depends on it — throwaway probes that run in seconds, permissive clients that forward wrong arguments instead of rejecting them, per-endpoint docs that don't generalize, response shapes that make…

AleksandarBisevac/claude-plugins · 138 tokens

dev-error-handling

Error handling strategy. Trigger when the user wants to implement error handling, exceptions, or error boundaries.

christopherlouet/claude-base · 25 tokens

bullmq-jobs

Skill "bullmq-jobs" from lukasrepublic/agentic-foundry, covering when to trigger, procedure, inputs, outputs and quality bar.

lukasrepublic/agentic-foundry · 0 tokens

Failure Modes & Observability in Design

Ensure designs specify failure modes, timeouts, error contracts, and observability for critical flows.

s977043/river-review · 27 tokens

sd-debug

The disciplined debug/fix loop the generic agent runs when a sd-verify / sd-test run FAILS (/foundry:sd-debug, software-delivery debug step, step 9). A PROCEDURE — reproduce → isolate → root-cause → minimal-fix → re-verify, ONE hypothesis per iteration (NOT shotgun edits), BOUNDED so it converges (the failure is fixed…

lukasrepublic/agentic-foundry · 117 tokens