用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/lukemcqueen/hermes-cortex --skill cron-output-contracts命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Cross-server agent health monitoring using binary status vectors — deploy health endpoints on each agent, poll from orchestrator, alert on state transitions.
Wire a self-hosted Langfuse instance to Hermes Agent — generate API keys, configure env vars, enable the bundled plugin, install SDK, and verify traces flow.
Use before enforcement code changes or shared-repo commits.
基于 SOC 职业分类
正在显示 SKILL.md
| name | cron-output-contracts |
| description | Use when a script reads another cron's output or retires. |
| version | 1.0.0 |
| author | Hermes Cortex |
| license | MIT |
| platforms | ["linux","macos"] |
Job ids are ephemeral: they change whenever a cron is recreated
(re-install, re-create, migrate). A script that reads
~/.hermes/cron/output/<hardcoded-id>/ goes silently blind the day the
cron is recreated under a new id — it still exits 0, still logs, still
"runs", and fixes nothing.
Real case (2026-08-08): agent-remediate-apply.py hardcoded
SENSOR_JOB_ID="2c71ffaf3a55" while the live agent-remediation-sensor
ran under 0afb2f94d9b7. The deterministic fixer was a no-op for weeks
and nobody noticed — the sensor itself looked healthy.
Canonical resolution — by NAME, from jobs.json:
import json
from pathlib import Path
HOME = Path.home()
SENSOR_JOB_NAME = "agent-remediation-sensor"
OUTPUT_ROOT = HOME / ".hermes" / "cron" / "output"
def discover_output_dir() -> Path | None:
jobs_file = HOME / ".hermes" / "cron" / "jobs.json"
try:
if jobs_file.exists():
data = json.loads(jobs_file.read_text(encoding="utf-8"))
jobs = data if isinstance(data, list) else data.get("jobs", [])
for j in jobs:
if j.get("name") == SENSOR_JOB_NAME and j.get("id"):
d = OUTPUT_ROOT / str(j["id"])
if d.exists():
return d
except Exception:
pass
# Fallback: newest .md under the output root
best, best_mtime = None, 0.0
if OUTPUT_ROOT.exists():
for d in OUTPUT_ROOT.iterdir():
if not d.is_dir():
continue
mds = sorted(d.glob("*.md"), key=lambda p: p.stat().st_mtime, reverse=True)
mds mds[].stat().st_mtime > best_mtime:
best, best_mtime = d, mds[].stat().st_mtime
best
When the producer script's name changes too, update the constant — never reach for the id.
A cron is a zombie when its input path died but the cron itself still ticks. Before "fixing" a seemingly broken fixer, check:
ls -lt <dir> — a stale mtime = dead producer.)cronjob action=list — is the producer actually
running ok, or has its job id changed?register()-ed in
cortex-update.sh? An unregistered script keeps running from a stale
deployed copy that never updates.ls -la ~/.hermes/scripts/<script> — a weeks-old
mtime while the repo has newer source = orphaned deploy.references/fixer-reconciliation-2026-08-08.md).Removing a cron touches ALL of these — one missed location = stale reference or doctor drift:
cronjob action='remove' job_id=<id> (list first; never
guess ids).create_cron
block AND the matching uninstall-array entry (the array is the doctor's
expected-cron source; a leftover name = false ❌).register() line for the script.agent-stale-ref-watchdog.sh CRON_SCRIPTS array).~/.hermes/scripts/ and
~/.hermes-cortex/scripts/ copies (and repo source via git rm).docs/cron-schedules.md,
docs/cron-jobs-reference.md, docs/fleet-reference.md, README.md
(pipeline diagrams + category tables), docs/setup-reference.md (key
scripts lists). Grep the whole repo:
grep -rn "<cron-name>" --include="*.md" --include="*.sh" --include="*.py".
Historical migration notes may keep the name intentionally — leave those.docs/DOCS-INDEX.md
entries or the pre-commit DOCS AUDIT warns.Then verify: fix-cron-duplicates.py (arrays in sync) → bash -n /
py_compile on changed scripts → adversarial gate
(adversarial-verify.py --file <f> --level A2 --gate) → commit →
cortex-update.sh (deploy) → re-acquire governance lock (deploy purges
locks) → push → cronjob action='run' on remaining crons (refreshes
scheduler last_status — manual runs don't) → doctor clean.
cortex-update.sh, the running cron picks up
the new script on its next tick — and your governance lock is gone;
re-acquire before further repo work.references/fixer-reconciliation-2026-08-08.md — full case study: the
two-fixer overlap, stale-job-id blindness, zombie detection, and the
end-to-end retirement of agent-apply-fixes (all touchpoints + evidence).