[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ESE322EQTSW11WAC782SWG":3,"skill-same:01M7ESE322EQTSW11WAC782SWG":53},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7ESE322EQTSW11WAC782SWG","write-query",null,"Write optimized SQL for your dialect with best practices. Use when translating a natural-language data need into SQL, building a multi-CTE query with joins and aggregations, optimizing a query against a large partitioned table, or getting dialect-specific syntax for Snowflake, BigQuery, Postgres, etc.","TanNhatCMS\u002Fjarvis","TanNhatCMS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F113796420?v=4","01M753MV17KG5CD3152G3WQEQY","KietNT","01M7EKEDYVYQ6PWVJJMZ911VMX",0,"MIT","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-kw-write-query\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: write-query\ndescription: Write optimized SQL for your dialect with best practices. Use when translating a natural-language data need into SQL, building a multi-CTE query with joins and aggregations, optimizing a query against a large partitioned table, or getting dialect-specific syntax for Snowflake, BigQuery, Postgres, etc.\nargument-hint: \"\u003Cdescription of what data you need>\"\n---\n\n\u003C!-- Provenance: adapted from anthropics\u002Fknowledge-work-plugins (Apache-2.0, (c) Anthropic).\nOriginal skill: https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fknowledge-work-plugins\u002Ftree\u002Fmain\u002Fdata\u002Fskills\u002Fwrite-query. Changes for Muse AI: Claude\u002FCowork product refs -> Muse AI; MCP -> connector; CLAUDE.md -> MUSE.md; ${CLAUDE_PLUGIN_ROOT} -> this skill's directory; \u002Fplugin:command refs -> skill refs. -->\n\n\n# \u002Fwrite-query - Write Optimized SQL\n\n> If you see unfamiliar placeholders or need to check which tools are connected, see [CONNECTORS.md](.\u002FCONNECTORS.md).\n\nWrite a SQL query from a natural language description, optimized for your specific SQL dialect and following best practices.\n\n## Usage\n\n```\n\u002Fwrite-query \u003Cdescription of what data you need>\n```\n\n## Workflow\n\n### 1. Understand the Request\n\nParse the user's description to identify:\n\n- **Output columns**: What fields should the result include?\n- **Filters**: What conditions limit the data (time ranges, segments, statuses)?\n- **Aggregations**: Are there GROUP BY operations, counts, sums, averages?\n- **Joins**: Does this require combining multiple tables?\n- **Ordering**: How should results be sorted?\n- **Limits**: Is there a top-N or sample requirement?\n\n### 2. Determine SQL Dialect\n\nIf the user's SQL dialect is not already known, ask which they use:\n\n- **PostgreSQL** (including Aurora, RDS, Supabase, Neon)\n- **Snowflake**\n- **BigQuery** (Google Cloud)\n- **Redshift** (Amazon)\n- **Databricks SQL**\n- **MySQL** (including Aurora MySQL, PlanetScale)\n- **SQL Server** (Microsoft)\n- **DuckDB**\n- **SQLite**\n- **Other** (ask for specifics)\n\nRemember the dialect for future queries in the same session.\n\n### 3. Discover Schema (If Warehouse Connected)\n\nIf a data warehouse connector is connected:\n\n1. Search for relevant tables based on the user's description\n2. Inspect column names, types, and relationships\n3. Check for partitioning or clustering keys that affect performance\n4. Look for pre-built views or materialized views that might simplify the query\n\n### 4. Write the Query\n\nFollow these best practices:\n\n**Structure:**\n- Use CTEs (WITH clauses) for readability when queries have multiple logical steps\n- One CTE per logical transformation or data source\n- Name CTEs descriptively (e.g., `daily_signups`, `active_users`, `revenue_by_product`)\n\n**Performance:**\n- Never use `SELECT *` in production queries -- specify only needed columns\n- Filter early (push WHERE clauses as close to the base tables as possible)\n- Use partition filters when available (especially date partitions)\n- Prefer `EXISTS` over `IN` for subqueries with large result sets\n- Use appropriate JOIN types (don't use LEFT JOIN when INNER JOIN is correct)\n- Avoid correlated subqueries when a JOIN or window function works\n- Be mindful of exploding joins (many-to-many)\n\n**Readability:**\n- Add comments explaining the \"why\" for non-obvious logic\n- Use consistent indentation and formatting\n- Alias tables with meaningful short names (not just `a`, `b`, `c`)\n- Put each major clause on its own line\n\n**Dialect-specific optimizations:**\n- Apply dialect-specific syntax and functions (see `sql-queries` skill for details)\n- Use dialect-appropriate date functions, string functions, and window syntax\n- Note any dialect-specific performance features (e.g., Snowflake clustering, BigQuery partitioning)\n\n### 5. Present the Query\n\nProvide:\n\n1. **The complete query** in a SQL code block with syntax highlighting\n2. **Brief explanation** of what each CTE or section does\n3. **Performance notes** if relevant (expected cost, partition usage, potential bottlenecks)\n4. **Modification suggestions** -- how to adjust for common variations (different time range, different granularity, additional filters)\n\n### 6. Offer to Execute\n\nIf a data warehouse is connected, offer to run the query and analyze the results. If the user wants to run it themselves, the query is ready to copy-paste.\n\n## Examples\n\n**Simple aggregation:**\n```\n\u002Fwrite-query Count of orders by status for the last 30 days\n```\n\n**Complex analysis:**\n```\n\u002Fwrite-query Cohort retention analysis -- group users by their signup month, then show what percentage are still active (had at least one event) at 1, 3, 6, and 12 months after signup\n```\n\n**Performance-critical:**\n```\n\u002Fwrite-query We have a 500M row events table partitioned by date. Find the top 100 users by event count in the last 7 days with their most recent event type.\n```\n\n## Tips\n\n- Mention your SQL dialect upfront to get the right syntax immediately\n- If you know the table names, include them -- otherwise Muse AI will help you find them\n- Specify if you need the query to be idempotent (safe to re-run) or one-time\n- For recurring queries, mention if it should be parameterized for date ranges\n","\u003C!-- Provenance: adapted from anthropics\u002Fknowledge-work-plugins (Apache-2.0, (c) Anthropic).\nOriginal skill: https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fknowledge-work-plugins\u002Ftree\u002Fmain\u002Fdata\u002Fskills\u002Fwrite-query. Changes for Muse AI: Claude\u002FCowork product refs -> Muse AI; MCP -> connector; CLAUDE.md -> MUSE.md; ${CLAUDE_PLUGIN_ROOT} -> this skill's directory; \u002Fplugin:command refs -> skill refs. -->\n\n\n# \u002Fwrite-query - Write Optimized SQL\n\n> If you see unfamiliar placeholders or need to check which tools are connected, see [CONNECTORS.md](.\u002FCONNECTORS.md).\n\nWrite a SQL query from a natural language description, optimized for your specific SQL dialect and following best practices.\n\n## Usage\n\n```\n\u002Fwrite-query \u003Cdescription of what data you need>\n```\n\n## Workflow\n\n### 1. Understand the Request\n\nParse the user's description to identify:\n\n- **Output columns**: What fields should the result include?\n- **Filters**: What conditions limit the data (time ranges, segments, statuses)?\n- **Aggregations**: Are there GROUP BY operations, counts, sums, averages?\n- **Joins**: Does this require combining multiple tables?\n- **Ordering**: How should results be sorted?\n- **Limits**: Is there a top-N or sample requirement?\n\n### 2. Determine SQL Dialect\n\nIf the user's SQL dialect is not already known, ask which they use:\n\n- **PostgreSQL** (including Aurora, RDS, Supabase, Neon)\n- **Snowflake**\n- **BigQuery** (Google Cloud)\n- **Redshift** (Amazon)\n- **Databricks SQL**\n- **MySQL** (including Aurora MySQL, PlanetScale)\n- **SQL Server** (Microsoft)\n- **DuckDB**\n- **SQLite**\n- **Other** (ask for specifics)\n\nRemember the dialect for future queries in the same session.\n\n### 3. Discover Schema (If Warehouse Connected)\n\nIf a data warehouse connector is connected:\n\n1. Search for relevant tables based on the user's description\n2. Inspect column names, types, and relationships\n3. Check for partitioning or clustering keys that affect performance\n4. Look for pre-built views or materialized views that might simplify the query\n\n### 4. Write the Query\n\nFollow these best practices:\n\n**Structure:**\n- Use CTEs (WITH clauses) for readability when queries have multiple logical steps\n- One CTE per logical transformation or data source\n- Name CTEs descriptively (e.g., `daily_signups`, `active_users`, `revenue_by_product`)\n\n**Performance:**\n- Never use `SELECT *` in production queries -- specify only needed columns\n- Filter early (push WHERE clauses as close to the base tables as possible)\n- Use partition filters when available (especially date partitions)\n- Prefer `EXISTS` over `IN` for subqueries with large result sets\n- Use appropriate JOIN types (don't use LEFT JOIN when INNER JOIN is correct)\n- Avoid correlated subqueries when a JOIN or window function works\n- Be mindful of exploding joins (many-to-many)\n\n**Readability:**\n- Add comments explaining the \"why\" for non-obvious logic\n- Use consistent indentation and formatting\n- Alias tables with meaningful short names (not just `a`, `b`, `c`)\n- Put each major clause on its own line\n\n**Dialect-specific optimizations:**\n- Apply dialect-specific syntax and functions (see `sql-queries` skill for details)\n- Use dialect-appropriate date functions, string functions, and window syntax\n- Note any dialect-specific performance features (e.g., Snowflake clustering, BigQuery partitioning)\n\n### 5. Present the Query\n\nProvide:\n\n1. **The complete query** in a SQL code block with syntax highlighting\n2. **Brief explanation** of what each CTE or section does\n3. **Performance notes** if relevant (expected cost, partition usage, potential bottlenecks)\n4. **Modification suggestions** -- how to adjust for common variations (different time range, different granularity, additional filters)\n\n### 6. Offer to Execute\n\nIf a data warehouse is connected, offer to run the query and analyze the results. If the user wants to run it themselves, the query is ready to copy-paste.\n\n## Examples\n\n**Simple aggregation:**\n```\n\u002Fwrite-query Count of orders by status for the last 30 days\n```\n\n**Complex analysis:**\n```\n\u002Fwrite-query Cohort retention analysis -- group users by their signup month, then show what percentage are still active (had at least one event) at 1, 3, 6, and 12 months after signup\n```\n\n**Performance-critical:**\n```\n\u002Fwrite-query We have a 500M row events table partitioned by date. Find the top 100 users by event count in the last 7 days with their most recent event type.\n```\n\n## Tips\n\n- Mention your SQL dialect upfront to get the right syntax immediately\n- If you know the table names, include them -- otherwise Muse AI will help you find them\n- Specify if you need the query to be idempotent (safe to re-run) or one-time\n- For recurring queries, mention if it should be parameterized for date ranges\n",{"name":5,"description":7,"argument-hint":24},"\u003Cdescription of what data you need>","main","af388a77c2fe5e0b4fd879cca4300a0ffa9a6579","skills\u002Fams-kw-write-query",1,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis","https:\u002F\u002Fgithub.com\u002FTanNhatCMS","https:\u002F\u002Fmrkiet.name.vn","2026-11-07 14:23:08",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add TanNhatCMS\u002Fjarvis --skill write-query",{"tool":39,"command":40},"bunx","bunx skills add TanNhatCMS\u002Fjarvis --skill write-query",{"tool":42,"command":43},"pnpm","pnpm dlx skills add TanNhatCMS\u002Fjarvis --skill write-query","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-kw-write-query\u002FSKILL.md",true,[47],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"CONNECTORS.md","REFERENCE","参考文档",1070,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-kw-write-query\u002FCONNECTORS.md",[54,61,69,76,83,90],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M7EWYJR0J8DARY7E59Z6Y9MV","web-scrape","Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open\u002Ffetch fails on JS-heavy pages, or when you need clean markdown\u002Fstructured extraction from a site. Requires FIRECRAWL_API_KEY.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fweb-scrape\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":65,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7EWYBN5P6F2AJG3FR24T9BP","design-taste-frontend","tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML\u002FCSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, \"AI-made\", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7EWY8FQFNQ2GB7NZZWGSSDX","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-tdd\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7EWY5SHBFRH1HDHVWM9K7TV","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-debugging\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7EWY3NM0Z0JAKS7HDZ24K66","requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-code-review\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M7EWY0WRMWX4M9ZFY0WKC593","brainstorming","You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-brainstorming\u002FSKILL.md",[],[]]