本文へ移動
cccskills
無料GitHub で公開

research-observability

Add file-based observability, tracing, and run analysis to LLM/agent experiments — per-turn transcripts, tool calls and results, reasoning traces, token/cost accounting, per-episode artifacts, plus terminal viewers and a run-comparison report. Platform-agnostic: one small adapter covers OpenAI, Gemini/Vertex, Anthropic, LiteLLM, Tinker, vLLM, or any custom inference stack, and the same tooling then works unchanged. Use this skill whenever the user wants observability, tracing, logging, or run tracking for model experiments; asks why an agent failed a task or wants to replay/debug/diff an episode; wants to compare models, arms, or ablations; wants to instrument a new folder, repo, or platform ("add observability here", "do the same for Tinker/Gemini/OpenAI"); wants to import or tie in existing experiment results so old runs show up alongside new ones; or wants eval runner scripts where many models share one protocol. Reach for this even when they only say "log what the model is doing", "I can't tell what happened in this run", or "set up traces for this experiment".

インストール方法を見る

含まれるファイル(14)

  • SKILL.md7.5 KB
  • assets/_common_eval.sh4.7 KB
  • references/data-model.md8.2 KB
  • references/integration.md8.7 KB
  • references/platforms.md11.1 KB
  • references/reference-implementation.md4.4 KB
  • references/runner-scripts.md4.9 KB
  • references/viewers.md6.5 KB
  • scripts/obs_adapters.py17.8 KB
  • scripts/obs_import.py8.1 KB
  • scripts/obs_report.py6.7 KB
  • scripts/obs.py25.7 KB
  • scripts/view_trace_tui.py23.7 KB
  • scripts/view_trace.py12.2 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Research observability

Experiments you cannot replay are experiments you have to rerun. This skill installs a small, file-based observability layer over any LLM/agent experiment and the tools to read it: every generation, every tool call and result, every reasoning trace, every reward — on disk as plain JSONL, greppable, diffable, and re-gradable months later.

The design bet: the recording format is fixed and platform-independent, so adding a platform is writing one ~15-line normalizer, not re-plumbing observability. LiteLLM, OpenAI, Gemini, Anthropic, Tinker and a bespoke inference server all produce identical files, and every viewer, report and diff downstream works with no further changes.

Start here

Adding observability to a project. Follow references/integration.md end to end — it is a seven-step procedure, starting with a survey of the repo (which platform, where the generations happen, where results go today) and ending with the existing runs imported so old and new sit in the same viewer. Do the survey before writing code; the answers determine every later choice.

A platform not yet wired. references/platforms.md has working recipes for OpenAI, Gemini/Vertex, Anthropic, LiteLLM, Tinker, and vLLM/self-hosted, plus the 15-line template for anything else and the framework-level patterns (subclass the model class, or use the callback API).

Understanding or extending the format. references/data-model.md is the contract: the directory layout, every field, both sequence counters and why there are two, and the concurrency rules.

Reading and comparing runs. references/viewers.md covers the three tools, the diffing recipe, plotting, and how to add domain-specific panels without changing the trace format.

Eval scripts across many models. references/runner-scripts.md — one shared runner holds the protocol, each model gets a ten-line script. Template in assets/_common_eval.sh.

Seeing it at full scale. references/reference-implementation.md maps the tau2-bench system this was generalized from, with the details worth stealing verbatim.

What gets installed

Copy from scripts/ into the project (vendor them — research code always wants project-specific events, and a file you can edit beats a dependency):

filerole
obs.pythe core. Run + the logging surface. No provider imports, no domain knowledge
obs_adapters.pyper-platform normalizers and Observed* client wrappers
view_trace.pyone-shot dump: pipe it, grep it, diff two arms, --follow a live run
view_trace_tui.pyinteractive curses viewer: run list → session list → conversation, with notes
obs_report.pycross-run comparison table with ± standard error
obs_import.pybackfill existing results into the format so old runs show up too

The shape of an instrumented run

from obs import Run
from obs_adapters import ObservedLiteLLM, log_tool_results

