kevinslin/agstack/ag-ledger
Claude Code and agent skill by kevinslin/agstack
- community
Checking that the SKILL.md file is still in the repository.
Record, sync, and query local agent activity ledger entries.
Install
npx vskill@latest install kevinslin/agstack/ag-ledgerSKILL.md
AG Ledger
Overview
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.
Recommended Workflow
- Run a recurring automation with
execution_environment = "local"that
executes ag-ledger sync from the skill directory. Sync does not mutate the repository, so do not create a disposable Git worktree for each run.
- Let
syncscan 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.
- Treat the returned
closeout_stateas terminal for that scheduled run:
settled: no missing entries and no failures.live_frontier: entries were appended without failures. Stop and let the
next scheduled run verify the moving frontier; do not loop until zero.
blocked: at least one file or state write failed. The second consecutive
identical blocker fingerprint sets stable_blocked=true.
- If a sandboxed run is blocked only by the shared-ledger write barrier,
request one write-capable retry. Stop after that retry and report its state; do not create a multi-rerun convergence loop.
- Use manual
appendorappend-currentonly for explicit ad hoc entries or
non-Codex workflows.
Recommended automation cadence:
- hourly
Recommended automation command:
CLI Commands
Run from the skill directory or place scripts/ on PATH.
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.
Data Layout
- Root directory:
$META_LEDGER_ROOT(default~/.llm/ag-ledger) - Ledger data directory:
$META_LEDGER_ROOT/data - Sync state file:
$META_LEDGER_ROOT/state/sync-state.json - Daily file:
ledger-YYYY-MM-DD.md - Format: append-only JSONL, local timestamp at minute precision
The sync state includes a closeout record:
Both sync and status print the flattened fields closeout_state, closeout_reason, and stable_blocked. Blocked output also includes blocker_fingerprint and blocker_occurrences.
Manual entries use the existing shape:
Sync-derived entries add source metadata so rows can be traced back to a rollout file:
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 asexplicit,implicit,required-by-repo, orcatalog-onlymode: execution mode such asreview,code, orapplyparent_session_id: parent/fork/root session id for subagent lineage
sync fills invoked_skill and invoked_skills when a transcript message explicitly names known skills using backticks, $skill, a source path, JSON metadata, or plain using / running language. It also sets invocation_trigger so review tooling can filter structured data instead of parsing prose. Sync and status summaries identify themselves with invoked_skill=ag-ledger, mode=sync|status, and invocation_source=ag-ledger-cli.
Notes
syncdefaults to a 24-hour lookback window.syncreads rollout transcripts from$CODEX_HOME/sessionswhenCODEX_HOME
is set, otherwise ~/.codex/sessions.
syncskips unchanged rollout files by file fingerprint and re-checks changed
files without duplicating existing ledger rows.
- Sync uses transcript event timestamps, not sync execution time, when choosing
the target daily ledger file.
- A successful append run is
live_frontier, notsettled. Settlement requires
a later run with zero appended entries and zero failures.
- Stable blocker matching uses normalized failure kind, operation, and storage
scope so changing rollout filenames do not hide a repeated write barrier.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingactive/ag-ledger/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kevinslin/agstack/ag-ledger)