[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6E09JM8GXKV11ZP7JYJ4FFB":3,"skill-same:01M6E09JM8GXKV11ZP7JYJ4FFB":92},{"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":28,"publishedAt":57,"linkOnly":58,"markdownContent":59,"markdownBody":60,"frontMatter":61,"refName":68,"commitSha":69,"skillDirectory":70,"forksCount":71,"repositoryHtmlUrl":72,"repositoryHomepageUrl":73,"ownerHtmlUrl":74,"ownerBlogUrl":75,"ownerDescription":76,"updatedAt":77,"install":78,"resources":91},"01M6E09JM8GXKV11ZP7JYJ4FFB","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\u002Fbundle\u002Fengineering-team\u002Fskills\u002Fflux-query\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56],"flux query","flux","query","use","when","for","websearch","add","rewrite","database queries","plans","optimize","task","queries","performance","webfetch","edit","write","read","explain","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":62,"author":64,"license":15,"version":65,"description":7,"allowed-tools":66,"compatibility":67},[63,52,53,31],"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","bundle\u002Fengineering-team\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":79,"prompt":89,"zipAvailable":90},[80,83,86],{"tool":81,"command":82},"npx","npx skills add tonone-ai\u002Ftonone --skill flux-query",{"tool":84,"command":85},"bunx","bunx skills add tonone-ai\u002Ftonone --skill flux-query",{"tool":87,"command":88},"pnpm","pnpm dlx skills add tonone-ai\u002Ftonone --skill flux-query","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Fengineering-team\u002Fskills\u002Fflux-query\u002FSKILL.md",true,[],[93,101,108,113,118,125],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":100},"01M72QSK7R99K8FWYFNYTXJGR2","helm-autoplan","Chained brief-to-decision pipeline. Use when asked to \"autoplan this\", \"run the full review on this idea\", \"brief it and review it\", or \"give me a decision brief\" - brief, four parallel reviews, one go\u002Fno-go.","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fteam\u002Fhelm\u002Fskills\u002Fhelm-autoplan\u002FSKILL.md",[],[],"2026-11-10 22:39:42",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":100},"01M72Q6V4CB8E877RT5KJRSSB7","apex-second-opinion","Optional cross-model review of a diff or plan through an external CLI (codex, gemini, llm) already on PATH, with redaction and per-run consent. Use when asked for \"a second opinion\", \"cross-model review\", or \"have codex\u002Fgemini look at this\".","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fteam\u002Fapex\u002Fskills\u002Fapex-second-opinion\u002FSKILL.md",[],[],{"skillNo":109,"name":95,"nameZh":6,"description":96,"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":100},"01M72PDNJ3NS66X4QZ6AM5BG91","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fskills\u002Fhelm-autoplan\u002FSKILL.md",[],[],{"skillNo":114,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":100},"01M72NV58FG71X4Y7H8E6W721A","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fskills\u002Fapex-second-opinion\u002FSKILL.md",[],[],{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":100},"01M72NEBG81JH7YNSDXYT8NHHE","helm-office-hours","Forcing-function intake before any brief. Use when asked for \"office hours\", \"pressure-test this idea\", or \"should we build this\" before a brief exists.","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Fproduct-team\u002Fskills\u002Fhelm-office-hours\u002FSKILL.md",[],[],{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":100},"01M72NE7AS597YW6999C56CESR","helm-init","Short interview that writes PRODUCT.md, the durable product truth other skills read. Use when asked to \"init product\", \"write PRODUCT.md\", or \"set up product context\". Prefills from README and repo, asks max 6 questions.","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Fproduct-team\u002Fskills\u002Fhelm-init\u002FSKILL.md",[],[]]