Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/hmj1026/dhpknpx agentmods add skills/hmj1026/dhpk/dhpk-opsx-post-observationWrote 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/hmj1026/dhpk/dhpk-opsx-post-observation)<a href="https://agentmods.dev/skills/hmj1026/dhpk/dhpk-opsx-post-observation"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/dhpk-opsx-post-observation/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/hmj1026/dhpk/dhpk-opsx-post-observation"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/dhpk-opsx-post-observation.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.00148 | $0.01175 |
| Opus 5 | $0.00074 | $0.00588 |
| Sonnet 5 | $0.00030 | $0.00235 |
| Haiku 4.5 | $0.00015 | $0.00118 |
Grade A, and why
dhpk-opsx-post-observation 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 7d 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 — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.
opsx-post-obs
Non-blocking background observer for opsx-apply-resume Save Phase — the POST
overlaps Steps 4–6 and the caller collects its result before the handoff write
(it is not truly fire-and-forget: the obs_id feeds the handoff frontmatter).
Called with compact-save output fields; posts an observation to the claude-mem worker without blocking the main Save Phase flow.
When NOT to Use
- Loading Resume Phase context → use
dhpk-opsx-load-context - Generating a
/goalcondition for a fresh session → usedhpk-opsx-apply-goal - Outside Save Phase Step 3b (do not post observations mid-implementation)
Inputs
| Variable | Source | Description |
|---|---|---|
title |
L0 from extract-compact | One-liner session headline |
content |
Concatenation of compact fields | session_goal + in_progress[].task + key_decisions[].decision + reason + failed_approaches[].lesson;各欄位以 \n 分隔,組成單一字串 |
concepts |
Caller provides | Array: [<change_id>, <stage>, <wave>, "opsx-apply-resume"] — stage 和 wave 從 L0 解析(見下方 Notes) |
Notes:從 L0 解析 stage / wave
L0 格式範例:Phase 7 Stage S9c.8.8 Wave C: saveReceipt_new record_mo support
stage= 正則抓取Stage (S[\w.]+)→ 小寫化加前綴,例如stage-s9c.8.8wave= 正則抓取Wave ([A-Z])→ 小寫化加前綴,例如wave-c- 解析失敗時省略 stage / wave,保留
[<change_id>, "opsx-apply-resume"](見 Guardrails)
Step 1 — Build payload JSON
Compose a JSON object:
{
"title": "<title>",
"content": "<content — multi-line OK, use \\n>",
"concepts": ["<change_id>", "<stage>", "<wave>", "opsx-apply-resume"]
}
contentmust be a single JSON string. Join all parts with\n.conceptsarray values: lowercase, no spaces. If stage/wave cannot be parsed, omit them (keep at least change_id and "opsx-apply-resume").
Step 2 — Write to temp file
Generate a timestamp:
TS=$(date +%Y%m%d-%H%M%S)
OBS_PAYLOAD_FILE="/tmp/claude-mem-obs-${TS}.json"
OBS_RESULT_FILE="/tmp/claude-mem-obs-${TS}-result.txt"
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.
- 7d ago First seen · 103 lines · 148 tokens per session scan A 4ca5fc8a5ac2
dhpk-opsx-post-observation is a skill published in the GitHub repository hmj1026/dhpk (2 stars, last pushed today), licensed MIT. It adds 148 tokens to every session and 1,175 once invoked, about $0.0007 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-09-05.
Other skills, from other repositories
handoff
A session-closing checklist for recording work and confirming that a project is ready to continue later.
event-review
A weekly review process for event logs and leftover task records, turning repeated problems or useful lessons into proposed memory, knowledge, or skill entries.
lessons
An error and lessons journal for a project. It shows recent mistakes, whether they were addressed, and lessons saved for future work.
resume
A project-resumption workflow for picking up work after a break. It checks that the project’s safeguards are active, compares the current state with the previous session, and rebuilds the working context.
last30Days
Resolve "last30Days" to a concrete ISO date range relative to your run time — a rolling 30-day window ending today. Returns inclusive civil dates plus exact UTC instants so you have temporal context without computing dates by hand. Read-only: no writes, no network. Use before a "last 30 days" / trailing-month task…
alive:session-history
Revive sessions (quick or heavy), browse, and search — 'what happened recently?', 'find the session where we discussed X', 'revive yesterday's session'. For single-session recall and multi-session browsing. If the human needs to merge multiple sessions into one working context or detect conflicts between parallel…