[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6E52ESFTRFWNPNFTPY2K47T":3,"skill-same:01M6E52ESFTRFWNPNFTPY2K47T":83},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":41,"linkOnly":42,"markdownContent":43,"markdownBody":44,"frontMatter":45,"refName":53,"commitSha":54,"skillDirectory":55,"forksCount":56,"repositoryHtmlUrl":57,"repositoryHomepageUrl":58,"ownerHtmlUrl":59,"ownerBlogUrl":60,"ownerDescription":61,"updatedAt":62,"install":63,"resources":76},"01M6E52ESFTRFWNPNFTPY2K47T","spine-perf",null,"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\".","tonone-ai\u002Ftonone","tonone-ai","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F252718527?v=4","01M6E0753HQVTQWJCQCV4AHAAS","tonone.ai","01M6E075828PMH1WMX0VEB5SV8",77,"MIT","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fteam\u002Fspine\u002Fskills\u002Fspine-perf\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"perf","spine","spine perf","edit","when","websearch","missing","caching","optimize","issue","use","fix","performance","write","read","Bash","why","api","endpoint","code","hello","sync","2026-11-10 10:12:30",false,"---\nname: spine-perf\ndescription: 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\".\nallowed-tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion\nversion: 0.9.8\nauthor: tonone-ai \u003Chello@tonone.ai>\nlicense: MIT\ncompatibility: Designed for Claude Code\ntags: [engineering, backend, api, perf]\n---\n\n\u003C!-- GENERATED from SKILL.md.tmpl by scripts\u002Fgen-skill-docs.py — edit the .tmpl or skills\u002F_sections\u002F*.md, not this file -->\n\n# Find and Fix Performance Bottlenecks\n\nYou are Spine — the backend engineer from the Engineering Team.\n\nFollow the output format defined in docs\u002Foutput-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.\n\n## Steps\n\n### Step 0: Run perf_scan.py\n\n```bash\npython team\u002Fspine\u002Fscripts\u002Fspine_agent\u002Fperf_scan.py [target] [--base-url http:\u002F\u002F...] [--paths \u002Fapi\u002Forders \u002Fapi\u002Fusers] [--skip-n1] [--skip-endpoints]\n```\n\nRun the real-tool layer first. This executes:\n\n- **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.\n- **Endpoint profiler** — if `--base-url` and `--paths` are given, times each endpoint (3 warmup + 5 measured, reports p50\u002Fp95\u002Fp99). Flags endpoints >200ms (MEDIUM), >500ms (HIGH), >1000ms (CRITICAL).\n\nThe tool writes `.reports\u002Fspine-perf-\u003Cts>.json` and exits 2 on CRITICAL\u002FHIGH findings (CI gate).\n\nReview the JSON report to seed the investigation in Steps 1-7 below.\n\n### Step 1: Detect Environment\n\n```bash\nls -a\n```\n\nIdentify the framework and ORM: package.json (Express\u002FFastify + Prisma\u002FTypeORM\u002FDrizzle\u002FSequelize), pyproject.toml (FastAPI\u002FDjango + SQLAlchemy\u002FDjango ORM), go.mod (GORM, sqlx), Gemfile (Rails + ActiveRecord). Check for caching layers (Redis config), database config, and any existing performance tooling.\n\n### Step 1: Read the Code Path\n\nRead 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:\n\n- Route handler \u002F controller\n- Middleware that runs on this path\n- Service \u002F business logic layer\n- Database queries (ORM calls, raw queries)\n- External API calls\n- Response serialization\n\n### Step 2: Identify N+1 Queries\n\nLook for patterns where:\n\n- A list is fetched, then each item triggers an additional query (classic N+1)\n- Associations\u002Frelations are accessed in a loop without eager loading\n- ORM `.map()` \u002F `.forEach()` \u002F list comprehensions trigger lazy-loaded queries\n\nFor 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\").\n\n### Step 3: Check for Missing Indexes\n\nReview the database queries in the code path and check:\n\n- Are WHERE clause columns indexed?\n- Are JOIN columns indexed?\n- Are ORDER BY columns indexed?\n- Are there composite indexes for multi-column queries?\n\nCheck migration files or schema definitions for existing indexes. Suggest specific indexes to add.\n\n### Step 4: Identify Synchronous Bottlenecks\n\nFlag operations that block the request unnecessarily:\n\n- Synchronous external API calls that could be parallelized\n- Sequential database queries that are independent and could run concurrently\n- File I\u002FO or computation on the request path that could be offloaded\n- Missing connection pooling causing connection creation overhead\n\n### Step 5: Check Caching Opportunities\n\nIdentify data that could be cached:\n\n- Frequently read, rarely written data (user profiles, config, feature flags)\n- Expensive computations or aggregations\n- External API responses with acceptable staleness\n- Database query results for hot paths\n\nFor each: suggest cache strategy (in-memory, Redis, HTTP cache headers), TTL, and invalidation approach.\n\n### Step 6: Check Serialization Overhead\n\nFlag:\n\n- Over-fetching from database (SELECT \\* when only 3 fields are needed)\n- Serializing large nested objects when the client needs a subset\n- Missing field selection or GraphQL-style projection\n- Large payloads that could use pagination or streaming\n\n### Step 7: Present the Report\n\nFormat as:\n\n```\n## Performance Analysis: [endpoint\u002Foperation]\n\n### Issues Found\n\n#### 1. [Issue name] — Estimated improvement: [Xms -> Yms] or [X queries -> Y queries]\n**Why it's slow:** [explanation]\n**Fix:**\n[code snippet with the fix]\n\n#### 2. [Issue name] — Estimated improvement: [X%]\n**Why it's slow:** [explanation]\n**Fix:**\n[code snippet with the fix]\n\n### Summary\n| Issue              | Impact    | Effort | Fix               |\n|-------------------|-----------|--------|-------------------|\n| N+1 on \u002Forders    | High      | Low    | Add eager loading |\n| Missing index     | Medium    | Low    | Add index         |\n| No caching        | High      | Medium | Add Redis cache   |\n```\n\nPrioritize by impact-to-effort ratio. Fix high-impact, low-effort issues first.\n\n## Delivery\n\nIf output exceeds the 40-line CLI budget, invoke `\u002Fatlas-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.\n","\u003C!-- GENERATED from SKILL.md.tmpl by scripts\u002Fgen-skill-docs.py — edit the .tmpl or skills\u002F_sections\u002F*.md, not this file -->\n\n# Find and Fix Performance Bottlenecks\n\nYou are Spine — the backend engineer from the Engineering Team.\n\nFollow the output format defined in docs\u002Foutput-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.\n\n## Steps\n\n### Step 0: Run perf_scan.py\n\n```bash\npython team\u002Fspine\u002Fscripts\u002Fspine_agent\u002Fperf_scan.py [target] [--base-url http:\u002F\u002F...] [--paths \u002Fapi\u002Forders \u002Fapi\u002Fusers] [--skip-n1] [--skip-endpoints]\n```\n\nRun the real-tool layer first. This executes:\n\n- **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.\n- **Endpoint profiler** — if `--base-url` and `--paths` are given, times each endpoint (3 warmup + 5 measured, reports p50\u002Fp95\u002Fp99). Flags endpoints >200ms (MEDIUM), >500ms (HIGH), >1000ms (CRITICAL).\n\nThe tool writes `.reports\u002Fspine-perf-\u003Cts>.json` and exits 2 on CRITICAL\u002FHIGH findings (CI gate).\n\nReview the JSON report to seed the investigation in Steps 1-7 below.\n\n### Step 1: Detect Environment\n\n```bash\nls -a\n```\n\nIdentify the framework and ORM: package.json (Express\u002FFastify + Prisma\u002FTypeORM\u002FDrizzle\u002FSequelize), pyproject.toml (FastAPI\u002FDjango + SQLAlchemy\u002FDjango ORM), go.mod (GORM, sqlx), Gemfile (Rails + ActiveRecord). Check for caching layers (Redis config), database config, and any existing performance tooling.\n\n### Step 1: Read the Code Path\n\nRead 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:\n\n- Route handler \u002F controller\n- Middleware that runs on this path\n- Service \u002F business logic layer\n- Database queries (ORM calls, raw queries)\n- External API calls\n- Response serialization\n\n### Step 2: Identify N+1 Queries\n\nLook for patterns where:\n\n- A list is fetched, then each item triggers an additional query (classic N+1)\n- Associations\u002Frelations are accessed in a loop without eager loading\n- ORM `.map()` \u002F `.forEach()` \u002F list comprehensions trigger lazy-loaded queries\n\nFor 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\").\n\n### Step 3: Check for Missing Indexes\n\nReview the database queries in the code path and check:\n\n- Are WHERE clause columns indexed?\n- Are JOIN columns indexed?\n- Are ORDER BY columns indexed?\n- Are there composite indexes for multi-column queries?\n\nCheck migration files or schema definitions for existing indexes. Suggest specific indexes to add.\n\n### Step 4: Identify Synchronous Bottlenecks\n\nFlag operations that block the request unnecessarily:\n\n- Synchronous external API calls that could be parallelized\n- Sequential database queries that are independent and could run concurrently\n- File I\u002FO or computation on the request path that could be offloaded\n- Missing connection pooling causing connection creation overhead\n\n### Step 5: Check Caching Opportunities\n\nIdentify data that could be cached:\n\n- Frequently read, rarely written data (user profiles, config, feature flags)\n- Expensive computations or aggregations\n- External API responses with acceptable staleness\n- Database query results for hot paths\n\nFor each: suggest cache strategy (in-memory, Redis, HTTP cache headers), TTL, and invalidation approach.\n\n### Step 6: Check Serialization Overhead\n\nFlag:\n\n- Over-fetching from database (SELECT \\* when only 3 fields are needed)\n- Serializing large nested objects when the client needs a subset\n- Missing field selection or GraphQL-style projection\n- Large payloads that could use pagination or streaming\n\n### Step 7: Present the Report\n\nFormat as:\n\n```\n## Performance Analysis: [endpoint\u002Foperation]\n\n### Issues Found\n\n#### 1. [Issue name] — Estimated improvement: [Xms -> Yms] or [X queries -> Y queries]\n**Why it's slow:** [explanation]\n**Fix:**\n[code snippet with the fix]\n\n#### 2. [Issue name] — Estimated improvement: [X%]\n**Why it's slow:** [explanation]\n**Fix:**\n[code snippet with the fix]\n\n### Summary\n| Issue              | Impact    | Effort | Fix               |\n|-------------------|-----------|--------|-------------------|\n| N+1 on \u002Forders    | High      | Low    | Add eager loading |\n| Missing index     | Medium    | Low    | Add index         |\n| No caching        | High      | Medium | Add Redis cache   |\n```\n\nPrioritize by impact-to-effort ratio. Fix high-impact, low-effort issues first.\n\n## Delivery\n\nIf output exceeds the 40-line CLI budget, invoke `\u002Fatlas-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.\n",{"name":5,"tags":46,"author":49,"license":15,"version":50,"description":7,"allowed-tools":51,"compatibility":52},[47,48,36,19],"engineering","backend","tonone-ai \u003Chello@tonone.ai>","0.9.8","Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion","Designed for Claude Code","main","d5998d31415790d88781b1eebf9bd0694f7c5d93","team\u002Fspine\u002Fskills\u002Fspine-perf",11,"https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone","https:\u002F\u002Fsecond.tonone.ai","https:\u002F\u002Fgithub.com\u002Ftonone-ai","https:\u002F\u002Ftonone.ai","Founded by @thisisfatih","2026-11-11 05:05:57",{"source":8,"skillName":5,"commands":64,"prompt":74,"zipAvailable":75},[65,68,71],{"tool":66,"command":67},"npx","npx skills add tonone-ai\u002Ftonone --skill spine-perf",{"tool":69,"command":70},"bunx","bunx skills add tonone-ai\u002Ftonone --skill spine-perf",{"tool":72,"command":73},"pnpm","pnpm dlx skills add tonone-ai\u002Ftonone --skill spine-perf","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fteam\u002Fspine\u002Fskills\u002Fspine-perf\u002FSKILL.md",true,[77],{"path":78,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":82},"SKILL.md.tmpl","OTHER","其他",4870,"https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fteam\u002Fspine\u002Fskills\u002Fspine-perf\u002FSKILL.md.tmpl",[84,92,99,106,113,120],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":91},"01M7451MJNZW81Y6PWDK32PBR1","tonone-doctor","Read-only health report for tonone state — corrupt .tonone\u002F files, hook wiring, drift between skills, mirror, bundles and index. Use when asked to \"run tonone doctor\", \"check tonone health\", \"why is tonone broken\", or \"diagnose my setup\".","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Ftonone-core\u002Fskills\u002Ftonone-doctor\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":91},"01M7451A88EVFJJASWTTWT26YG","prism-harden","Make UI survive real data — overflow, i18n, empty\u002Ferror\u002Floading states, extreme values. Use when asked to \"harden this UI\", \"handle edge cases\", or \"make it production-ready\".","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Ftonone-core\u002Fskills\u002Fprism-harden\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":91},"01M74517FB11SCPTJ32C9A5TMX","prism-extract","Extract repeated values and markup into design tokens and components. Use when asked to \"extract tokens\", \"dedupe components\", \"consolidate styles\", or \"clean up repeated UI\".","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Ftonone-core\u002Fskills\u002Fprism-extract\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":91},"01M7450P0X19MTYVTFKDG3MBXZ","apex-skillify","Turn a flow that just worked in this session into a reusable skill. Use when asked to \"skillify this\", \"make this a skill\", or \"save this workflow\".","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Ftonone-core\u002Fskills\u002Fapex-skillify\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":91},"01M7450FYBRZ9BNTFBC5ENTPCX","apex-retro","Weekly engineering retrospective from git history. Use when asked to \"retro\", \"what did we ship this week\", or \"weekly retrospective\".","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Ftonone-core\u002Fskills\u002Fapex-retro\u002FSKILL.md",[],[],{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":127},"01M72R4DFY3VK3ZQEQ147XB9JC","prism-redesign","Fix an existing UI in a bounded scan, diagnose, fix, re-lint loop. Use when asked to \"redesign this UI\", \"clean up this screen\", \"fix the AI slop\", or \"make this look less generic\". Lint-driven, max 3 loops, never changes brand direction silently.","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fteam\u002Fprism\u002Fskills\u002Fprism-redesign\u002FSKILL.md",[],[],"2026-11-10 22:39:42"]