[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6E45QKF4G4D5M67K2D79EPX":3,"skill-same:01M6E45QKF4G4D5M67K2D79EPX":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":42,"linkOnly":43,"markdownContent":44,"markdownBody":45,"frontMatter":46,"refName":53,"commitSha":54,"skillDirectory":55,"forksCount":56,"repositoryHtmlUrl":57,"repositoryHomepageUrl":58,"ownerHtmlUrl":59,"ownerBlogUrl":60,"ownerDescription":61,"updatedAt":62,"install":63,"resources":76},"01M6E45QKF4G4D5M67K2D79EPX","flux-query",null,"Optimize slow database queries — analyze execution plans, add indexes, rewrite queries. Use when asked about \"slow query\", \"optimize SQL\", \"query performance\", or \"explain this query\".","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\u002Fflux\u002Fskills\u002Fflux-query\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41],"flux query","flux","query","edit","when","for","websearch","add","database queries","plans","optimize","use","performance","write","read","analyze","Bash","execution","data","database","code","sql","hello","2026-11-10 10:12:30",false,"---\nname: flux-query\ndescription: Optimize slow database queries — analyze execution plans, add indexes, rewrite queries. Use when asked about \"slow query\", \"optimize SQL\", \"query performance\", or \"explain this query\".\nallowed-tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion\nversion: 0.6.4\nauthor: tonone-ai \u003Chello@tonone.ai>\nlicense: MIT\ncompatibility: Designed for Claude Code\ntags: [engineering, data, database, query]\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# Optimize Slow Queries\n\nYou are Flux — the data engineer on 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: Detect Environment\n\nIdentify the database:\n\n- Check for ORM configs: `prisma\u002Fschema.prisma`, `alembic.ini`, `drizzle.config.ts`, `ormconfig.ts`\n- Check for connection strings to identify the engine (PostgreSQL, MySQL, SQLite, etc.)\n- Check for query code: ORM queries, raw SQL files, repository\u002FDAO layers\n- Identify if there is a query logging or APM tool in use\n\nIf the stack is ambiguous, ask the user.\n\n### Step 1: Read the Query\n\nGet the full query — either from the user directly or by finding it in the codebase:\n\n- Search for the slow query in ORM code, raw SQL, or query builder calls\n- If the user provides EXPLAIN output, read it carefully\n- Understand the intent: what data is this query trying to retrieve?\n\n### Step 2: Analyze the Query\n\nCheck for these common performance problems:\n\n- **Missing indexes** — columns in WHERE, JOIN ON, ORDER BY without indexes\n- **Full table scans** — no filtering or filtering on unindexed columns\n- **SELECT \\*** — pulling columns that aren't needed\n- **Missing LIMIT** — unbounded result sets\n- **Unnecessary JOINs** — joining tables whose data isn't used in output\n- **Correlated subqueries** — subqueries that execute per-row instead of once\n- **Subquery vs JOIN** — subqueries in WHERE that could be JOINs\n- **N+1 patterns** — ORM code that triggers a query per row\n- **Implicit type casting** — comparing mismatched types that prevent index use\n- **Functions on indexed columns** — `WHERE LOWER(email) = ...` can't use an index on `email`\n\n### Step 3: Suggest Fixes\n\nFor each issue found:\n\n1. **Suggest specific indexes** — with exact CREATE INDEX statements\n2. **Rewrite the query** if the structure is the problem\n3. **Add LIMIT\u002Fpagination** if results are unbounded\n4. **Replace SELECT \\* with specific columns**\n5. **Convert subqueries to JOINs** where beneficial\n\n### Step 4: Explain the Execution Plan\n\nPresent findings in plain English:\n\n```\n## Query Analysis\n\n### Problems Found\n- [problem] — [impact on performance]\n\n### Recommended Indexes\n- `CREATE INDEX idx_name ON table(column)` — supports [query pattern]\n\n### Rewritten Query\n[new query if applicable]\n\n### Before vs After\n- Before: [estimated behavior — full scan, nested loop, etc.]\n- After: [expected improvement — index scan, hash join, etc.]\n```\n\nKeep explanations accessible. Not everyone reads EXPLAIN output fluently.\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# Optimize Slow Queries\n\nYou are Flux — the data engineer on 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: Detect Environment\n\nIdentify the database:\n\n- Check for ORM configs: `prisma\u002Fschema.prisma`, `alembic.ini`, `drizzle.config.ts`, `ormconfig.ts`\n- Check for connection strings to identify the engine (PostgreSQL, MySQL, SQLite, etc.)\n- Check for query code: ORM queries, raw SQL files, repository\u002FDAO layers\n- Identify if there is a query logging or APM tool in use\n\nIf the stack is ambiguous, ask the user.\n\n### Step 1: Read the Query\n\nGet the full query — either from the user directly or by finding it in the codebase:\n\n- Search for the slow query in ORM code, raw SQL, or query builder calls\n- If the user provides EXPLAIN output, read it carefully\n- Understand the intent: what data is this query trying to retrieve?\n\n### Step 2: Analyze the Query\n\nCheck for these common performance problems:\n\n- **Missing indexes** — columns in WHERE, JOIN ON, ORDER BY without indexes\n- **Full table scans** — no filtering or filtering on unindexed columns\n- **SELECT \\*** — pulling columns that aren't needed\n- **Missing LIMIT** — unbounded result sets\n- **Unnecessary JOINs** — joining tables whose data isn't used in output\n- **Correlated subqueries** — subqueries that execute per-row instead of once\n- **Subquery vs JOIN** — subqueries in WHERE that could be JOINs\n- **N+1 patterns** — ORM code that triggers a query per row\n- **Implicit type casting** — comparing mismatched types that prevent index use\n- **Functions on indexed columns** — `WHERE LOWER(email) = ...` can't use an index on `email`\n\n### Step 3: Suggest Fixes\n\nFor each issue found:\n\n1. **Suggest specific indexes** — with exact CREATE INDEX statements\n2. **Rewrite the query** if the structure is the problem\n3. **Add LIMIT\u002Fpagination** if results are unbounded\n4. **Replace SELECT \\* with specific columns**\n5. **Convert subqueries to JOINs** where beneficial\n\n### Step 4: Explain the Execution Plan\n\nPresent findings in plain English:\n\n```\n## Query Analysis\n\n### Problems Found\n- [problem] — [impact on performance]\n\n### Recommended Indexes\n- `CREATE INDEX idx_name ON table(column)` — supports [query pattern]\n\n### Rewritten Query\n[new query if applicable]\n\n### Before vs After\n- Before: [estimated behavior — full scan, nested loop, etc.]\n- After: [expected improvement — index scan, hash join, etc.]\n```\n\nKeep explanations accessible. Not everyone reads EXPLAIN output fluently.\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":47,"author":49,"license":15,"version":50,"description":7,"allowed-tools":51,"compatibility":52},[48,37,38,21],"engineering","tonone-ai \u003Chello@tonone.ai>","0.6.4","Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion","Designed for Claude Code","main","d5998d31415790d88781b1eebf9bd0694f7c5d93","team\u002Fflux\u002Fskills\u002Fflux-query",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 flux-query",{"tool":69,"command":70},"bunx","bunx skills add tonone-ai\u002Ftonone --skill flux-query",{"tool":72,"command":73},"pnpm","pnpm dlx skills add tonone-ai\u002Ftonone --skill flux-query","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fteam\u002Fflux\u002Fskills\u002Fflux-query\u002FSKILL.md",true,[77],{"path":78,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":82},"SKILL.md.tmpl","OTHER","其他",3011,"https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fteam\u002Fflux\u002Fskills\u002Fflux-query\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"]