run = Run("eval", config=run_config, root="runs",
          run_name=f"eval-{stamp}-{model_slug}")
llm = ObservedLiteLLM(run, role="agent")      # or ObservedOpenAI/Gemini/Anthropic

for task in tasks:
    with run.session(task=task.id, trial=k):
        run.system_prompt("agent", policy)
        while not done:
            resp = llm.completion(model=AGENT_MODEL, messages=msgs, tools=tools)
            results = execute_tools(resp)
            log_tool_results(run, results, requestor="agent")
        run.episode_done(reward=reward)
        run.artifact(episode, reward=reward)
run.close()

Then:

python view_trace.py --task task_007      # what happened
python view_trace_tui.py                  # read it properly
python obs_report.py --run runs/arm-a runs/arm-b   # did the arm actually win

Principles that make this worth doing

Log every speaker, not just the agent. The user simulator, the LLM judge, the summarizer, the retrieval model — each under its own role. An episode whose grade came from an unlogged judge cannot be debugged, only re-run. This is the single most common reason a trace stops explaining an outcome.

Tool results are part of the conversation. Tools run between generations, so results never pass through a sample call. Emit them as they arrive, so the trace reads turn → result → turn. A trace where the agent calls tools into a void cannot explain what it did next.

One config dict, printed and written. Build it once, print it to the log, hand it to Run. Then the log and the run folder can never disagree about what was run — and a field you did not record is a comparison you cannot make.

Retries and recoveries are events. Truncation retries, duplicate-call resamples, context overflows, cache misses. Each changes the sampled distribution; unlogged, they make a run irreproducible in a way nobody notices.

Keep token ids when the platform gives them. They make a training run auditable — the tokens the policy was updated on are the tokens in the file — and let you recompute logprobs offline. Hosted APIs cannot give you this.

Report variance, not just means. obs_report.py prints ± standard error and whether a two-arm gap clears 2·sem. On a 26-task benchmark a 0.04 reward difference is almost always noise, and the table should say so before you write it up.

Default it on. Export the echo and threshold env vars from the runner scripts. Observability that requires remembering to enable it is observability you do not have.

Environment knobs

Prefix defaults to OBS; pass Run(..., env_prefix="MYPROJ") to adopt a project's existing convention.

vardefaulteffect
<P>_ECHOfulllive per-turn stdout trace: full / preview / off
<P>_PREVIEW_CHARS240truncation width for previews
<P>_TOOL_REPEAT_WARN3emit tool_call_repeat at N identical calls
<P>_TOOL_TOTAL_WARN15emit tool_call_flood past N calls in a session
OBS_NOTES_DIR.obs_noteswhere the TUI's persistent notes live
OBS_EXPORTS_DIRexportswhere E writes session exports

Related

For Tinker specifically — training, inference, hyperparameters, LoRA, checkpointing, pricing — use the tinker-training-inference skill alongside this one. That skill runs the loop; this one records it.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Analyze tau2-bench task export files to identify exactly where and why tasks failed. Map failures to specific conversation rounds, show root causes, check whether relevant documentation was available, and cite sources. Use this skill whenever you need to debug a tau2-bench evaluation, understand why an agent made wrong decisions, identify missing knowledge, or review task performance—especially when context length, eligibility criteria, or policy compliance might be at fault.

日本語の概要は準備中です。原文の説明を表示しています。

Leanmcp/gateway-skills2,1122026年10月8日 更新

How to develop, modify, and extend the Claude Code codebase following its established programming style, patterns, and conventions. Use this skill whenever working on the claude-code source — adding tools, commands, utils, components, types, hooks, services, or fixing bugs. Also use when the user asks about claude-code architecture, coding standards, file organization, or wants to understand how the codebase works. This skill ensures all contributions match the existing codebase style exactly.

日本語の概要は準備中です。原文の説明を表示しています。

Leanmcp/gateway-skills2,1122026年10月8日 更新

