nano-core/nano.templates/nano-add-metrics
Claude Code and agent skill by nano-core/nano.templates
- community
- ext:[{"type":"plugin","description":"Custom plugin integration"}]
Checking that the SKILL.md file is still in the repository.
Enable Nano's built-in OpenTelemetry metrics (App:Metrics) on a Nano API or Web application - adds the config and the Kubernetes ServiceMonitor for Prometheus scraping. Use when the user asks to add metrics, Prometheus, OpenTelemetry, or a /metrics endpoint to a Nano API or Web application.
Install
npx vskill@latest install nano-core/nano.templates/nano-add-metricsSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as nano-core/nano.templates/nano-add-metrics.
Nano add metrics
Enables Nano's built-in /metrics endpoint (Prometheus-compatible, via OpenTelemetry) on an existing Nano API or Web application. Read AGENTS.md's #### Metrics (OpenTelemetry) section first; this skill is just the wiring.
API/Web only — same reasoning as Health Checks: Console apps have no HTTP pipeline, so there's no /metrics to expose.
Independent of Health Checks. Verified directly against the registration code (AddNanoMetrics/UseNanoMetrics) — Metrics has no dependency on App:HealthCheck in either direction. Enable it on its own; don't add Health Checks "because Metrics needs it" — it doesn't.
Before making any change, determine
- Application type. Confirm API or Web via
Program.cs. Stop for Console. - Is `App:Metrics` already configured? Check the base
appsettings.json. If present, check
whether .kubernetes/service-monitor.yaml already exists — same "don't leave it half-wired" concern as Health Checks, though less severe here since nothing actively breaks without the ServiceMonitor (Prometheus just won't discover the endpoint to scrape it).
- `azmonitoring.coreos.com/v1`, not `monitoring.coreos.com/v1`. The K8s manifest below
deliberately targets Azure Managed Prometheus's ServiceMonitor CRD group — the AKS add-on Nano's own Nano.App.Api README documents this against ("these metrics can be scraped by Azure Managed Prometheus and visualized in Grafana dashboards") — not the community Prometheus Operator's CRD (monitoring.coreos.com/v1) that generic Kubernetes/Prometheus docs assume. Every app in this solution targets AKS, so this isn't a cluster-dependent uncertainty to flag — it's the correct, fixed apiVersion for this ecosystem. Don't "correct" it to monitoring.coreos.com/v1 even if that's what's more commonly seen elsewhere.
appsettings.json
Add to the base appsettings.json, sibling of App:Version/App:Hosting:
No options — presence alone enables it. Same in every environment.
Kubernetes
.kubernetes/service-monitor.yaml (new file):
Apply it in the Kubernetes Deploy workflow step, same `Get-Content | ExpandEnvironmentVariables
.kubernetes\service-monitor.yaml to {name}.sln's .kubernetes SolutionItems block (see AGENTS.md's Solution Structure note) — new files under .kubernetes/` don't show up in Visual Studio's Solution Explorer otherwise.
After making the change
- Show the user every file touched.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingApi.Public/.claude/skills/nano-add-metrics/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Extension points
pluginCustom plugin integration
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/nano-core/nano.templates/nano-add-metrics)