active/ag-ledger/SKILL.md
Record, sync, and query local agent activity ledger entries.
npx skillsauth add kevinslin/skills ag-ledgerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Track agent activity as append-only JSON lines and query prior entries without
editing historical records. Prefer the bundled sync workflow for Codex
conversations so activity tracking happens through a recurring automation rather
than per-conversation AGENTS injection.
ag-ledger sync from the skill
directory or by absolute script path.sync scan recent Codex rollout transcripts, derive deterministic
session start, notable change, and session end entries, and persist
state so unchanged files are skipped on later runs.append or append-current only for explicit ad hoc entries or
non-Codex workflows.Recommended automation cadence:
Recommended automation command:
/Users/kevinlin/code/skills/active/ag-ledger/scripts/ag-ledger sync
Run from the skill directory or place scripts/ on PATH.
# sync recent Codex conversations into the ledger
ag-ledger sync
ag-ledger sync --lookback-minutes 180
ag-ledger sync --session-root ~/.codex/sessions
ag-ledger sync --state-file ~/.llm/ag-ledger/state/sync-state.json
# append entry (manual session id)
ag-ledger append <session-id> "<message>"
ag-ledger apppend <session-id> "<message>"
ag-ledger append <session-id> --invoked-skill ag-learn --mode review --parent-session-id <parent-session-id> "<message>"
# append entry using current Codex thread (CODEX_THREAD_ID)
ag-ledger append-current "<message>"
ag-ledger appendc "<message>"
ag-ledger append-current --invoked-skill ag-learn --mode review "<message>"
# print current Codex session id (CODEX_THREAD_ID)
ag-ledger session-id
# filter entries
ag-ledger filter --session <session-id>
ag-ledger filter --workspace <workspace-abs-path>
ag-ledger filter --invoked-skill ag-learn
ag-ledger filter --mode review
ag-ledger filter --parent-session-id <parent-session-id>
ag-ledger filter --from YYYY-MM-DD
ag-ledger filter --from "YYYY-MM-DD HH:MM"
ag-ledger filter --from "YYYY-MM-DD HH:MM" --to "YYYY-MM-DD HH:MM"
# legacy compatibility command
ag-ledger init
ag-ledger init is deprecated. It no longer edits AGENTS.md; it prints a
migration note that points callers to the automation-first sync workflow.
$META_LEDGER_ROOT (default ~/.llm/ag-ledger)$META_LEDGER_ROOT/data$META_LEDGER_ROOT/state/sync-state.jsonledger-YYYY-MM-DD.mdManual entries use the existing shape:
{"time":"YYYY-MM-DD HH:MM","workspace":"/abs/path","session":"session-id","msg":"task summary"}
Sync-derived entries add source metadata so rows can be traced back to a rollout file:
{
"time":"YYYY-MM-DD HH:MM",
"workspace":"/abs/path",
"session":"session-id",
"msg":"session start: inspect current ag-ledger behavior",
"entry_kind":"session_start",
"source_key":"/abs/rollout.jsonl:42:session_start",
"source_path":"/abs/rollout.jsonl",
"source_line":42,
"source_phase":"commentary",
"source_role":"assistant",
"source_turn_index":1
}
Optional structured fields supported on manual entries and sync-derived rows:
invoked_skill: canonical skill name when the entry is part of a specific skill workflowinvoked_skills: ordered list of skill names when a transcript turn names more than oneinvocation_trigger: heuristic classification such as explicit, implicit, required-by-repo, or catalog-onlymode: execution mode such as review, code, or applyparent_session_id: parent/fork/root session id for subagent lineagesync fills invoked_skill and invoked_skills when a transcript message explicitly
names known skills, and also sets invocation_trigger so review tooling can filter
structured data instead of parsing prose.
sync defaults to a 24-hour lookback window.sync reads rollout transcripts from $CODEX_HOME/sessions when CODEX_HOME
is set, otherwise ~/.codex/sessions.sync skips unchanged rollout files by file fingerprint and re-checks changed
files without duplicating existing ledger rows.development
Generate incremental Slack digests for channels, topics, and categories.
testing
Audit an OpenClaw maturity-scorecard surface into an evidence-backed component score report. Use when given a surface from an OpenClaw maturity-scorecard.md and asked to score coverage, quality, readiness, or generate a detailed surface report plus per-component subreports.
tools
Turn an existing concrete spec into a reusable generic spec template. Use when asked to create a generic spec, template spec, reusable implementation template, or generalized version of a spec from a specific implementation such as one plugin, channel, integration, feature, or PR.
data-ai
Trace how something works with an investigator subagent and a skeptical reviewer subagent.