dev-observability
Skill0 starsChanged 5 days agoApache-2.0View on GitHub
为代码加日志、指标、追踪与告警,让问题能被发现和定位。只要用户提到日志、监控、指标、告警、追踪、可观测性,就使用本技能。不用于业务指标定义与产品分析。
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- dev-code-reviewSkill
- dev-dispatch-contractSkill
- dev-environmentSkill
- dev-implementation-planSkill
- dev-quality-gateSkill
- dev-releaseSkill
- dev-retroSkill
- dev-role-developerSkill
- dev-role-testerSkill
- dev-systematic-debuggingSkill
- dev-test-strategySkill
- dev-ui-reviewSkill
- dev-ui-verifySkill
- dev-worktree-gitSkill
The file
Files
可观测性
可观测性不是「多打日志」,是回答「出问题时,能不能在五分钟内知道哪里坏了」。
Iron Law
关键路径没有日志、指标、追踪,不算可运维。
什么时候用 / 不用
- 用:新服务、关键路径、故障后补监控、发布前检查。
- 不用:业务指标口径、产品分析、财务统计。
流程
- 列关键路径:入口、外部依赖、数据库、队列、关键分支。
- 定信号:日志(事件)、指标(趋势)、追踪(链路)。
- 设计字段:request_id、user_id(脱敏)、耗时、状态码、错误码。
- 定告警:症状告警优先,原因告警其次;阈值与持续时间。
- 控成本:采样、分级、保留期。
- 验证:人为制造一次失败,确认能看到、能定位。
- 写运行手册:告警含义、排查步骤、升级路径。
门禁
| # | 门禁 | 通过线 | 不过怎么办 |
| 1 | 路径覆盖 | 入口 / 依赖 / 存储 / 队列 | 补 |
| 2 | 三信号 | 日志 / 指标 / 追踪 | 补 |
| 3 | 字段可关联 | request_id 贯穿 | 补 |
| 4 | 脱敏 | 无密钥 / 个人信息 | 阻断 |
| 5 | 告警可行动 | 每条有排查步骤 | 重写 |
| 6 | 验证过 | 人为失败可见 | 补测 |
输出契约
关键路径:<列表>
日志:<事件 + 字段 + 级别>
指标:<名称 + 类型 + 标签>
追踪:<span 边界 + 关键属性>
告警:<条件 + 持续时间 + 级别 + 动作>
成本控制:<采样 / 保留期>
验证:<制造什么失败 + 看到什么>反合理化
| 借口 | 现实 |
| 多打日志总没错 | 噪音会掩盖信号,还增加成本 |
| 有错误日志就够 | 没有指标就不知道趋势 |
| 上线后再加监控 | 故障不会等你 |
| 告警越多越安全 | 告警疲劳等于没有告警 |
| 追踪太复杂 | 关键路径几条就够 |
红旗
- 日志打印密钥或完整个人信息。
- 只有错误日志,没有成功路径耗时。
- 告警没有负责人。
- 指标没有标签无法下钻。
- 从没验证过告警会不会响。
交接
- 业务指标:PM。
- 容量与架构:CTO。
- 发布观察项:
dev-release。
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.

