[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EMXDYYA72EWJ25PZNTNTWE":3,"skill-same:01M7EMXDYYA72EWJ25PZNTNTWE":47},{"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},"01M7EMXDYYA72EWJ25PZNTNTWE","elasticsearch-pro-dev",null,"Elasticsearch guidance — index design, mappings, query DSL, aggregations, cluster operations, and performance tuning.","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-elasticsearch-pro-dev\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: elasticsearch-pro-dev\ndescription: Elasticsearch guidance — index design, mappings, query DSL, aggregations, cluster operations, and performance tuning.\ncategory: development\n---\n\n## Overview\n\nElasticsearch is a distributed search and analytics engine: JSON documents indexed into shards, queried with a rich DSL, aggregated at speed. It powers full-text search, log analytics, and metrics — workloads where relational databases struggle. It's also a distributed system with real operational demands and a query language that rewards precision.\n\nThe two disciplines are index design (mappings, analyzers, sharding) and query design (relevance, filters, aggregations). Get the mapping wrong and you're reindexing; get the cluster wrong and you're firefighting. This skill covers both, plus production operations.\n\n## When to use\n\n- Adding full-text search to an application.\n- Designing indexes, mappings, and analyzers.\n- Writing relevance-tuned queries and aggregations.\n- Choosing between Elasticsearch, OpenSearch, Postgres FTS, or Algolia\u002FTypesense.\n- Operating clusters (sharding, replicas, upgrades, snapshots).\n- Debugging slow queries, shard problems, or mapping explosions.\n- Building log\u002Fmetrics analytics on the Elastic stack.\n\n## Core concepts\n\n- **Indexes, shards, replicas.** An index splits into primary shards (parallelism unit) distributed across nodes; replicas copy shards for HA and read scale. Shard count is set at creation — oversharding wastes resources, undersharding caps throughput. Size shards ~10-50GB.\n- **Mappings.** Field types (text vs keyword vs numeric vs date) determine what's searchable and how. `text` for full-text search (analyzed), `keyword` for sorting\u002Faggregations\u002Fexact match. Multi-fields (`text` + `keyword` sub-field) give both.\n- **Dynamic mapping dangers.** Auto-detected mappings guess types — sometimes wrong (dates as text, numbers as strings). A new field per document (mapping explosion) can destabilize the cluster. Prefer explicit mappings with `dynamic: strict` or `runtime` for unknowns.\n- **Analyzers.** Character filters → tokenizer → token filters turn text into searchable tokens. Language analyzers (stemming, stop words) dramatically affect relevance; custom analyzers for special content (part numbers, code).\n- **Query DSL: queries vs filters.** `must`\u002F`should` affect relevance scoring; `filter` clauses are yes\u002Fno (cacheable, faster). Structure searches as: filters for constraints, queries for relevance-ranked text.\n- **Relevance tuning.** `bool` combinations, `multi_match` types (best_fields, most_fields, cross_fields), boosting, function_score for business rules (recency, popularity). Tune with real queries and judgments, not guesses.\n- **Aggregations.** Bucket (terms, date_histogram, ranges) and metric (avg, percentiles, cardinality) aggs for analytics. They're powerful and expensive — scope them with filters, limit bucket counts, and watch memory.\n- **Pagination.** `from`\u002F`size` for shallow pages; `search_after` (with a tiebreaker sort) for deep pagination; Scroll API for bulk export. Deep `from` is expensive — it re-executes across shards.\n- **Index lifecycle (ILM).** Hot → warm → cold → delete policies automate rollover, shrink, and deletion — essential for time-series data (logs, metrics). Rollover by size\u002Fage, not by calendar alone.\n- **Reindexing.** Mappings can't change in place (mostly) — reindex into a new index, then alias-swap. Aliases decouple index names from the physical index; always point reads at aliases.\n- **Snapshots.** S3\u002FGCS repository snapshots for backup and recovery — the only supported backup. Test restores; snapshot before upgrades.\n- **Cluster health.** Green\u002Fyellow\u002Fred refer to shard allocation, not performance. Yellow (missing replicas) is degraded; red (missing primaries) is data-loss territory. Monitor pending tasks and relocation storms too.\n- **Circuit breakers and memory.** Fielddata and large aggregations can OOM nodes; circuit breakers protect the cluster but trip on legitimate heavy queries — size heaps (≤50% RAM, ≤~30GB) and keep aggregations bounded.\n- **Security.** TLS, authentication, role-based index privileges, API keys per application. Never expose Elasticsearch directly to the internet — it's a ransomware magnet.\n\n## Practical workflow\n\n1. **Design the mapping first.** Explicit types per field; `text` + `keyword` multi-fields where both search and sort\u002Fagg are needed; `dynamic: strict` to catch surprises.\n   ```json\n   { \"mappings\": { \"dynamic\": \"strict\",\n     \"properties\": {\n       \"title\": { \"type\": \"text\", \"fields\": { \"keyword\": { \"type\": \"keyword\" } } },\n       \"status\": { \"type\": \"keyword\" },\n       \"price\": { \"type\": \"scaled_float\", \"scaling_factor\": 100 },\n       \"created_at\": { \"type\": \"date\" }\n     } } }\n   ```\n2. **Choose analyzers deliberately.** Default is fine for English prose; language analyzers per language field; custom analyzers for SKUs\u002Fcodes (keyword tokenizer + lowercase).\n3. **Index through aliases.** Write to `products-write`, read from `products-read`; reindex-and-swap for mapping changes with zero downtime.\n4. **Structure queries: filters + relevance.** Filters for constraints (status, category, price range), `multi_match` for the text, boosts for business priority.\n   ```json\n   { \"query\": { \"bool\": {\n     \"must\": { \"multi_match\": { \"query\": \"wireless headphones\", \"fields\": [\"title^3\", \"description\"] } },\n     \"filter\": [ { \"term\": { \"status\": \"active\" } }, { \"range\": { \"price\": { \"lte\": 200 } } } ]\n   } } }\n   ```\n5. **Paginate with `search_after`.** Sort by `_score` + `_id` tiebreaker (or timestamp + id); pass the last hit's sort values. Reserve `from\u002Fsize` for shallow admin pages.\n6. **Aggregate carefully.** Filter before aggregating; cap `terms` size; use `composite` aggs for paginating through buckets; watch the fielddata circuit breaker.\n7. **Manage lifecycle with ILM.** Rollover hot indices by size\u002Fage; move to warm (fewer replicas, force-merge), then delete. Automate from day one for time-series data.\n8. **Operate.** Snapshot to object storage on a schedule; monitor shard balance, JVM heap, GC, indexing rate, and query latency; upgrade rolling with compatibility checks.\n\n   ```json\n   PUT _index_template\u002Flogs-template\n   { \"index_patterns\": [\"logs-*\"],\n     \"template\": { \"settings\": { \"number_of_shards\": 3 },\n       \"mappings\": { \"dynamic\": \"strict\", \"properties\": {\n         \"@timestamp\": { \"type\": \"date\" }, \"level\": { \"type\": \"keyword\" } } } } }\n   ```\n\n## Common pitfalls\n\n- **Dynamic mapping explosions** — a field per document variant destabilizing the cluster; explicit mappings with strict dynamic.\n- **Wrong field types** — `text` where `keyword` was needed for sorting\u002Faggs (or vice versa); multi-fields from the start.\n- **Deep `from\u002Fsize` pagination** — expensive shard fan-out; use `search_after`.\n- **Unbounded aggregations** — millions of buckets OOMing nodes; filter first, cap sizes, use composite.\n- **Oversharding** — hundreds of tiny shards wasting heap and slowing everything; aim for 10-50GB per shard.\n- **Changing mappings in place** — impossible for most changes; reindex + alias swap is the path.\n- **No snapshots** — no supported backup; snapshot on a schedule and test restores.\n- **Exposed to the internet** — unauthenticated clusters get ransomed; TLS + auth + network policy.\n- **Ignoring ILM** — time-series indices growing forever; automate rollover and deletion.\n- **Relevance guessed, not measured** — boosting without judgment lists; test with real queries.\n- **Heap misconfiguration** — over 50% RAM or over ~30GB causing GC pain; follow the sizing rules.\n- **Yellow cluster ignored** — missing replicas treated as fine until a node dies; yellow is degraded, fix it.\n","## Overview\n\nElasticsearch is a distributed search and analytics engine: JSON documents indexed into shards, queried with a rich DSL, aggregated at speed. It powers full-text search, log analytics, and metrics — workloads where relational databases struggle. It's also a distributed system with real operational demands and a query language that rewards precision.\n\nThe two disciplines are index design (mappings, analyzers, sharding) and query design (relevance, filters, aggregations). Get the mapping wrong and you're reindexing; get the cluster wrong and you're firefighting. This skill covers both, plus production operations.\n\n## When to use\n\n- Adding full-text search to an application.\n- Designing indexes, mappings, and analyzers.\n- Writing relevance-tuned queries and aggregations.\n- Choosing between Elasticsearch, OpenSearch, Postgres FTS, or Algolia\u002FTypesense.\n- Operating clusters (sharding, replicas, upgrades, snapshots).\n- Debugging slow queries, shard problems, or mapping explosions.\n- Building log\u002Fmetrics analytics on the Elastic stack.\n\n## Core concepts\n\n- **Indexes, shards, replicas.** An index splits into primary shards (parallelism unit) distributed across nodes; replicas copy shards for HA and read scale. Shard count is set at creation — oversharding wastes resources, undersharding caps throughput. Size shards ~10-50GB.\n- **Mappings.** Field types (text vs keyword vs numeric vs date) determine what's searchable and how. `text` for full-text search (analyzed), `keyword` for sorting\u002Faggregations\u002Fexact match. Multi-fields (`text` + `keyword` sub-field) give both.\n- **Dynamic mapping dangers.** Auto-detected mappings guess types — sometimes wrong (dates as text, numbers as strings). A new field per document (mapping explosion) can destabilize the cluster. Prefer explicit mappings with `dynamic: strict` or `runtime` for unknowns.\n- **Analyzers.** Character filters → tokenizer → token filters turn text into searchable tokens. Language analyzers (stemming, stop words) dramatically affect relevance; custom analyzers for special content (part numbers, code).\n- **Query DSL: queries vs filters.** `must`\u002F`should` affect relevance scoring; `filter` clauses are yes\u002Fno (cacheable, faster). Structure searches as: filters for constraints, queries for relevance-ranked text.\n- **Relevance tuning.** `bool` combinations, `multi_match` types (best_fields, most_fields, cross_fields), boosting, function_score for business rules (recency, popularity). Tune with real queries and judgments, not guesses.\n- **Aggregations.** Bucket (terms, date_histogram, ranges) and metric (avg, percentiles, cardinality) aggs for analytics. They're powerful and expensive — scope them with filters, limit bucket counts, and watch memory.\n- **Pagination.** `from`\u002F`size` for shallow pages; `search_after` (with a tiebreaker sort) for deep pagination; Scroll API for bulk export. Deep `from` is expensive — it re-executes across shards.\n- **Index lifecycle (ILM).** Hot → warm → cold → delete policies automate rollover, shrink, and deletion — essential for time-series data (logs, metrics). Rollover by size\u002Fage, not by calendar alone.\n- **Reindexing.** Mappings can't change in place (mostly) — reindex into a new index, then alias-swap. Aliases decouple index names from the physical index; always point reads at aliases.\n- **Snapshots.** S3\u002FGCS repository snapshots for backup and recovery — the only supported backup. Test restores; snapshot before upgrades.\n- **Cluster health.** Green\u002Fyellow\u002Fred refer to shard allocation, not performance. Yellow (missing replicas) is degraded; red (missing primaries) is data-loss territory. Monitor pending tasks and relocation storms too.\n- **Circuit breakers and memory.** Fielddata and large aggregations can OOM nodes; circuit breakers protect the cluster but trip on legitimate heavy queries — size heaps (≤50% RAM, ≤~30GB) and keep aggregations bounded.\n- **Security.** TLS, authentication, role-based index privileges, API keys per application. Never expose Elasticsearch directly to the internet — it's a ransomware magnet.\n\n## Practical workflow\n\n1. **Design the mapping first.** Explicit types per field; `text` + `keyword` multi-fields where both search and sort\u002Fagg are needed; `dynamic: strict` to catch surprises.\n   ```json\n   { \"mappings\": { \"dynamic\": \"strict\",\n     \"properties\": {\n       \"title\": { \"type\": \"text\", \"fields\": { \"keyword\": { \"type\": \"keyword\" } } },\n       \"status\": { \"type\": \"keyword\" },\n       \"price\": { \"type\": \"scaled_float\", \"scaling_factor\": 100 },\n       \"created_at\": { \"type\": \"date\" }\n     } } }\n   ```\n2. **Choose analyzers deliberately.** Default is fine for English prose; language analyzers per language field; custom analyzers for SKUs\u002Fcodes (keyword tokenizer + lowercase).\n3. **Index through aliases.** Write to `products-write`, read from `products-read`; reindex-and-swap for mapping changes with zero downtime.\n4. **Structure queries: filters + relevance.** Filters for constraints (status, category, price range), `multi_match` for the text, boosts for business priority.\n   ```json\n   { \"query\": { \"bool\": {\n     \"must\": { \"multi_match\": { \"query\": \"wireless headphones\", \"fields\": [\"title^3\", \"description\"] } },\n     \"filter\": [ { \"term\": { \"status\": \"active\" } }, { \"range\": { \"price\": { \"lte\": 200 } } } ]\n   } } }\n   ```\n5. **Paginate with `search_after`.** Sort by `_score` + `_id` tiebreaker (or timestamp + id); pass the last hit's sort values. Reserve `from\u002Fsize` for shallow admin pages.\n6. **Aggregate carefully.** Filter before aggregating; cap `terms` size; use `composite` aggs for paginating through buckets; watch the fielddata circuit breaker.\n7. **Manage lifecycle with ILM.** Rollover hot indices by size\u002Fage; move to warm (fewer replicas, force-merge), then delete. Automate from day one for time-series data.\n8. **Operate.** Snapshot to object storage on a schedule; monitor shard balance, JVM heap, GC, indexing rate, and query latency; upgrade rolling with compatibility checks.\n\n   ```json\n   PUT _index_template\u002Flogs-template\n   { \"index_patterns\": [\"logs-*\"],\n     \"template\": { \"settings\": { \"number_of_shards\": 3 },\n       \"mappings\": { \"dynamic\": \"strict\", \"properties\": {\n         \"@timestamp\": { \"type\": \"date\" }, \"level\": { \"type\": \"keyword\" } } } } }\n   ```\n\n## Common pitfalls\n\n- **Dynamic mapping explosions** — a field per document variant destabilizing the cluster; explicit mappings with strict dynamic.\n- **Wrong field types** — `text` where `keyword` was needed for sorting\u002Faggs (or vice versa); multi-fields from the start.\n- **Deep `from\u002Fsize` pagination** — expensive shard fan-out; use `search_after`.\n- **Unbounded aggregations** — millions of buckets OOMing nodes; filter first, cap sizes, use composite.\n- **Oversharding** — hundreds of tiny shards wasting heap and slowing everything; aim for 10-50GB per shard.\n- **Changing mappings in place** — impossible for most changes; reindex + alias swap is the path.\n- **No snapshots** — no supported backup; snapshot on a schedule and test restores.\n- **Exposed to the internet** — unauthenticated clusters get ransomed; TLS + auth + network policy.\n- **Ignoring ILM** — time-series indices growing forever; automate rollover and deletion.\n- **Relevance guessed, not measured** — boosting without judgment lists; test with real queries.\n- **Heap misconfiguration** — over 50% RAM or over ~30GB causing GC pain; follow the sizing rules.\n- **Yellow cluster ignored** — missing replicas treated as fine until a node dies; yellow is degraded, fix it.\n",{"name":5,"category":24,"description":7},"development","main","af388a77c2fe5e0b4fd879cca4300a0ffa9a6579","skills\u002Fams-elasticsearch-pro-dev",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 elasticsearch-pro-dev",{"tool":39,"command":40},"bunx","bunx skills add TanNhatCMS\u002Fjarvis --skill elasticsearch-pro-dev",{"tool":42,"command":43},"pnpm","pnpm dlx skills add TanNhatCMS\u002Fjarvis --skill elasticsearch-pro-dev","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-elasticsearch-pro-dev\u002FSKILL.md",true,[],[48,55,63,70,77,84],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"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":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":59,"sourceHtmlUrl":60,"categories":61,"keywords":62,"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":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"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":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"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":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"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":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":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",[],[]]