Borrowing it
Nothing to install: this file belongs to cubxxw/agent-diff-guard. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/cubxxw/agent-diff-guard/main/.claude/skills/morning-guard-triage/SKILL.mdgit clone --depth 1 https://github.com/cubxxw/agent-diff-guardWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/cubxxw/agent-diff-guard/morning-guard-triage)<a href="https://agentmods.dev/skills/cubxxw/agent-diff-guard/morning-guard-triage"><img src="https://agentmods.dev/badge/skills/cubxxw/agent-diff-guard/morning-guard-triage/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/cubxxw/agent-diff-guard/morning-guard-triage"><img src="https://agentmods.dev/badge/skills/cubxxw/agent-diff-guard/morning-guard-triage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00062 | $0.02696 |
| Opus 5 | $0.00031 | $0.01348 |
| Sonnet 5 | $0.00012 | $0.00539 |
| Haiku 4.5 | $0.00006 | $0.00270 |
Grade A, and why
morning-guard-triage scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 264 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/morning-guard-triage
设计一次,每天自动跑。这是 agent-diff-guard Loop Guard 层的标准晨间巡查 skill——呼应 Loop Engineering 的核心理念:agent 在你睡觉时持续迭代,你醒来时需要一份精确到"该看什么"的简报,而不是翻阅 50 条 commit log。
标准 Morning Triage Loop 形状(Osmani 框架)
┌────────────────────────────────────────────────────────┐
│ Morning Triage Loop │
│ │
│ 1. list sessions → 找出昨日 / 活跃的 loop session │
│ 2. report per session → 生成晨报(drift/budget/findings)│
│ 3. aggregate → 汇总 block/warn 项到 PROGRESS.md│
│ 4. [可选] worktree → 为值得修复的项创建隔离分支 │
│ 5. [可选] notify → 推送摘要到 Slack / Linear │
└────────────────────────────────────────────────────────┘
每个步骤独立可跳过,无副作用(只读 + 写本地文件),适合作为 cron job 或 Claude Code /loop 的 post-iteration hook 运行。
步骤详解与 Bash 命令示例
步骤 1:读昨日所有 loop session
# 列出所有 session(JSON 格式便于后续处理)
SESSIONS=$(agent-diff-guard loop list --json)
# 筛选昨日活跃 / 今日仍在运行的 session(jq 过滤)
ACTIVE_IDS=$(echo "$SESSIONS" | jq -r '.[] | select(.status == "active" or .status == "emergency-braked") | .id')
echo "待巡查 sessions:"
echo "$ACTIVE_IDS"
步骤 2:对每个 session 生成晨报
REPORT_DIR=".agent-guard/morning-$(date +%Y%m%d)"
mkdir -p "$REPORT_DIR"
for SID in $ACTIVE_IDS; do
# 生成 JSON 晨报(含 topFindings / driftSummary / budgetSummary / recommendation)
agent-diff-guard loop report --session "$SID" --json > "$REPORT_DIR/$SID.json"
# 同时生成人类可读版本
agent-diff-guard loop report --session "$SID" > "$REPORT_DIR/$SID.txt"
echo "✓ $SID 晨报已写入 $REPORT_DIR/"
done
generateReport() 输出字段说明(来自 src/loop/report.ts):
| 字段 | 含义 |
|---|---|
topFindings |
Top-5 高频发现(rule × path × count) |
driftSummary.status |
stable / drifting / diverged |
budgetSummary.budgetPct |
token 消耗百分比 |
recommendation |
continue / review-and-continue / rollback / stop |
emergencyBrakeTriggered |
是否触发了紧急制动 |
步骤 3:汇总高风险项 → PROGRESS.md 状态文件
PROGRESS_FILE="MORNING-TRIAGE-$(date +%Y%m%d).md"
{
echo "# Morning Guard Triage — $(date +%Y-%m-%d)"
echo ""
echo "> 自动生成。verdict=block 的项需人工确认。"
echo ""
for SID in $ACTIVE_IDS; do
R="$REPORT_DIR/$SID.json"
echo "## $SID"
echo "- recommendation: $(jq -r '.recommendation' "$R")"
echo "- drift: $(jq -r '.driftSummary.status' "$R") / $(jq -r '(.driftSummary.currentDrift * 100 | floor | tostring) + "%"' "$R")"
echo "- budget: $(jq -r '(.budgetSummary.budgetPct * 100 | floor | tostring) + "%"' "$R") used"
echo "- emergency_brake: $(jq -r '.emergencyBrakeTriggered' "$R")"
echo ""
echo "### wake-you-up 发现"
jq -r '.topFindings[] | select(.severity=="wake-you-up") | "- [ ] `\(.rule)` @ `\(.path)` ×\(.count)"' "$R"
echo ""
done
} > "$PROGRESS_FILE"
echo "✓ 状态文件:$PROGRESS_FILE"
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago First seen · 264 lines · 62 tokens per session scan A 954797e8593e
morning-guard-triage is a skill published in the GitHub repository cubxxw/agent-diff-guard (0 stars, last pushed 1mo ago), licensed MIT. It adds 62 tokens to every session and 2,696 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
learning-from-experience
Turns incidents, near misses, bad handoffs, review surprises, escaped bugs, and signals from real use into lasting fixes to your safeguards. Use after something went wrong or nearly did and a future safeguard should change. Do not use during a live incident, which comes first, or to blame someone.
reporting-shared-defects
Routes a defect found in a shared or supplied artifact (a shared prompt, skill, dependency, model, eval, or template) to the downstream teams, agents, and releases that depend on it, not just a local fix. Use when a discovered defect affects others who consume the same artifact. Do not use for a defect local to your…
responding-to-incidents
Runs a live incident the stabilize-first way — name a commander, separate facts from hypotheses, prefer reversible actions, communicate on a cadence, and drive corrective actions to closure. Use when production is broken, data is at risk, or an agent action caused harm. Do not use for routine non-incident work, or as…
thumbgate-doctor
Health-check whether ThumbGate is actually wired into this agent — PreToolUse/SessionStart hooks installed, MCP server reachable, lesson store present, statusline, and overall agent-readiness — then report exactly what to fix. Runs the existing npx thumbgate doctor audit and the checkoperationalintegrity MCP tool. Use…
prevention-rules
Generate and review prevention rules auto-promoted from repeated failure patterns.
sodam-harness-self-check
A self-checking instruction set for an AI agent. It tells the agent to verify important work, show evidence, and clearly disclose anything it could not check.