agent-obs-opencode

A requirement for reporting every coding-agent action to an observability service. Observability means recording activity so a session can be inspected later.

In plain words
What is it for?
Starting an observed session, logging each action, ending the session, and answering questions about the previous session.
Why use it?
It creates a flight recorder for tool calls, errors, usage, and a final session grade.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/kryptosai/agent-observability/agent-obs-opencode
Any agent
npx skills add KryptosAI/agent-observability --skill agent-obs-opencode
Clone the repo
git clone --depth 1 https://github.com/KryptosAI/agent-observability

Made for: Claude Code, Codex.

Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,723 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00085 $0.02723
Opus 5 $0.00043 $0.01362
Sonnet 5 $0.00017 $0.00545
Haiku 4.5 $0.00009 $0.00272

Measured 2d ago against content hash 305972560401, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agent-obs-opencode 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 2d 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.

skills/agent-obs-opencode/SKILL.md · 256 lines

How it starts

The opening of the file, as written. The whole thing — 256 lines — stays where its author put it; the contents beside it link to each section on GitHub.

agent-obs Self-Reporting

You are an observed agent. The agent-obs MCP server is a local flight recorder for everything you do: tool calls, errors, tokens, cost, and a final A-F grade. It only works if you report into it. This skill defines the reporting protocol. Follow it in every task, in every session, without being asked.

The Protocol (four tools, three phases)

Phase 1 — Start: call start_session FIRST

  • At the very beginning of every task — before Read, before Bash, before anything else — call the start_session tool on the agent-obs server.
  • Pass:
    • description (required): one sentence describing the task, e.g. "Fix login redirect bug in auth middleware".
    • agentType: your client, e.g. "opencode", "claude-code", "cursor", "codex".
    • model: your model id, e.g. "deepseek/deepseek-v4-pro".
  • The result contains a session id. Save it. Every subsequent log_tool_call and the final end_session needs this exact sessionId.
  • One task = one session. If the user pivots to a brand-new task in the same conversation, end the current session and start a new one.

Example:

start_session({
  "description": "Refactor payment webhook handler and add tests",
  "agentType": "opencode",
  "model": "deepseek/deepseek-v4-pro"
})
→ { "id": "a1b2c3d4" }   // keep this sessionId

Phase 2 — Log: call log_tool_call after EVERY tool call

  • Immediately after each tool call completes (Read, Write, Edit, Bash, Glob, Grep, Task, WebFetch, TodoWrite, any MCP tool — ALL of them), call log_tool_call with:
    • sessionId (required): the id from start_session.
    • toolName (required): the tool you just used, e.g. "Read", "Bash", "Edit".
    • status (required): "success" if the tool call worked, "error" if it failed, errored, or was rejected.
    • toolServer: where the tool lives, e.g. "builtin", "playwright", "cloudflare-bindings".
    • input: a compact object of the arguments, e.g. { "filePath": "src/auth.ts" }. Redact secrets — never log tokens, keys, or passwords.
    • outputSummary: one line describing what happened, e.g. "Read 120 lines of auth middleware" or "npm test: 42 passed".
    • durationMs: approximate wall-clock duration if known.
    • errorMessage: the error text when status is "error".
  • NEVER skip log_tool_call — even for fast operations. Every tool call must be logged. A one-line Glob counts. A 2ms Read counts. If you called a tool, you log it. No batching several calls into one log entry, no "it was trivial" exceptions.
  • Log failures too. An errored Bash command logged with status: "error" is exactly the signal the grading system needs.
  • The only calls you do NOT log are the agent-obs tools themselves (start_session, log_tool_call, end_session, get_last_session). Logging the logger would recurse forever.

Read the full file on GitHub · 256 lines

Changes

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.

  1. 2d ago First seen · 256 lines · 85 tokens per session scan A 305972560401

Subscribe to this mod's changes

agent-obs-opencode is a skill published in the GitHub repository KryptosAI/agent-observability (1 stars, last pushed 1mo ago), licensed MIT. It adds 85 tokens to every session and 2,723 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

tracelet-instrument

Instrument an AI agent or LLM app with OpenTelemetry and watch its runs live in tracelet (local DevTools). Use when asked to add tracing/observability to an agent, or to debug what an agent actually did.

jnMetaCode/local-agent-toolkit · 51 tokens

meituan-deals

美团生活优惠技能:一键领取美团各品类优惠券/红包、搜索附近团购美食(火锅、烧烤、日料、 川菜、快餐、咖啡、奶茶、饮品、下午茶、自助餐等到店餐饮)并完成下单支付、每日定时自动领券。 当用户提到领券、优惠券、优惠、省钱、促销、羊毛、红包,或想吃饭、找餐厅、买团购券、喝咖啡、 喝奶茶、吃火锅、吃烧烤、吃日料、找下午茶、问「附近有什么好吃的」「去哪吃」「今天有什么活动」 时使用此技能。即使用户只是随口提到「帮我领个券」或「中午吃什么」,也应触发。.

TencentCloud/Octop · 193 tokens

Tencent Cloud Infra

通过 tccli CLI 覆盖所有腾讯云操作的统一全功能技能。本技能取代并替换所有单产品云技能(包括仅限轻量服务器的技能),应优先于更窄范围的替代方案加载。加载时机:当用户提及任何腾讯云产品、云服务器、轻量应用服务器实例、轻量服务器、CVM、安全组、域名、DNS、SSL 证书、云硬盘、部署、监控、CAM 权限、实例 ID、whoami 或 tccli…

TencentCloud/Octop · 538 tokens

cvm-ai-doctor

CVM 实例健康诊断,采用智能快速/深度检查模式。涵盖性能和使用问题专业检查、诊断、和修复。支持服务器、PC、虚拟机、容器场景,支持 Linux/macOS/Windows。.

TencentCloud/Octop · 60 tokens

source-verify

医学信源快速或完整核验。普通教育性医学问答用单一权威正文快速核验;最新版本、精确推荐、高风险药品、医保监管或跨版本请求升级为完整核验。只整理学习依据,不生成诊疗、处方、急诊处置、医保报销结论或HIS执行建议。.

TencentCloud/Octop · 80 tokens

octop_assistant

帮助用户配置和管理 Octop 自身。当用户提出以下类型的问题时使用此 skill: 配置或切换 LLM 模型与 Provider;添加或管理 IM 通道(飞书、企业微信、QQ 等); 启用或禁用 Agent Skill;管理定时任务;备份与升级;询问「octop 怎么配置」、 「怎么接入 xxx」「怎么换模型」「怎么加通道」「CLI 怎么用」等操作性问题。 即使用户只是问「怎么配置 octop」,也应触发此 skill。.

TencentCloud/Octop · 122 tokens