monitoring
Skill0 starsChanged 32 days agoMITView on GitHub
Adding application monitoring, metrics, and alerting: instruments the app with Prometheus/OpenTelemetry, exposes /health and /metrics endpoints, defines alert rules for error rate and latency p99, wires up a Grafana dashboard, and never leaks internal topology through public probes. Use when you want to add monitoring, set up Prometheus, add a health check endpoint, instrument my app, set up Grafana, add alerts, track error rate or latency, or make my service observable.
16 other projects use a version of this.
Adopted by
Most recently taken up by
- DnsQueen/orcinus-skillstheir own version, first seen Nov 8, 2026
- rogue-dev-studio/ai-agents-roguetheir own version, first seen Nov 1, 2026
- prinx/agentstheir own version, first seen Oct 20, 2026
- psubramanian/Claude-Skillstheir own version, first seen Oct 13, 2026
- cwklurks/ship-scoretheir own version, first seen Oct 13, 2026
- BrendenKennedy/claude-for-ai-platformstheir own version, first seen Oct 13, 2026
Used with
Projects with it also use authentication, database and 5 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillauthentication
Wire this in whenever the app uses or connects to data — records, a database, entities, per-user data, row-level security — or when the user wants sign-in, accounts, login, or protected pages. Rayfin data is always accessed as an authenticated user, so **data implies auth**; only a static page over public data skips it. The starter ships as a no-auth "hello world" that previews with no backend, and the full Fabric auth scaffolding is already in the project — this skill wires it in: AuthProvider + bootstrapAuth in main.tsx, the route guard in App.tsx, the sign-in page, sign-out, and the env/deploy requirement. Triggers: auth, authentication, sign in, sign-in, login, log in, sign out, logout, account, user, identity, protect route, require login, gated page, data, database, records, per-user, row-level security, who is the current user, Fabric auth, Entra.
Also in 3 projects that use this
mijunriSkilldatabase
数据库脚本与操作规范。脚本放在 db_scripts 目录,遵循查询优化、事务、安全等实践。
Also in 3 projects that use this
klauswgSkillperformance
Optimize web performance for faster loading and better user experience. Use when asked to "speed up my site", "optimize performance", "reduce load time", "fix slow loading", "improve page speed", or "performance audit".
Also in 4 projects that use this
mrgoonieSkilldevops
Deploy to Cloudflare (Workers, R2, D1), Docker, GCP (Cloud Run, GKE), Kubernetes (kubectl, Helm). Use for serverless, containers, CI/CD, GitOps, security audit.
Also in 3 projects that use this
AnthropicSkilldocumentation
Write and maintain technical documentation. Trigger with "write docs for", "document this", "create a README", "write a runbook", "onboarding guide", or when the user needs help with any form of technical writing — API docs, architecture docs, or operational runbooks.
Also in 4 projects that use this
NVIDIASkilltesting
Run Python and Rust tests for physicsnemo-curator using uv + pytest with coverage reporting via pytest-cov, and cargo-nextest for Rust tests. Includes benchmark workflows with pytest-benchmark and criterion.
Also in 6 projects that use this
Other versions16 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 16
- buriedsignals/spotlight★ 59same name
- autosendhq/email-skills★ 18same name
- sukirman1901/frontend-expert★ 9same name
- niqinggood/openkitty-skills★ 4same name
- rogue-dev-studio/ai-agents-rogue★ 2same name
- alizafarbati/opencode-agents-mcp★ 1same name
- BrendenKennedy/claude-for-ai-platforms★ 1same name
- cwklurks/ship-score★ 1same name
- DnsQueen/orcinus-skills★ 1same name
- ruslan2027/adako-mcp★ 1same name
6 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository68 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- accessibilitySkill
- api-designSkill
- api-versioningSkill
- authSkill
- background-jobsSkill
- cachingSkill
- capacity-planningSkill
- changelogSkill
- chaos-engineeringSkill
- ci-cdSkill
- circuit-breakerSkill
- claude-best-practicesSkill
- code-commentsSkill
- code-hygieneSkill
- code-reviewSkill
- code-structureSkill
- commit-styleSkill
- concurrency-and-lockingSkill
- database-transactionsSkill
- data-consistencySkill
- debug-infra-startupSkill
- debug-sessionSkill
- demo-video-creatorSkill
- demo-video-script-creatorSkill
- dependency-injectionSkill
- dependency-updateSkill
- disk-cleanupSkill
- distributed-tracingSkill
- dockerSkill
- env-configSkill
- env-setupSkill
- error-handlingSkill
- event-driven-architectureSkill
- feature-flagsSkill
- file-storageSkill
- graceful-shutdownSkill
- idempotencySkill
- input-validationSkill
- jars-engineering-blogsmithSkill
- jars-workshop-builderSkill
- licensingSkill
- loggingSkill
- memory-and-allocationsSkill
- migrate-dbSkill
- multi-tenancySkill
- notificationsSkill
- openapiSkill
- paginationSkill
- perf-profileSkill
- pr-descriptionSkill
- query-optimizationSkill
- rate-limitingSkill
- refactorSkill
- releaseSkill
- runbook-writerSkill
- searchSkill
- secrets-auditSkill
- simplifySkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 7 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 13 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Add application monitoring, metrics, and alerting to a service.
- Very specific: line 13
Check whether a /health or /metrics endpoint already exists.
- Very specific: line 14
Look for a docker-compose.yml or Kubernetes manifests — if present, Prometheus and Grafana can be added there.
- Distinctive: line 20
Add a lightweight health check endpoint that:
- Distinctive: line 25
Never exposes hostnames, passwords, internal IPs, or stack traces in the response body.
- Very specific: line 83
Add a prometheus.yml scrape config or update the existing one:
- Very specific: line 95
If using Docker Compose, add a prometheus service and mount the config:
- Very specific: line 108
Create alerts.yml and reference it from prometheus.yml:
- Very specific: line 148
Add a grafana service to Compose (or deploy separately):
- Distinctive: line 184
Start the service and hit a few endpoints.
- Very specific: line 193
Never expose /metrics publicly.
- Distinctive: line 194
Never use the health endpoint to expose internal connection strings or secrets.
- Distinctive: line 196
Prefer histograms over averages for latency.
- Distinctive: line 199
If the project already has a monitoring setup, extend it rather than replacing it.
“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
monitoring
Add application monitoring, metrics, and alerting to a service.
1. Read the service first
- Identify the runtime (Node.js, Python, Go, Java, etc.) and existing dependencies.
- Check whether a
/healthor/metricsendpoint already exists. - Look for a
docker-compose.ymlor Kubernetes manifests — if present, Prometheus and Grafana can be added there. - Note the HTTP framework so you wire the middleware in the right place.
2. Add a /health endpoint
Add a lightweight health check endpoint that:
- Returns
200 OKwith{"status": "ok"}when the service is healthy. - Returns
503 Service Unavailablewhen a required dependency (database, cache) is down. - Checks only dependencies whose failure would stop the service from serving requests.
- Never exposes hostnames, passwords, internal IPs, or stack traces in the response body.
GET /health
200 {"status":"ok","uptime":42}
503 {"status":"degraded","checks":{"db":"unreachable"}}3. Instrument with metrics
Pick the library that fits the stack:
| Runtime | Library |
| Node.js | prom-client |
| Python | prometheus-client |
| Go | prometheus/client_golang |
| Java | micrometer-registry-prometheus |
| Any | OpenTelemetry SDK (exports to OTLP → Prometheus) |
Collect the four golden signals at minimum:
- Latency — HTTP request duration histogram, labeled by
method,route,status_code. - Traffic — request counter, same labels.
- Errors — counter or a ratio derived from the above (5xx / total).
- Saturation — event-loop lag (Node), thread-pool queue depth (Java), CPU % (Go/Python).
Expose /metrics in Prometheus text format. Protect it behind an internal network rule or
a bearer token — never make it public.
// Node.js example (Express + prom-client)
import client from 'prom-client';
client.collectDefaultMetrics();
const httpDuration = new client.Histogram({
name: 'http_request_duration_seconds',
help: 'HTTP request duration',
labelNames: ['method', 'route', 'status_code'],
buckets: [0.005, 0.01, 0.05, 0.1, 0.5, 1, 5],
});
app.use((req, res, next) => {
const end = httpDuration.startTimer();
res.on('finish', () =>
end({ method: req.method, route: req.route?.path ?? req.path, status_code: res.statusCode })
);
next();
});
app.get('/metrics', async (_req, res) => {
res.set('Content-Type', client.register.contentType);
res.end(await client.register.metrics());
});4. Wire up Prometheus
Add a prometheus.yml scrape config or update the existing one:
scrape_configs:
- job_name: my-service
scrape_interval: 15s
static_configs:
- targets: ['my-service:3000']
metrics_path: /metrics
# bearer_token_file: /etc/prometheus/token # if endpoint is protectedIf using Docker Compose, add a prometheus service and mount the config:
prometheus:
image: prom/prometheus:v2.51.2
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
ports:
- "9090:9090"5. Define alert rules
Create alerts.yml and reference it from prometheus.yml:
groups:
- name: my-service
rules:
- alert: HighErrorRate
expr: |
rate(http_request_duration_seconds_count{status_code=~"5.."}[5m])
/ rate(http_request_duration_seconds_count[5m]) > 0.05
for: 2m
labels:
severity: warning
annotations:
summary: "Error rate above 5 % for 2 minutes"
- alert: SlowRequests
expr: |
histogram_quantile(0.99,
rate(http_request_duration_seconds_bucket[5m])) > 1
for: 5m
labels:
severity: warning
annotations:
summary: "p99 latency above 1 s for 5 minutes"
- alert: ServiceDown
expr: up{job="my-service"} == 0
for: 1m
labels:
severity: critical
annotations:
summary: "my-service is not reachable by Prometheus"Tune thresholds against real traffic — never copy alert rules blindly without understanding the service's normal behaviour.
6. Add a Grafana dashboard
Add a grafana service to Compose (or deploy separately):
grafana:
image: grafana/grafana:10.4.2
environment:
GF_SECURITY_ADMIN_PASSWORD: "${GRAFANA_ADMIN_PASSWORD}"
volumes:
- grafana-data:/var/lib/grafana
ports:
- "3001:3000"Provision the Prometheus datasource automatically:
# grafana/provisioning/datasources/prometheus.yml
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
url: http://prometheus:9090
isDefault: trueRecommended dashboard panels:
- Request rate (RPS) per route
- Error rate (%) over time
- p50 / p95 / p99 latency
- Active connections / saturation gauge
- Service health (up/down indicator)
Export the dashboard JSON and commit it to grafana/dashboards/ so it is reproducible.
7. Verify
- Start the service and hit a few endpoints.
curl http://localhost:<port>/health→200 {"status":"ok"}.curl http://localhost:<port>/metrics→ Prometheus text withhttp_request_duration_seconds_*lines.- Open Prometheus → Status → Targets:
my-serviceshowsUP. - Open Grafana → confirm the dashboard populates with real data.
- Trigger an error (e.g., call a nonexistent route) — verify the
5xxcounter increments.
Rules
- Never expose
/metricspublicly. Protect with network policy, mTLS, or a token. - Never use the health endpoint to expose internal connection strings or secrets.
- Instrument at the framework middleware level — not inside every handler.
- Prefer histograms over averages for latency; averages hide tail-latency problems.
- Alert on symptoms (high error rate, slow p99) not on causes (high CPU). Cause-based alerts fire too often and lose their meaning.
- If the project already has a monitoring setup, extend it rather than replacing it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