Generate a complete, beginner-friendly explanation of an entire code repository as a set of markdown files. Maps the repo structure with `treecap` (installing it if missing), studies the actual source, then writes a `CODE_EXPLANATION/` folder containing an `OVERVIEW.md` plus numbered deep-dive files (01_architecture.md, 02_models.md, ...) that explain how the code is built, what it does, and how the pieces fit together — illustrated with real code excerpts. Use this skill whenever the user wants to understand, document, onboard onto, or get a walkthrough of a codebase: phrases like "explain this repo", "explain the code", "code explanation", "walk me through this codebase", "help me understand how this is built", "document the architecture", or "what does this project do" — even if they don't say the word "skill". Prefer this over ad-hoc summaries whenever the goal is a durable, written explanation of a whole repo.

日本語の概要は準備中です。原文の説明を表示しています。

Leanmcp/gateway-skills2,1122026年10月8日 更新

Run inference on Fireworks AI — direct, through the Leanmcp AI Gateway proxy (aigateway.leanmcp.com) for observability, or via LiteLLM / the OpenAI SDK / raw HTTP. Covers the endpoint-and-key matrix for each route, serverless vs dedicated deployments and their cold starts, browsing and filtering the model catalogue, reasoning models that return content:null with the answer in reasoning_content, function calling, concurrency and load testing, and runner scripts where many models share one protocol with a --use-proxy toggle. Use this skill whenever the user mentions Fireworks, FIREWORKS_API_KEY, api.fireworks.ai, fireworks_ai/ model ids, accounts/fireworks/models/..., a Fireworks deployment id, the Leanmcp gateway or LEANMCP_API_KEY, app.leanmcp.com observability, or gpt-oss / kimi / glm / qwen / deepseek served on Fireworks; wants to route LLM calls through a proxy for logging or cost tracking; is debugging empty responses, 404s, scope errors, cold starts, or "the gateway isn't working"; wants to pick a Fireworks model with tool calling; or wants to sweep several models over one benchmark. Reach for it even on vague asks like "why is this model returning nothing" or "set up inference for these models" when Fireworks is in play.

日本語の概要は準備中です。原文の説明を表示しています。

Leanmcp/gateway-skills2,1122026年10月8日 更新

Build, run, debug and ship 3D city games in Godot 4 — procedurally generated cities (block grids, districts, weighted building typologies, MultiMesh batching, facade shaders, terrain, day/night, landmarks), first-person controllers, headless verification, Blender-generated .glb assets, rigged character and animation packs, real OpenStreetMap-derived cities, WebAssembly export, and cloud GPU streaming on GCP. Use this skill whenever the work involves Godot or a .gd/.tscn/.gdshader/project.godot file; whenever someone wants to start, set up, clone onto a new machine, or stand up a 3D game or city generator; whenever they mention procedural city, city generator, block grid, building typology, MultiMesh, facade shader, terrain heightmap, navmesh, Godot export templates, export presets, headless Godot, .glb pipeline, Blender asset generation, character rigs or borrowed animations; and whenever they want to deploy or share a game — web export, SharedArrayBuffer/COOP/COEP, Selkies, pixel streaming, GPU VM, or "let people play this without installing anything." Reach for it even on vague asks like "get this running", "why is my city slow", "my model faces backwards", "make it work on a cloud machine", or "set this up somewhere else too" when a Godot 3D project is in play.

日本語の概要は準備中です。原文の説明を表示しています。

Leanmcp/gateway-skills2,1122026年10月8日 更新

Scaffold a native iOS app (SwiftUI, no dependencies) from nothing, run it in the Simulator, and archive + upload it to TestFlight entirely from the command line. Bundles working scripts for icon generation, simulator run, and signed upload via the App Store Connect API. Use this whenever the user wants to build, run, ship, or debug an iOS/iPhone/iPad app, mentions Xcode, SwiftUI, .xcodeproj, xcodebuild, simctl, provisioning, code signing, App Store Connect, TestFlight, archiving, or "get this on my phone" — and also when an existing iOS build is failing on icons, signing, teams, destinations, or duplicate build numbers.

日本語の概要は準備中です。原文の説明を表示しています。

Leanmcp/gateway-skills2,1122026年10月8日 更新

Leanmcp のスキルをすべて見る

このスキルの問題を報告する