
monitoring-logging
Application monitoring, logging systems, and alerting
- version
- 1.0.0
- GitHub stars
- 26
Add marketplace
/plugin marketplace add miles990/claude-software-skillsRun it inside Claude Code once, then install the plugin below.
Install
/plugin install monitoring-logging@claude-software-skillsRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourceMonitoring & Logging
Overview
Application observability through logging, metrics collection, monitoring dashboards, and alerting systems.
Structured Logging
Pino Logger (Node.js)
import pino from 'pino';
// Base logger configuration
const logger = pino({
level: process.env.LOG_LEVEL || 'info',
formatters: {
level: (label) => ({ level: label }),
bindings: () => ({}), // Remove pid and hostname
},
timestamp: pino.stdTimeFunctions.isoTime,
redact: {
paths: ['password', 'token', 'authorization', '*.password', '*.token'],
censor: '[REDACTED]',
},
});
// Child logger with context
function createRequestLogger(req: Request) {
return logger.child({
requestId: req.headers['x-request-id'] || crypto.randomUUID(),
method: req.method,
path: req.path,
userAgent: req.headers['user-agent'],
userId: req.user?.id,
});
}
// Express middleware
app.use((req, res, next) => {
req.log = createRequestLogger(req);
const startTime = Date.now();
res.on('finish', () => {
const duration = Date.now() - startTime;
req.log.info({
statusCode: res.statusCode,
duration,
contentLength: res.get('content-length'),
}, 'request completed');
});
next();
});
// Usage in handlers
app.get('/api/users/:id', async (req, res) => {
req.log.info({ userId: req.params.id }, 'fetching user');
try {
const user = await getUser(req.params.id);
req.log.debug({ user: user.id }, 'user found');
res.json(user);
} catch (error) {
req.log.error({ error }, 'failed to fetch user');
res.status(500).json({ error: 'Internal error' });
}
});
Log Levels
// Log level guidelines
logger.trace('Detailed debugging info'); // 10 - Very verbose
logger.debug('Debugging information'); // 20 - Debug mode only
logger.info('Normal operation events'); // 30 - Default level
logger.warn('Warning conditions'); // 40 - Potential issues
logger.error('Error conditions'); // 50 - Errors that need attention
logger.fatal('System-critical errors'); // 60 - System failure
// Contextual logging
logger.info({ orderId, userId, amount }, 'order placed');
logger.error({ error: err.message, stack: err.stack }, 'payment failed');
logger.warn({ retryCount, maxRetries }, 'retry attempt');
Log Aggregation Format
{
"timestamp": "2024-01-15T10:30:00.000Z",
"level": "info",
"message": "request completed",
"service": "api",
"version": "1.2.3",
"environment": "production",
"requestId": "abc-123",
"traceId": "xyz-789",
"method": "GET",
"path": "/api/users/123",
"statusCode": 200,
"duration": 45,
"userId": "user-456"
}
Metrics Collection
Prometheus Metrics
import { Counter, Histogram, Gauge, Registry, collectDefaultMetrics } from 'prom-client';
const register = new Registry();
// Collect default Node.js metrics
collectDefaultMetrics({ register });
// HTTP request metrics
const httpRequestsTotal = new Counter({
name: 'http_requests_total',
help: 'Total number of HTTP requests',
labelNames: ['method', 'path', 'status'],
registers: [register],
});
const httpRequestDuration = new Histogram({
name: 'http_request_duration_seconds',
help: 'Duration of HTTP requests in seconds',
labelNames: ['method', 'path'],
buckets: [0.01, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10],
registers: [register],
});
// Business metrics
const ordersTotal = new Counter({
name: 'orders_total',
help: 'Total number of orders',
labelNames: ['status', 'payment_method'],
registers: [register],
});
const activeUsers = new Gauge({
name: 'active_users',
help: 'Number of currently active users',
registers: [register],
});
const orderAmount = new Histogram({
name: 'order_amount_dollars',
help: 'Distribution of order amounts',
buckets: [10, 50, 100, 250, 500, 1000, 5000],
registers: [register],
});
// Middleware to collect metrics
app.use((req, res, next) => {
const end = httpRequestDuration.startTimer({
method: req.method,
path: req.route?.path || req.path,
});
res.on('finish', () => {
end();
httpRequestsTotal
.labels(req.method, req.route?.path || req.path, res.statusCode.toString())
.inc();
});
next();
});
// Metrics endpoint
app.get('/metrics', async (req, res) => {
res.set('Content-Type', register.contentType);
res.send(await register.metrics());
});
// Business metric usage
async function createOrder(order: Order) {
// ... create order
ordersTotal.labels(order.status, order.paymentMethod).inc();
orderAmount.observe(order.total);
}
Custom Metrics Patterns
// Rate limiting metrics
const rateLimitHits = new Counter({
name: 'rate_limit_hits_total',
help: 'Number of rate limit hits',
labelNames: ['endpoint', 'user_tier'],
});
// Cache metrics
const cacheHits = new Counter({
name: 'cache_hits_total',
help: 'Number of cache hits',
labelNames: ['cache_name'],
});
const cacheMisses = new Counter({
name: 'cache_misses_total',
help: 'Number of cache misses',
labelNames: ['cache_name'],
});
// Database metrics
const dbQueryDuration = new Histogram({
name: 'db_query_duration_seconds',
help: 'Database query duration',
labelNames: ['operation', 'table'],
buckets: [0.001, 0.005, 0.01, 0.05, 0.1, 0.5, 1],
});
const dbConnectionPool = new Gauge({
name: 'db_connection_pool_size',
help: 'Database connection pool size',
labelNames: ['state'], // active, idle, waiting
});
// Queue metrics
const queueSize = new Gauge({
name: 'queue_size',
help: 'Number of items in queue',
labelNames: ['queue_name'],
});
const jobDuration = new Histogram({
name: 'job_duration_seconds',
help: 'Job processing duration',
labelNames: ['job_type', 'status'],
});
Alerting
Alert Rules (Prometheus)
# prometheus/alerts.yml
groups:
- name: application
rules:
# High error rate
- alert: HighErrorRate
expr: |
sum(rate(http_requests_total{status=~"5.."}[5m]))
/ sum(rate(http_requests_total[5m])) > 0.05
for: 5m
labels:
severity: critical
annotations:
summary: "High error rate detected"
description: "Error rate is {{ $value | humanizePercentage }}"
# High latency
- alert: HighLatency
expr: |
histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket[5m])) by (le))
> 1
for: 5m
labels:
severity: warning
annotations:
summary: "High latency detected"
description: "95th percentile latency is {{ $value }}s"
# Service down
- alert: ServiceDown
expr: up == 0
for: 1m
labels:
severity: critical
annotations:
summary: "Service {{ $labels.instance }} is down"
# High memory usage
- alert: HighMemoryUsage
expr: |
process_resident_memory_bytes / 1024 / 1024 / 1024 > 4
for: 10m
labels:
severity: warning
annotations:
summary: "High memory usage"
description: "Memory usage is {{ $value | humanize }}GB"
- name: business
rules:
# Low order rate
- alert: LowOrderRate
expr: |
sum(rate(orders_total[1h])) < 10
for: 30m
labels:
severity: warning
annotations:
summary: "Order rate is below normal"
# Payment failures
- alert: HighPaymentFailures
expr: |
sum(rate(orders_total{status="failed"}[15m]))
/ sum(rate(orders_total[15m])) > 0.1
for: 10m
labels:
severity: critical
annotations:
summary: "High payment failure rate"
PagerDuty Integration
import axios from 'axios';
interface Alert {
severity: 'critical' | 'error' | 'warning' | 'info';
summary: string;
source: string;
details?: Record<string, any>;
}
async function sendPagerDutyAlert(alert: Alert) {
const event = {
routing_key: process.env.PAGERDUTY_ROUTING_KEY,
event_action: 'trigger',
dedup_key: `${alert.source}-${alert.summary}`,
payload: {
summary: alert.summary,
severity: alert.severity,
source: alert.source,
custom_details: alert.details,
timestamp: new Date().toISOString(),
},
};
await axios.post(
'https://events.pagerduty.com/v2/enqueue',
event
);
}
// Resolve alert
async function resolvePagerDutyAlert(dedupKey: string) {
await axios.post('https://events.pagerduty.com/v2/enqueue', {
routing_key: process.env.PAGERDUTY_ROUTING_KEY,
event_action: 'resolve',
dedup_key: dedupKey,
});
}
Dashboards
Grafana Dashboard JSON
{
"title": "Application Overview",
"panels": [
{
"title": "Request Rate",
"type": "graph",
"targets": [
{
"expr": "sum(rate(http_requests_total[5m])) by (status)",
"legendFormat": "{{status}}"
}
]
},
{
"title": "Latency (p95)",
"type": "graph",
"targets": [
{
"expr": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket[5m])) by (le, path))",
"legendFormat": "{{path}}"
}
]
},
{
"title": "Error Rate",
"type": "stat",
"targets": [
{
"expr": "sum(rate(http_requests_total{status=~\"5..\"}[5m])) / sum(rate(http_requests_total[5m])) * 100"
}
],
"fieldConfig": {
"defaults": {
"unit": "percent",
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "yellow", "value": 1 },
{ "color": "red", "value": 5 }
]
}
}
}
},
{
"title": "Active Users",
"type": "stat",
"targets": [
{ "expr": "active_users" }
]
}
]
}
Health Checks
import { Router } from 'express';
const healthRouter = Router();
// Liveness probe - is the app running?
healthRouter.get('/health/live', (req, res) => {
res.json({ status: 'ok' });
});
// Readiness probe - is the app ready to serve traffic?
healthRouter.get('/health/ready', async (req, res) => {
const checks = await Promise.allSettled([
checkDatabase(),
checkRedis(),
checkExternalApi(),
]);
const results = {
database: checks[0].status === 'fulfilled' ? 'ok' : 'error',
redis: checks[1].status === 'fulfilled' ? 'ok' : 'error',
externalApi: checks[2].status === 'fulfilled' ? 'ok' : 'error',
};
const allHealthy = Object.values(results).every(s => s === 'ok');
res.status(allHealthy ? 200 : 503).json({
status: allHealthy ? 'ok' : 'degraded',
checks: results,
timestamp: new Date().toISOString(),
});
});
async function checkDatabase() {
const start = Date.now();
await db.query('SELECT 1');
return { latency: Date.now() - start };
}
async function checkRedis() {
const start = Date.now();
await redis.ping();
return { latency: Date.now() - start };
}
async function checkExternalApi() {
const start = Date.now();
await fetch('https://api.example.com/health', { timeout: 5000 });
return { latency: Date.now() - start };
}
Related Skills
- [[reliability-engineering]] - SRE practices
- [[devops-cicd]] - CI/CD monitoring
- [[cloud-platforms]] - Cloud monitoring
From the miles990/claude-software-skills README
Claude Software Skills
55 modular software development skills for Claude Code - from architecture to deployment
┌─────────────────────────────────────────────────────────────────┐
│ Claude Software Skills │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Software │ │ Software │ │ Development │ │
│ │ Design │ │ Engineering │ │ Stacks │ │
│ │ 6 │ │ 8 │ │ 8 │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Tools & │ │ Domain │ │ Programming │ │
│ │ Integrations │ │ Applications │ │ Languages │ │
│ │ 9 │ │ 12 │ │ 12 │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │
│ AI 自動識別任務 → 載入對應領域知識 │
└─────────────────────────────────────────────────────────────────┘
Features
- MCP Compatible - Works with Claude Code, Cursor, and other MCP clients
- Semantic Search - Claude automatically finds relevant skills for your task
- Cross-Domain Integration - Skills work together seamlessly
- Best Practices Built-In - Each skill includes patterns and anti-patterns
- Modular Architecture - Use only what you need
- Sharp Edges - Proactive warnings about common pitfalls with detection patterns
- Validations - Executable code quality rules with regex/ast patterns
- Collaboration - Skills declare relationships for smart delegation and context passing
Installation
Plugin Marketplace (Recommended)
# 1. Add marketplace (GitHub format: owner/repo)
/plugin marketplace add miles990/claude-software-skills
# 2. Open plugin management interface, view available plugins in Discover tab
/plugin
# 3. Install specific skills (choose what you need)
/plugin install frontend@claude-software-skills
/plugin install backend@claude-software-skills
/plugin install api-design@claude-software-skills
# Or mention skill name in conversation, Claude will auto-load
Supported GitHub formats:
# Short format (recommended)
/plugin marketplace add miles990/claude-software-skills
# HTTPS URL
/plugin marketplace add https://github.com/miles990/claude-software-skills.git
# Specify branch or tag
/plugin marketplace add miles990/claude-software-skills#main
Plugin commands:
| Command | Description |
|---|---|
/plugin | Open interactive plugin management interface |
/plugin install <name>@<marketplace> | Install specific plugin |
/plugin disable <name>@<marketplace> | Temporarily disable plugin |
/plugin uninstall <name>@<marketplace> | Completely remove plugin |
Available Skills
Software Design (6 skills)
| Skill | Description |
|---|---|
architecture-patterns | Software architecture patterns and best practices |
design-patterns | Classic and modern software design patterns |
api-design | RESTful, GraphQL, gRPC, and API best practices |
system-design | Scalability, availability, and distributed systems design |
data-design | Data modeling, schema design, and data architecture |
ux-principles | User experience design principles for developers |
Software Engineering (8 skills)
| Skill | Description |
|---|---|
code-quality | Clean code principles, SOLID, and code review practices |
testing-strategies | Unit, integration, E2E testing and TDD practices |
devops-cicd | CI/CD pipelines, infrastructure as code, and deployment |
performance-optimization | Profiling, optimization techniques, and best practices |
security-practices | OWASP Top 10, authentication, and secure coding |
reliability-engineering | SRE principles, observability, and incident management |
documentation | Technical writing, API docs, and documentation best practices |
internationalization | i18n/l10n architecture design and multi-language support |
Development Stacks (8 skills)
| Skill | Description |
|---|---|
frontend | Modern frontend with React, Vue, and web technologies |
backend | Backend with Node.js, Express, NestJS, and server patterns |
mobile | Mobile with React Native, Flutter, and native patterns |
database | Database design, SQL, NoSQL, and data management |
cloud-platforms | AWS, GCP, Azure services and cloud-native development |
ai-ml-integration | AI/ML APIs, LLM integration, and intelligent apps |
realtime-systems | WebSocket, real-time communication, event-driven |
edge-iot | Edge computing, IoT protocols, and embedded systems |
Tools & Integrations (9 skills)
| Skill | Description |
|---|---|
git-workflows | Git version control, branching, and collaboration |
project-management | Agile, Scrum, Kanban, and issue tracking |
development-environment | IDE setup, dev containers, and local development |
monitoring-logging | Application monitoring, logging, and alerting |
api-tools | API testing, documentation, and development tools |
automation-scripts | Build automation, task runners, and scripting |
auto-dev-setup | Auto-Dev workflow for Human-in-the-Loop automation |
claude-code-plugin | Claude Code Plugin development and marketplace management |
claude-code-sdk | Claude Code SDK for AI-powered applications |
Domain Applications (12 skills)
| Skill | Description |
|---|---|
application-patterns | Common application development patterns |
e-commerce | E-commerce platforms, payments, shopping cart |
saas-platforms | SaaS architecture, multi-tenancy, subscriptions |
content-platforms | CMS, blogging platforms, content management |
communication-systems | Email, notifications, messaging systems |
developer-tools | CLI tools, SDKs, developer experience |
game-development | Game development patterns and architectures |
flame | Flame Engine 2D game development for Flutter |
flame-core | Flame Engine core - components, input, collision |
flame-systems | Flame Engine 14 game systems |
flame-templates | Game templates - RPG, Platformer, Roguelike |
desktop-apps | Desktop apps with Electron and Tauri |
Programming Languages (12 skills)
| Skill | Description |
|---|---|
javascript-typescript | Modern JavaScript and TypeScript patterns |
python | Python programming patterns and best practices |
go | Go programming patterns and idioms |
rust | Rust patterns and ownership concepts |
java-kotlin | Java and Kotlin programming patterns |
csharp-dotnet | C# and .NET development patterns |
cpp | Modern C++ programming patterns and idioms |
ruby | Ruby programming patterns and idioms |
php | Modern PHP programming patterns |
swift | Swift patterns for iOS and macOS |
shell-bash | Shell scripting and Bash programming |
sql | SQL patterns for database querying and design |
Other Installation Methods
Clone to Skills Directory
# Clone to your skills directory
git clone https://github.com/miles990/claude-software-skills.git ~/.claude/skills/software-skills
Claude will automatically discover and use the skills when relevant to your tasks.
With MCP Server
This repository is compatible with claude-skills-mcp:
# Install the MCP server
pip install claude-skills-mcp
# Add this repository as a skill source
# The server will load skills from ~/.claude/skills/
Cursor IDE
Add to your Cursor MCP settings:
{
"mcpServers": {
"software-skills": {
"command": "npx",
"args": ["-y", "claude-skills-mcp"],
"env": {
"SKILLS_PATH": "/path/to/claude-software-skills"
}
}
}
}
Manual Reference
Simply clone and reference the SKILL.md files in your prompts:
git clone https://github.com/miles990/claude-software-skills.git
Auto-Dev: Automated Development Workflow
One-click setup for GitHub Actions automated development workflow, let Claude help you complete development tasks.
Quick Setup
Using API Key:
curl -fsSL https://raw.githubusercontent.com/miles990/claude-software-skills/main/scripts/setup-auto-dev-apikey.sh | bash
Using Claude Max (OAuth):
curl -fsSL https://raw.githubusercontent.com/miles990/claude-software-skills/main/scripts/setup-auto-dev-max.sh | bash
Post-Installation Setup
| Version | Setup Method |
|---|---|
| API Key | Get Key from console.anthropic.com, set in GitHub Secrets ANTHROPIC_API_KEY |
| Claude Max | Run claude /install-github-app for auto OAuth Token setup |
Usage
- Issue Trigger: Create Issue → Add
auto-devlabel - Comment Trigger: Comment
@claude [instruction]on any Issue/PR
Detailed docs: AUTO-DEV.md
Usage Examples
User: Help me design a microservices architecture for an e-commerce platform
Claude: [Automatically uses architecture-patterns + e-commerce + api-design skills]
User: Review this Python code for performance issues
Claude: [Automatically uses python + performance-optimization + code-quality skills]
User: Set up CI/CD for a React + Node.js monorepo
Claude: [Automatically uses devops-cicd + frontend + backend + git-workflows skills]
Directory Structure
claude-software-skills/
├── .claude-plugin/ # Plugin configuration
│ └── marketplace.json # Lists all 55 skills as individual plugins
├── .github/
│ └── workflows/ # CI/CD automation
├── software-design/ # Architecture & design skills
├── software-engineering/ # Development practices
├── development-stacks/ # Tech stack skills
├── tools-integrations/ # Developer tools
├── domain-applications/ # Domain-specific patterns
├── programming-languages/ # Language-specific skills
├── docs/
│ ├── SKILL-TEMPLATE.md # Template for new skills
│ └── software-skills.md
├── CONTRIBUTING.md
├── LICENSE
└── README.md
How It Works
Each skill module contains a SKILL.md file with:
- Metadata - Name, description, tags for semantic search
- Key Concepts - Core knowledge and terminology
- Best Practices - Recommended approaches with examples
- Common Pitfalls - What to avoid and why
- Patterns & Anti-patterns - Do's and don'ts with code
- Tools & Resources - Recommended tools and references
- Decision Guide - When to use this skill
When you describe a task, Claude:
- Searches for relevant skills using semantic matching
- Loads the appropriate SKILL.md files
- Applies the knowledge to your specific context
- Follows best practices while avoiding common pitfalls
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Adding a New Skill
- Create a directory under the appropriate category
- Add a
SKILL.mdfollowing our template - Include practical examples and best practices
- Submit a pull request
License
MIT License - See LICENSE for details.
Related Projects
- claude-domain-skills - Non-technical domain skills
- claude-skills-mcp - MCP server for skill discovery
Built for developers, by developers, with Claude
Details
- Marketplace
- miles990/claude-software-skills
- Source
- tools-integrations/monitoring-logging
- Category
- Community
- Listed since
- Apr 6, 2026
More from miles990/claude-software-skills
All 56- performance-optimizationv1.0.0
- phpv1.0.0
- project-managementv1.0.0
- pythonv1.0.0
- realtime-systemsv1.0.0
- reliability-engineeringv1.0.0
- rubyv1.0.0
- rustv1.0.0
- saas-platformsv1.0.0
- security-practicesv1.0.0
- shell-bashv1.0.0
- sqlv1.0.0
- swiftv1.0.0
- system-designv1.0.0
- testing-strategiesv1.0.0
- ux-principlesv1.0.0
- ai-ml-integrationv1.0.0
- analyze-repov1.0.0
- api-designv1.0.0
- api-toolsv1.0.0
- application-patternsv1.0.0
- architecture-patternsv1.0.0
- auto-dev-setupv1.0.0
- automation-scriptsv1.0.0
Similar to monitoring-logging
More DevOps & Cloud
observability-monitoringwshobson/agents42.8K starsMetrics collection, logging infrastructure, distributed tracing, SLO implementation, and monitoring dashboards
observability-toolsAgentient/vibekit2 starsLogging, tracing, error tracking, alerting, OpenTelemetry
devops-observability-sremarslanalvi/SkillsStack5 starsMonitoring, tracing, logging, SLOs, incident response and on-call
monitoring-setuprohitg00/awesome-claude-code-toolkit2.8K starsMonitoring and alerting configuration with dashboard generation
application-performancewshobson/agents42.8K starsApplication profiling, performance optimization, and observability for frontend and backend systems
sentryTheBushidoCollective/han201 starsBest practices and patterns for Sentry error monitoring and observability.