[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75PVS14TTB2B6P8WAFQ6AF6":3,"skill-same:01M75PVS14TTB2B6P8WAFQ6AF6":56},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M75PVS14TTB2B6P8WAFQ6AF6","promql",null,"Write, validate, and optimize PromQL for Prometheus \u002F Grafana Mimir \u002F Grafana Cloud Metrics. Covers `rate` vs `irate` vs `increase`, label matchers and regex, `sum \u002F avg \u002F topk \u002F by \u002F without` aggregation, classic + native `histogram_quantile`, ratios with divide-by-zero guards, `absent` \u002F `changes` for staleness, time offsets and `predict_linear`, recording-rule naming, SLO + burn-rate math, and a cardinality-hunting playbook. Use when writing a metric query, fixing wrong p95s, building an error-budget alert, debugging \"query is slow\", finding the noisy label that blew up cardinality, or migrating a dashboard query to a recording rule — even when the user says \"calculate the error rate\", \"p99 latency\", \"sum by service\", \"why is this query slow\", or \"what's filling Mimir\" without naming PromQL.","stanfish06\u002Fskillquarium","stanfish06","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F93099613?v=4","01M75F1CK4ZW109ZK3T26VN52F","Zhiyuan","01M75F1CM53VH6F79DZ8GXKKES",12,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fpromql\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: promql\nlicense: Apache-2.0\ndescription: Write, validate, and optimize PromQL for Prometheus \u002F Grafana Mimir \u002F Grafana Cloud Metrics. Covers `rate` vs `irate` vs `increase`, label matchers and regex, `sum \u002F avg \u002F topk \u002F by \u002F without` aggregation, classic + native `histogram_quantile`, ratios with divide-by-zero guards, `absent` \u002F `changes` for staleness, time offsets and `predict_linear`, recording-rule naming, SLO + burn-rate math, and a cardinality-hunting playbook. Use when writing a metric query, fixing wrong p95s, building an error-budget alert, debugging \"query is slow\", finding the noisy label that blew up cardinality, or migrating a dashboard query to a recording rule — even when the user says \"calculate the error rate\", \"p99 latency\", \"sum by service\", \"why is this query slow\", or \"what's filling Mimir\" without naming PromQL.\n---\n\n# PromQL Query Patterns\n\n> **Docs**: https:\u002F\u002Fprometheus.io\u002Fdocs\u002Fprometheus\u002Flatest\u002Fquerying\u002Fbasics\u002F\n\nPromQL returns either an **instant vector**, a **range vector**, or a **scalar**.\n\n**Golden rule:** `rate()` \u002F `increase()` require a range vector ≥ 4× the scrape interval. 60s scrape → use `[5m]` minimum.\n\n## Prerequisites\n\n- A Prometheus \u002F Mimir \u002F Grafana Cloud endpoint to query (`\u002Fapi\u002Fv1\u002Fquery` or via Grafana Explore)\n- The PromQL pattern library in [`references\u002Fpatterns.md`](references\u002Fpatterns.md)\n\n## Common Workflows\n\n### 1. Write + validate a query\n\n```bash\n# 0. Point at your Prometheus\u002FMimir. For Grafana Cloud, use the metrics endpoint\n#    and add basic auth (-u \"\u003Cmetrics_user>:\u003Ctoken>\") to each curl below.\nPROM=http:\u002F\u002Flocalhost:9090   # or https:\u002F\u002Fprometheus-prod-XX.grafana.net\u002Fapi\u002Fprom\n\n# 1. Sketch the query — for \"5xx error rate per service\":\nEXPR='sum(rate(http_requests_total{status_code=~\"5..\"}[5m])) by (service)'\n\n# 2. Validate syntax + that the metric\u002Flabels exist\ncurl -sG --data-urlencode \"query=${EXPR}\" \\\n  \"$PROM\u002Fapi\u002Fv1\u002Fquery\" | jq '.status, (.data.result|length)'\n# Expect: \"success\" and result count > 0. If 0 — check label spelling and scrape activity:\ncurl -sG --data-urlencode \"match[]=http_requests_total\" \"$PROM\u002Fapi\u002Fv1\u002Fseries\" | jq '.data | length'\n\n# 3. Sanity-check the magnitude — open Grafana Explore, paste the expr,\n#    confirm the values look right against a known ground truth (k6 run, log count, etc.)\n```\n\n### 2. Common patterns to copy\n\n**Per-status request rate** (aggregate AFTER rate):\n\n```promql\nsum(rate(http_requests_total{job=\"api\"}[5m])) by (status_code)\n```\n\n**p95 latency** (must keep `le` in the inner aggregation):\n\n```promql\nhistogram_quantile(0.95,\n  sum(rate(http_request_duration_seconds_bucket[5m])) by (le, service))\n```\n\n**Error rate with divide-by-zero guard:**\n\n```promql\nsum(rate(http_requests_total{status_code=~\"5..\"}[5m]))\n  \u002F (sum(rate(http_requests_total[5m])) > 0)\n```\n\nFull library (recording rules, SLO burn-rate, offsets, cardinality hunt, native histograms): [`references\u002Fpatterns.md`](references\u002Fpatterns.md).\n\n### 3. Convert a slow dashboard query into a recording rule\n\n```yaml\n# 1. Pick the slow expression, give it a recording-rule name\ngroups:\n  - name: http_request_rates\n    interval: 1m\n    rules:\n      - record: job:http_request_duration_p95:rate5m\n        expr: |\n          histogram_quantile(0.95,\n            sum(rate(http_request_duration_seconds_bucket[5m])) by (le, job))\n```\n\n```bash\n# 2. After rules load, verify the new metric exists\ncurl -sG --data-urlencode \"query=job:http_request_duration_p95:rate5m\" \\\n  \"$PROM\u002Fapi\u002Fv1\u002Fquery\" | jq '.data.result | length'   # → > 0\n\n# 3. Verify it matches the original expression for at least one sample window\n# (Both queries should produce the same value at the same timestamp.)\n\n# 4. Replace the dashboard panel expression with the recording-rule metric.\n```\n\n## Common bugs\n\n- `histogram_quantile` returns NaN → forgot `by (le)` in the inner aggregation\n- \"No data\" → check the metric exists (`\u002Fapi\u002Fv1\u002Fseries`) and the window ≥ 4× scrape interval\n- Wrong rate magnitude → counter was aggregated before `rate()` (always `rate()` first)\n- Query timeout → series count too high; use `topk(...)` + a recording rule + drop high-cardinality labels (see [`references\u002Fpatterns.md`](references\u002Fpatterns.md))\n\n## Resources\n\n- [PromQL basics](https:\u002F\u002Fprometheus.io\u002Fdocs\u002Fprometheus\u002Flatest\u002Fquerying\u002Fbasics\u002F)\n- [Operators](https:\u002F\u002Fprometheus.io\u002Fdocs\u002Fprometheus\u002Flatest\u002Fquerying\u002Foperators\u002F)\n- [Functions](https:\u002F\u002Fprometheus.io\u002Fdocs\u002Fprometheus\u002Flatest\u002Fquerying\u002Ffunctions\u002F)\n- [Grafana Mimir](https:\u002F\u002Fgrafana.com\u002Fdocs\u002Fmimir\u002Flatest\u002F)\n","# PromQL Query Patterns\n\n> **Docs**: https:\u002F\u002Fprometheus.io\u002Fdocs\u002Fprometheus\u002Flatest\u002Fquerying\u002Fbasics\u002F\n\nPromQL returns either an **instant vector**, a **range vector**, or a **scalar**.\n\n**Golden rule:** `rate()` \u002F `increase()` require a range vector ≥ 4× the scrape interval. 60s scrape → use `[5m]` minimum.\n\n## Prerequisites\n\n- A Prometheus \u002F Mimir \u002F Grafana Cloud endpoint to query (`\u002Fapi\u002Fv1\u002Fquery` or via Grafana Explore)\n- The PromQL pattern library in [`references\u002Fpatterns.md`](references\u002Fpatterns.md)\n\n## Common Workflows\n\n### 1. Write + validate a query\n\n```bash\n# 0. Point at your Prometheus\u002FMimir. For Grafana Cloud, use the metrics endpoint\n#    and add basic auth (-u \"\u003Cmetrics_user>:\u003Ctoken>\") to each curl below.\nPROM=http:\u002F\u002Flocalhost:9090   # or https:\u002F\u002Fprometheus-prod-XX.grafana.net\u002Fapi\u002Fprom\n\n# 1. Sketch the query — for \"5xx error rate per service\":\nEXPR='sum(rate(http_requests_total{status_code=~\"5..\"}[5m])) by (service)'\n\n# 2. Validate syntax + that the metric\u002Flabels exist\ncurl -sG --data-urlencode \"query=${EXPR}\" \\\n  \"$PROM\u002Fapi\u002Fv1\u002Fquery\" | jq '.status, (.data.result|length)'\n# Expect: \"success\" and result count > 0. If 0 — check label spelling and scrape activity:\ncurl -sG --data-urlencode \"match[]=http_requests_total\" \"$PROM\u002Fapi\u002Fv1\u002Fseries\" | jq '.data | length'\n\n# 3. Sanity-check the magnitude — open Grafana Explore, paste the expr,\n#    confirm the values look right against a known ground truth (k6 run, log count, etc.)\n```\n\n### 2. Common patterns to copy\n\n**Per-status request rate** (aggregate AFTER rate):\n\n```promql\nsum(rate(http_requests_total{job=\"api\"}[5m])) by (status_code)\n```\n\n**p95 latency** (must keep `le` in the inner aggregation):\n\n```promql\nhistogram_quantile(0.95,\n  sum(rate(http_request_duration_seconds_bucket[5m])) by (le, service))\n```\n\n**Error rate with divide-by-zero guard:**\n\n```promql\nsum(rate(http_requests_total{status_code=~\"5..\"}[5m]))\n  \u002F (sum(rate(http_requests_total[5m])) > 0)\n```\n\nFull library (recording rules, SLO burn-rate, offsets, cardinality hunt, native histograms): [`references\u002Fpatterns.md`](references\u002Fpatterns.md).\n\n### 3. Convert a slow dashboard query into a recording rule\n\n```yaml\n# 1. Pick the slow expression, give it a recording-rule name\ngroups:\n  - name: http_request_rates\n    interval: 1m\n    rules:\n      - record: job:http_request_duration_p95:rate5m\n        expr: |\n          histogram_quantile(0.95,\n            sum(rate(http_request_duration_seconds_bucket[5m])) by (le, job))\n```\n\n```bash\n# 2. After rules load, verify the new metric exists\ncurl -sG --data-urlencode \"query=job:http_request_duration_p95:rate5m\" \\\n  \"$PROM\u002Fapi\u002Fv1\u002Fquery\" | jq '.data.result | length'   # → > 0\n\n# 3. Verify it matches the original expression for at least one sample window\n# (Both queries should produce the same value at the same timestamp.)\n\n# 4. Replace the dashboard panel expression with the recording-rule metric.\n```\n\n## Common bugs\n\n- `histogram_quantile` returns NaN → forgot `by (le)` in the inner aggregation\n- \"No data\" → check the metric exists (`\u002Fapi\u002Fv1\u002Fseries`) and the window ≥ 4× scrape interval\n- Wrong rate magnitude → counter was aggregated before `rate()` (always `rate()` first)\n- Query timeout → series count too high; use `topk(...)` + a recording rule + drop high-cardinality labels (see [`references\u002Fpatterns.md`](references\u002Fpatterns.md))\n\n## Resources\n\n- [PromQL basics](https:\u002F\u002Fprometheus.io\u002Fdocs\u002Fprometheus\u002Flatest\u002Fquerying\u002Fbasics\u002F)\n- [Operators](https:\u002F\u002Fprometheus.io\u002Fdocs\u002Fprometheus\u002Flatest\u002Fquerying\u002Foperators\u002F)\n- [Functions](https:\u002F\u002Fprometheus.io\u002Fdocs\u002Fprometheus\u002Flatest\u002Fquerying\u002Ffunctions\u002F)\n- [Grafana Mimir](https:\u002F\u002Fgrafana.com\u002Fdocs\u002Fmimir\u002Flatest\u002F)\n",{"name":5,"license":15,"description":7},"master","49e49abf2f670d429e0b7e2c0349739c3fdd5cbe","skills\u002Fpromql",5,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium","https:\u002F\u002Fgithub.com\u002Fstanfish06","https:\u002F\u002Fwww.stanfish.dev\u002F","2026-11-14 21:31:37",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add stanfish06\u002Fskillquarium --skill promql",{"tool":38,"command":39},"bunx","bunx skills add stanfish06\u002Fskillquarium --skill promql",{"tool":41,"command":42},"pnpm","pnpm dlx skills add stanfish06\u002Fskillquarium --skill promql","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fpromql\u002FSKILL.md",true,[46,52],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"agents\u002Fopenai.yaml","REFERENCE","参考文档",148,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fpromql\u002Fagents\u002Fopenai.yaml",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Fpatterns.md",4453,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fpromql\u002Freferences\u002Fpatterns.md",[57,65,73,80,87,94],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":61,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M76ZJTRVA456GD7K8Y3EP82H","zarr-python","Stores and queries chunked N-D scientific arrays with Zarr-Python 3, including codecs, sharding, S3\u002FGCS storage, and NumPy\u002FDask\u002FXarray integration. Use for array layout, bounded I\u002FO, format migration, or scientific metadata preservation.","MIT","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":69,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M76ZJQZ15Q1HKC5V85NHE325","yeet","Publish local changes to GitHub by confirming scope, committing intentionally, pushing the branch, and opening a draft PR through the GitHub app from this plugin, with `gh` used only as a fallback where connector coverage is insufficient.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M76ZJ8ASZ4QYQ70Y6SBA4Z4S","xarray","N-dimensional labeled arrays and datasets in Python. Built on top of NumPy and Dask. It introduces labels in the form of dimensions, coordinates, and attributes on top of raw NumPy-like arrays, making data analysis in physical sciences more intuitive and less error-prone. Use for working with multi-dimensional scientific data, NetCDF\u002FGRIB\u002FZarr files, climate\u002Fweather\u002Foceanographic datasets, remote sensing, geospatial imaging, large out-of-memory datasets with Dask, and labeled array operations.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fxarray\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":61,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M76ZHFBXD6VXPQ02VCEG202B","writing-mstest-tests","Use when asked to fix, rewrite, update, improve, modernize, show corrected code for, or explain existing MSTest tests or MSTest-specific configuration. Use for \"review\" when corrected code or edits are wanted, even for one pasted assertion or passing tests with bad failure output. Covers expected\u002Factual labels; generic Boolean, collection, string, numeric, null, identity, exception, hard-cast, and object[] checks; TestContext\u002Flifecycle; timeout\u002Fcancellation; OS\u002FCI conditions, retry, cleanup, parallelization, MSTest.Sdk project setup, and MSTESTxxxx. Honor the installed MSTest version. DO NOT USE to design new test cases (code-testing), perform report-only audits, create project files rather than explain MSTest setup, run tests, migrate frameworks, or handle non-MSTest\u002Fnon-.NET code.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwriting-mstest-tests\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":61,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M76ZDFDF4N88RH6HSYGS7GP2","wgs-prs","End-to-end WGS to polygenic risk score pipeline. Takes paired-end FASTQ files (or a pre-existing VCF) through nf-core\u002Fsarek for variant calling, applies VCF QC (normalisation, hard filtering, Ti\u002FTv and Het\u002FHom checks), then computes polygenic risk scores via the PGS Catalog. Fills the FASTQ to VCF gap upstream of the gwas-prs skill.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwgs-prs\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":98,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M76ZCC1SC68J42QK4MDC8RCG","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[],[]]