一键导入
observability
Logging, metrics, tracing, monitoring patterns. Triggers on logging/metrics/tracing/monitoring keywords.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Logging, metrics, tracing, monitoring patterns. Triggers on logging/metrics/tracing/monitoring keywords.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
When the user wants help with paid advertising campaigns on Google Ads, Meta (Facebook/Instagram), LinkedIn, Twitter/X, or other ad platforms. Also use when the user mentions 'PPC,' 'paid media,' 'ROAS,' 'CPA,' 'ad campaign,' 'retargeting,' 'audience targeting,' 'Google Ads,' 'Facebook ads,' 'LinkedIn ads,' 'ad budget,' 'cost per click,' 'ad spend,' or 'should I run ads.' Use this for campaign strategy, audience targeting, bidding, and optimization. For bulk ad creative generation and iteration, see ad-creative. For landing page optimization, see cro.
Persistent engineering knowledge vault with semantic search. Save decisions, patterns, debug solutions, and insights as Zettelkasten notes in Obsidian with automatic embedding indexing for semantic retrieval. Use this skill whenever the user says "/memo", "запомни это", "сохрани в базу", "save this", "remember this", "добавь в базу знаний", "log this pattern", or any variation of wanting to persist knowledge. Also trigger for "/memo find", "/memo search", "что я решал по X", "find in vault", "search vault", "найди в базе" to search notes — both keyword and semantic. Trigger for "/memo dedup", "/memo stats", "/memo project", "/memo reindex". This is the bridge between Claude Code sessions and long-term engineering memory across all projects.
Use when starting any new task to select the right GSD mode (fast/quick/plan-phase) and the right model tier (Haiku/Sonnet/Opus) for subagents — prevents 5-10× cost overpay on routine work
Pack the whole repo (or a remote one) into one AI-friendly file via Repomix. Use for architectural reviews, cross-repo handoff, full-codebase audits — not for single-file lookups. Triggers on "pack repo", "feed codebase to AI", "снапшот", "analyze remote repo".
花叔Design(Huashu-Design)——用HTML做高保真原型、交互Demo、幻灯片、动画、设计变体探索+设计方向顾问+专家评审的一体化设计能力。HTML是工具不是媒介,根据任务embody不同专家(UX设计师/动画师/幻灯片设计师/原型师),避免web design tropes。触发词:做原型、设计Demo、交互原型、HTML演示、动画Demo、设计变体、hi-fi设计、UI mockup、prototype、设计探索、做个HTML页面、做个可视化、app原型、iOS原型、移动应用mockup、导出MP4、导出GIF、60fps视频、设计风格、设计方向、设计哲学、配色方案、视觉风格、推荐风格、选个风格、做个好看的、评审、好不好看、review this design、带解说的动画、解说视频、概念解释视频、长视频科普、配音动画、voiceover、narration、TTS+动画、5分钟讲清楚什么是XX。**主干能力**:Junior Designer工作流(先给假设+reasoning+placeholder再迭代)、反AI slop清单、React+Babel最佳实践、Tweaks变体切换、Speaker Notes演示、Starter Components(幻灯片外壳/变体画布/动画引擎/设备边框/解说Stage)、App原型专属守则(默认从Wikimedia/Met/Unsplash取真图、每台iPhone包AppPhone状态管理器可交互、交付前跑Playwright点击测试)、Playwright验证、HTML动画→MP4/GIF视频导出(25fps基础 + 60fps插帧 + palette优化GIF + 6首场景化BGM + 自动fade)、**带解说的长动画pipeline**(豆包TTS生人声+实测时长生timeline.json+NarrationStage驱动画面+ducking混音→交付HTML实播+发布MP4双形态;铁律:整片是一个连续的运动叙事,禁PowerPoint切换)。**需求模糊时的Fallback**:设计方向顾问模式——从5流派×20种设计哲学(Pentagram信息建筑/Field.io运动诗学/Kenya Hara东方极简/Sagmeister实验先锋等)推荐3个差异化方向,展示24个预制showcase(8场景×3风格),并行生成3个视觉Demo让用户选
Use BEFORE coding any new feature, MVP, pricing/billing change, launch, or pivot. Acts as a product validation gate for solo founders — validates target user, JTBD, pain intensity, current alternative, success metric, distribution channel, structural advantage vs competitors, unit economics with SaaS-graveyard gate, cheapest experiment, and top risk. RIGID — do not proceed to technical planning until product context is documented in `.planning/product/<slug>.md` or risk is explicitly accepted. Triggers on "build", "ship", "add feature", "MVP", "launch", "pivot", "pricing", "billing", before /plan, /tdd, /gsd-plan-phase, /gsd-discuss-phase, or when user describes a feature without naming a measurable success metric.
| name | Observability |
| description | Logging, metrics, tracing, monitoring patterns. Triggers on logging/metrics/tracing/monitoring keywords. |
Load this skill when implementing logging, metrics, tracing, or monitoring.
OBSERVE WHAT MATTERS, NOT EVERYTHING!
| Pillar | Purpose | Use When |
|---|---|---|
| Logs | Debug specific events | "What happened?" |
| Metrics | Aggregate measurements | "How much/many?" |
| Traces | Request flow across services | "Where did time go?" |
| Level | Use Case | Examples |
|---|---|---|
ERROR | Failures requiring attention | Unhandled exceptions, failed payments |
WARN | Potential issues | Retry attempts, deprecated usage |
INFO | Business events | User registered, order placed |
DEBUG | Diagnostic details | Function inputs/outputs, SQL queries |
{
"timestamp": "2024-01-15T10:30:00.000Z",
"level": "info",
"message": "User registered",
"service": "auth-service",
"traceId": "abc123",
"userId": "user_456",
"email": "user@example.com",
"duration_ms": 45
}
// Good: Structured with context
logger.info('Order placed', {
orderId: order.id,
userId: user.id,
total: order.total,
items: order.items.length,
});
// Bad: Unstructured
logger.info(`Order ${order.id} placed for user ${user.id}`);
// Pino (Node.js - fastest)
import pino from 'pino';
const logger = pino({
level: process.env.LOG_LEVEL || 'info',
formatters: {
level: (label) => ({ level: label }),
},
base: {
service: 'my-service',
env: process.env.NODE_ENV,
},
});
| Type | Use Case | Example |
|---|---|---|
| Counter | Cumulative count | Requests total, errors total |
| Gauge | Current value | Active connections, queue size |
| Histogram | Distribution | Request duration, response size |
| Summary | Percentiles | p50, p95, p99 latency |
# Pattern: <namespace>_<name>_<unit>
http_requests_total # Counter
http_request_duration_seconds # Histogram
db_connections_active # Gauge
queue_messages_pending # Gauge
| Metric | Description |
|---|---|
| Rate | Requests per second |
| Errors | Error rate (%) |
| Duration | Latency (p50, p95, p99) |
import { Counter, Histogram, Registry } from 'prom-client';
const register = new Registry();
const httpRequestsTotal = new Counter({
name: 'http_requests_total',
help: 'Total HTTP requests',
labelNames: ['method', 'path', 'status'],
registers: [register],
});
const httpRequestDuration = new Histogram({
name: 'http_request_duration_seconds',
help: 'HTTP request duration',
labelNames: ['method', 'path'],
buckets: [0.01, 0.05, 0.1, 0.5, 1, 5],
registers: [register],
});
// Usage
httpRequestsTotal.inc({ method: 'GET', path: '/users', status: 200 });
httpRequestDuration.observe({ method: 'GET', path: '/users' }, 0.045);
import { NodeSDK } from '@opentelemetry/sdk-node';
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http';
import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node';
const sdk = new NodeSDK({
traceExporter: new OTLPTraceExporter({
url: 'http://jaeger:4318/v1/traces',
}),
instrumentations: [getNodeAutoInstrumentations()],
});
sdk.start();
import { trace } from '@opentelemetry/api';
const tracer = trace.getTracer('my-service');
async function processOrder(orderId: string) {
return tracer.startActiveSpan('processOrder', async (span) => {
span.setAttribute('orderId', orderId);
try {
const result = await doWork();
span.setStatus({ code: SpanStatusCode.OK });
return result;
} catch (error) {
span.setStatus({ code: SpanStatusCode.ERROR, message: error.message });
span.recordException(error);
throw error;
} finally {
span.end();
}
});
}
// Automatically propagated via HTTP headers
// W3C Trace Context: traceparent, tracestate
// Manual propagation
import { context, propagation } from '@opentelemetry/api';
const headers = {};
propagation.inject(context.active(), headers);
// headers = { traceparent: '00-abc123...' }
| Endpoint | Purpose | Response |
|---|---|---|
/health | Basic liveness | 200 if running |
/health/live | Kubernetes liveness | 200 if process alive |
/health/ready | Kubernetes readiness | 200 if ready for traffic |
app.get('/health', (req, res) => {
res.status(200).json({ status: 'ok' });
});
app.get('/health/ready', async (req, res) => {
const checks = {
database: await checkDatabase(),
redis: await checkRedis(),
external: await checkExternalService(),
};
const healthy = Object.values(checks).every((c) => c.status === 'ok');
res.status(healthy ? 200 : 503).json({
status: healthy ? 'ok' : 'degraded',
checks,
});
});
async function checkDatabase() {
try {
await db.query('SELECT 1');
return { status: 'ok' };
} catch (error) {
return { status: 'error', message: error.message };
}
}
| Level | Response Time | Example |
|---|---|---|
| Critical | < 5 min | Service down, data loss |
| Warning | < 1 hour | High error rate, disk 80% |
| Info | Next business day | Deprecation notices |
# Alert on error budget burn rate
- alert: HighErrorRate
expr: |
(
sum(rate(http_requests_total{status=~"5.."}[5m]))
/
sum(rate(http_requests_total[5m]))
) > 0.01
for: 5m
labels:
severity: critical
annotations:
summary: "Error rate above 1%"
Row 1: Request Rate | Error Rate | Latency (p50, p95, p99)
Row 2: CPU Usage | Memory Usage | Active Connections
Row 3: Database Queries | Cache Hit Rate | Queue Depth
Row 4: Recent Errors (logs) | Slow Requests
# Request rate
sum(rate(http_requests_total[5m])) by (service)
# Error rate percentage
100 * sum(rate(http_requests_total{status=~"5.."}[5m]))
/ sum(rate(http_requests_total[5m]))
# p95 latency
histogram_quantile(0.95, rate(http_request_duration_seconds_bucket[5m]))
# Saturation (queue depth)
sum(queue_messages_pending) by (queue)