logging-monitoring
Skill1 starsChanged 11 months agoMITView on GitHub
Logging and monitoring best practices. Auto-activates when adding logs, metrics, or observability.
- Reads credentials
Files
Logging & Monitoring
Structured Logging
import pino from 'pino';
const logger = pino({
level: process.env.LOG_LEVEL || 'info',
});
// Good: Structured with context
logger.info({
event: 'user_created',
userId: user.id,
email: user.email,
duration: 150
}, 'User created successfully');
// Bad: Unstructured
console.log('User ' + user.id + ' created');Log Levels
| Level | Use For |
| ERROR | Errors requiring immediate attention |
| WARN | Unexpected but handled situations |
| INFO | Important business events |
| DEBUG | Detailed debugging info |
| TRACE | Very detailed tracing |
What to Log
DO Log
- Request/response (without sensitive data)
- Business events (user signup, purchase)
- Errors with stack traces
- Performance metrics
- Security events (login, failed auth)
DON'T Log
- Passwords or tokens
- PII without consent
- Credit card numbers
- Health check endpoints (too noisy)
Request Tracing
// Add request ID to all logs
app.use((req, res, next) => {
req.requestId = uuid();
logger.child({ requestId: req.requestId });
next();
});Metrics to Track
- Request rate (requests/second)
- Error rate (errors/total)
- Response time (p50, p95, p99)
- CPU/Memory usage
- Database query time
- Queue depth
Alerting Rules
- Error rate > 1% for 5 minutes
- Response time p99 > 2s
- CPU > 80% for 10 minutes
- Disk space < 20%
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- kyleoliveiro/sg-gov-skills★ 17same name
- JeremyMorgan/code-review-skills★ 15same name
- YepAPI/skills★ 8same name
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 repository20 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- api-integrationSkill
- authenticationSkill
- caching-strategiesSkill
- ci-cd-pipelinesSkill
- clean-architectureSkill
- code-patternsSkill
- database-designSkill
- docker-composeSkill
- error-handlingSkill
- frontend-designSkill
- git-workflowSkill
- microservicesSkill
- performance-tuningSkill
- project-setupSkill
- security-best-practicesSkill
- systematic-debuggingSkill
- tddSkill
- testing-strategiesSkill
- websockets-realtimeSkill
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.

