[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6X6SADD66RWXRE1S2XSEC5F":3,"skill-same:01M6X6SADD66RWXRE1S2XSEC5F":71},{"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":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":53,"ownerHtmlUrl":54,"ownerBlogUrl":53,"ownerDescription":55,"updatedAt":56,"install":57,"resources":70},"01M6X6SADD66RWXRE1S2XSEC5F","grafana",null,"Use when working with Grafana — dashboards, Loki LogQL queries, alerting rules, monitoring panels — even when the user just says 'build me a dashboard' or 'query the logs' without naming Grafana.","event4u-app\u002Fagent-config","event4u-app","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F199339632?v=4","01M6X5TWBNCQCE1VDKT4E9KF7N","event4u.app","01M6X5TWF4HRM266RG2Q5VVH1X",19,"MIT","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Fsrc\u002Fskills\u002Fgrafana\u002FSKILL.md",[],[5,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"queries","when","naming","with","loki","panels","me","query","base","build","dashboard","devops","use","just","Rules","dashboards","monitoring","logs","alerting","2026-11-10 10:12:30",false,"---\nmodel_tier: medium\nname: grafana\ndescription: \"Use when working with Grafana — dashboards, Loki LogQL queries, alerting rules, monitoring panels — even when the user just says 'build me a dashboard' or 'query the logs' without naming Grafana.\"\ndomain: devops\nworkspaces:\n  - engineering\npacks:\n  - engineering-base\n---\n\n# Grafana Skill\n\n## When to use\n\nUse this skill when:\n- Creating or editing Grafana dashboards (JSON provisioning)\n- Writing Loki LogQL queries for log analysis\n- Configuring alerting rules or contact points\n- Working on a Grafana module (if the project has one)\n- Debugging log-based issues using Loki data\n\n## Procedure: Create Grafana dashboard\n\n1. **Inspect existing Grafana assets** — Check the project's Grafana location (Docker config, `dashboards\u002F`, provisioning) and existing datasources (Loki, Prometheus) before adding panels.\n2. **Decide signals and layout** — Pick the queries (LogQL \u002F PromQL) and panel types per signal; reuse naming and label conventions below.\n3. **Author the dashboard JSON** — Add provisioned JSON under the dashboards path; wire datasources and template variables.\n4. **Verify** — Reload Grafana, confirm panels render against real data, and check alert rules fire on synthetic test inputs.\n\n### Project setup\n\nCheck if the project has a dedicated Grafana module or Docker config. Typical structure:\n\n```\n{grafana-location}\u002F\n├── .docker\u002F\n│   ├── grafana\u002F\n│   │   ├── dashboards\u002F              ← Dashboard JSON files (provisioned)\n│   │   ├── provisioning\u002F\n│   │   │   ├── datasources\u002F         ← Loki, Prometheus data sources\n│   │   │   └── dashboards\u002F          ← Dashboard provisioning config\n│   │   └── alerting\u002F                ← Alert rules, contact points, notification policies\n│   └── loki\u002F\n│       └── loki-config.yml          ← Loki server configuration\n├── App\u002F\n│   ├── Logging\u002F                     ← Loki timestamp processors\n│   └── Console\u002FCommands\u002F            ← GrafanaPushDashboardsCommand\n├── Docs\u002F\n│   └── Loki.md                      ← Loki documentation\n└── Routes\u002Fconsole.php\n```\n\n### Configuration\n\n- **Grafana config:** `config\u002Fgrafana.php`\n- **Logging channels:** `config\u002Flogging.php` (Loki channels)\n- **Loki package:** `itspire\u002Fmonolog-loki` via Monolog handler\n\n## Dashboard conventions\n\n### JSON provisioning\n\nDashboards are stored as JSON in `.docker\u002Fgrafana\u002Fdashboards\u002F` and auto-provisioned.\nUse `GrafanaPushDashboardsCommand` to push dashboards to remote Grafana instances.\n\n### Panel rules\n\n- **Always hide Loki metadata columns** in table panels:\n  `labelTypes`, `traceID`, `traceID (field)` → add to `excludeByName` in the `organize` transformation.\n- **Verify column names match data semantics:** If the timestamp represents `imported_at`,\n  name the column \"Imported\", not \"Uploaded\".\n- **Use consistent time ranges:** Default to \"Last 24 hours\" for operational dashboards.\n- **Add variables** for customer FQDN, environment, and time range filters.\n\n### Naming\n\n| Element | Convention | Example |\n|---|---|---|\n| Dashboard title | Descriptive, Title Case | \"Import Overview (Loki)\" |\n| Panel title | Short, descriptive | \"Import Results by Status\" |\n| Variable names | lowercase, underscore | `$fqdn`, `$environment` |\n\n## Loki LogQL\n\n### Query patterns\n\n```logql\n# Filter by service and status\n{service=\"import_result\"} |= \"DONE\" | json | status = \"DONE\"\n\n# Count by label\nsum by (status) (count_over_time({service=\"import_result\"} | json [$__interval]))\n\n# Filter by customer FQDN\n{service=\"import_result\", fqdn=~\"$fqdn\"} | json\n```\n\n### Service labels\n\n| Label | Purpose | Notes |\n|---|---|---|\n| `import_result` | Final import states (DONE, FAILED) | Use for result dashboards |\n| `import_snapshot` | Cron-based status snapshots | Use for timeline dashboards |\n| `service=import` | Legacy static label | Do NOT query — use specific labels above |\n\n### Best practices\n\n- Use `json` parser for structured log entries\n- Use `line_format` for human-readable output in explore view\n- Use `$__interval` for rate\u002Fcount queries (auto-adjusts to time range)\n- Filter early in the pipeline (labels before line filters before parsers)\n\n## Alerting\n\n### Structure\n\n```\n.docker\u002Fgrafana\u002Falerting\u002F\n├── alert-rules.yml          ← Alert conditions and thresholds\n├── contact-points.yml       ← Notification targets (Slack, email)\n└── notification-policies.yml ← Routing rules (which alerts → which contacts)\n```\n\n### Conventions\n\n- Alert names: descriptive, include severity: \"Import Failure Rate > 10% (Critical)\"\n- Use `for` duration to avoid flapping (e.g., `for: 5m`)\n- Group related alerts by folder\u002Fnamespace\n\n## Integration with logging\n\nThe project uses structured logging via Monolog → Loki:\n\n- **`LokiTimestampProcessor`** — Adds precise timestamps to log entries\n- **`LokiTimestampChannelTap`** — Configures Loki channels with timestamp processing\n- **Import events** are logged via `ImportEventLogger` service\n\nWhen adding new log entries for Grafana visualization:\n1. Use a dedicated log channel (defined in `config\u002Flogging.php`)\n2. Log as JSON with consistent field names\n3. Add appropriate Loki labels for filtering\n4. Update or create a dashboard panel for the new data\n\n## Related\n\n- **Skill:** `logging-monitoring` — full monitoring stack overview\n- **Skill:** `dashboard-design` — visualization selection, layout, KPI strategies\n- **Skill:** `traefik` — HTTPS for Grafana embedding in the app\n- Check the project for Grafana module or Docker config location\n- **Config:** `config\u002Fgrafana.php`, `config\u002Flogging.php` (if applicable)\n\n\n## Output format\n\n1. Grafana dashboard JSON or LogQL\u002FPromQL queries\n2. Panel configuration with data source and thresholds\n3. Alert rule definitions where applicable\n\n## Gotcha\n\n- Loki queries use LogQL, not PromQL — the syntax is different despite looking similar.\n- Don't create alerts without a clear notification channel — silent alerts are useless.\n- Dashboard panels that query too much data (>7 days at full resolution) will timeout — use downsampling.\n\n## Do NOT\n\n- Do NOT create panels without proper units and labels.\n- Do NOT use alerting rules without a notification channel.\n- Do NOT hardcode datasource names — use variables.\n\n## Auto-trigger keywords\n\n- Grafana\n- Loki\n- dashboard\n- log query\n- alerting\n- monitoring panel\n","# Grafana Skill\n\n## When to use\n\nUse this skill when:\n- Creating or editing Grafana dashboards (JSON provisioning)\n- Writing Loki LogQL queries for log analysis\n- Configuring alerting rules or contact points\n- Working on a Grafana module (if the project has one)\n- Debugging log-based issues using Loki data\n\n## Procedure: Create Grafana dashboard\n\n1. **Inspect existing Grafana assets** — Check the project's Grafana location (Docker config, `dashboards\u002F`, provisioning) and existing datasources (Loki, Prometheus) before adding panels.\n2. **Decide signals and layout** — Pick the queries (LogQL \u002F PromQL) and panel types per signal; reuse naming and label conventions below.\n3. **Author the dashboard JSON** — Add provisioned JSON under the dashboards path; wire datasources and template variables.\n4. **Verify** — Reload Grafana, confirm panels render against real data, and check alert rules fire on synthetic test inputs.\n\n### Project setup\n\nCheck if the project has a dedicated Grafana module or Docker config. Typical structure:\n\n```\n{grafana-location}\u002F\n├── .docker\u002F\n│   ├── grafana\u002F\n│   │   ├── dashboards\u002F              ← Dashboard JSON files (provisioned)\n│   │   ├── provisioning\u002F\n│   │   │   ├── datasources\u002F         ← Loki, Prometheus data sources\n│   │   │   └── dashboards\u002F          ← Dashboard provisioning config\n│   │   └── alerting\u002F                ← Alert rules, contact points, notification policies\n│   └── loki\u002F\n│       └── loki-config.yml          ← Loki server configuration\n├── App\u002F\n│   ├── Logging\u002F                     ← Loki timestamp processors\n│   └── Console\u002FCommands\u002F            ← GrafanaPushDashboardsCommand\n├── Docs\u002F\n│   └── Loki.md                      ← Loki documentation\n└── Routes\u002Fconsole.php\n```\n\n### Configuration\n\n- **Grafana config:** `config\u002Fgrafana.php`\n- **Logging channels:** `config\u002Flogging.php` (Loki channels)\n- **Loki package:** `itspire\u002Fmonolog-loki` via Monolog handler\n\n## Dashboard conventions\n\n### JSON provisioning\n\nDashboards are stored as JSON in `.docker\u002Fgrafana\u002Fdashboards\u002F` and auto-provisioned.\nUse `GrafanaPushDashboardsCommand` to push dashboards to remote Grafana instances.\n\n### Panel rules\n\n- **Always hide Loki metadata columns** in table panels:\n  `labelTypes`, `traceID`, `traceID (field)` → add to `excludeByName` in the `organize` transformation.\n- **Verify column names match data semantics:** If the timestamp represents `imported_at`,\n  name the column \"Imported\", not \"Uploaded\".\n- **Use consistent time ranges:** Default to \"Last 24 hours\" for operational dashboards.\n- **Add variables** for customer FQDN, environment, and time range filters.\n\n### Naming\n\n| Element | Convention | Example |\n|---|---|---|\n| Dashboard title | Descriptive, Title Case | \"Import Overview (Loki)\" |\n| Panel title | Short, descriptive | \"Import Results by Status\" |\n| Variable names | lowercase, underscore | `$fqdn`, `$environment` |\n\n## Loki LogQL\n\n### Query patterns\n\n```logql\n# Filter by service and status\n{service=\"import_result\"} |= \"DONE\" | json | status = \"DONE\"\n\n# Count by label\nsum by (status) (count_over_time({service=\"import_result\"} | json [$__interval]))\n\n# Filter by customer FQDN\n{service=\"import_result\", fqdn=~\"$fqdn\"} | json\n```\n\n### Service labels\n\n| Label | Purpose | Notes |\n|---|---|---|\n| `import_result` | Final import states (DONE, FAILED) | Use for result dashboards |\n| `import_snapshot` | Cron-based status snapshots | Use for timeline dashboards |\n| `service=import` | Legacy static label | Do NOT query — use specific labels above |\n\n### Best practices\n\n- Use `json` parser for structured log entries\n- Use `line_format` for human-readable output in explore view\n- Use `$__interval` for rate\u002Fcount queries (auto-adjusts to time range)\n- Filter early in the pipeline (labels before line filters before parsers)\n\n## Alerting\n\n### Structure\n\n```\n.docker\u002Fgrafana\u002Falerting\u002F\n├── alert-rules.yml          ← Alert conditions and thresholds\n├── contact-points.yml       ← Notification targets (Slack, email)\n└── notification-policies.yml ← Routing rules (which alerts → which contacts)\n```\n\n### Conventions\n\n- Alert names: descriptive, include severity: \"Import Failure Rate > 10% (Critical)\"\n- Use `for` duration to avoid flapping (e.g., `for: 5m`)\n- Group related alerts by folder\u002Fnamespace\n\n## Integration with logging\n\nThe project uses structured logging via Monolog → Loki:\n\n- **`LokiTimestampProcessor`** — Adds precise timestamps to log entries\n- **`LokiTimestampChannelTap`** — Configures Loki channels with timestamp processing\n- **Import events** are logged via `ImportEventLogger` service\n\nWhen adding new log entries for Grafana visualization:\n1. Use a dedicated log channel (defined in `config\u002Flogging.php`)\n2. Log as JSON with consistent field names\n3. Add appropriate Loki labels for filtering\n4. Update or create a dashboard panel for the new data\n\n## Related\n\n- **Skill:** `logging-monitoring` — full monitoring stack overview\n- **Skill:** `dashboard-design` — visualization selection, layout, KPI strategies\n- **Skill:** `traefik` — HTTPS for Grafana embedding in the app\n- Check the project for Grafana module or Docker config location\n- **Config:** `config\u002Fgrafana.php`, `config\u002Flogging.php` (if applicable)\n\n\n## Output format\n\n1. Grafana dashboard JSON or LogQL\u002FPromQL queries\n2. Panel configuration with data source and thresholds\n3. Alert rule definitions where applicable\n\n## Gotcha\n\n- Loki queries use LogQL, not PromQL — the syntax is different despite looking similar.\n- Don't create alerts without a clear notification channel — silent alerts are useless.\n- Dashboard panels that query too much data (>7 days at full resolution) will timeout — use downsampling.\n\n## Do NOT\n\n- Do NOT create panels without proper units and labels.\n- Do NOT use alerting rules without a notification channel.\n- Do NOT hardcode datasource names — use variables.\n\n## Auto-trigger keywords\n\n- Grafana\n- Loki\n- dashboard\n- log query\n- alerting\n- monitoring panel\n",{"name":5,"packs":43,"domain":30,"model_tier":45,"workspaces":46,"description":7},[44],"engineering-base","medium",[47],"engineering","main","12bd765ce1d800501d45dfb8232102793af01290","src\u002Fskills\u002Fgrafana",1,"https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config","https:\u002F\u002Fevent4u.app","https:\u002F\u002Fgithub.com\u002Fevent4u-app","Your events in your hand","2026-11-14 02:29:41",{"source":8,"skillName":5,"commands":58,"prompt":68,"zipAvailable":69},[59,62,65],{"tool":60,"command":61},"npx","npx skills add event4u-app\u002Fagent-config --skill grafana",{"tool":63,"command":64},"bunx","bunx skills add event4u-app\u002Fagent-config --skill grafana",{"tool":66,"command":67},"pnpm","pnpm dlx skills add event4u-app\u002Fagent-config --skill grafana","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Fsrc\u002Fskills\u002Fgrafana\u002FSKILL.md",true,[],[72,85,97,108,119,128],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":38},"01M6X84PK96XBPENXH66JCTSD1","unknown-key-fixture","Declares a key the schema does not know.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Fscripts\u002Ffixtures\u002Fbody-portable\u002Funknown-key\u002FSKILL.md",[],[79,80,81,82,83,84],"unknown key fixture","Unknown key","fixture","unknown","schema","package",{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":38},"01M6X84HW7NAHZ7GZMQ9RXK1XJ","portable-fixture","Declares only semantics the MCP-lite carrier transports whole.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Fscripts\u002Ffixtures\u002Fbody-portable\u002Fportable\u002FSKILL.md",[],[81,92,93,94,95,84,96],"portable","portable fixture","engineer","only","MCP",{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":38},"01M6X84F29FE0RGGZ1ZTFGZTX2","non-portable-fixture","Declares a runtime semantic the carrier drops.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Fscripts\u002Ffixtures\u002Fbody-portable\u002Fnon-portable\u002FSKILL.md",[],[93,104,92,81,105,106,107,84],"non portable fixture","semantic","high","runtime",{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":38},"01M6X848F706PT9MDCX75JKJ6B","candidate-zero-width","A candidate whose prose carries an invisible joiner.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskill-scout-candidates\u002Fzero-width-injection\u002FSKILL.md",[],[115,116,117,118],"candidate zero width","candidate","ZeRO","prose",{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":38},"01M6X841SSC2T31VDF41SA6DG1","candidate-disclosure-suppression","A candidate whose prose tells the agent to withhold from the user.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskill-scout-candidates\u002Fdisclosure-suppression\u002FSKILL.md",[],[126,116,118,127],"candidate disclosure suppression","user",{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":38},"01M6X83TFS5AGPBPVTQNWP0BB3","candidate-dangerous-frontmatter","A candidate claiming an unscoped tool grant and a permission bypass.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskill-scout-candidates\u002Fdangerous-frontmatter\u002FSKILL.md",[],[135,116,136,137,138,139],"candidate dangerous frontmatter","frontmatter","shell","permission","tool"]