Skip to content
Skill

Portfolio ledger

Reads positions, exposure and P&L from an append-only trading ledger with chain checks

Portfolio ledger is an open-source agent skill for finance and payments. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
93
Last commit
License
AGPL-3.0
Listing updated

Similar skills

About Portfolio ledger

This skill sets up rules for how an agent reads a hash-chained, append-only portfolio ledger. Reads go through named portfolio tools for event history, current exposure and realised and unrealised P&L, rather than querying the underlying sqlite file directly. The skill names two roles: a journal owner who handles reports and reconciliation, and a risk reader who uses exposure and P&L for limit decisions.

After a restart, the agent is instructed to verify the chain first: sequence numbers must be contiguous and each previous-hash link must match. If verification fails, reads stop until the ledger is repaired from the last good snapshot. Event kinds are limited to an enumerated snake_case set, and the agent may only write journal notes and escalations through the journal append and event emit paths.

The skill expects an existing ledger and the named portfolio tools to be available. It describes JSONL exports as derived views for reports and audits, with the chain remaining the source of truth. It has no bundled scripts and references companion skills for folder layout and report rendering.

When your agent uses it

Read positions, exposure, and P&L from the append-only ledger with restart reconciliation and JSONL export, owned by JOURNAL with RISK reading.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (3 KB) on GitHub on 5 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

Copy the skill folder to ~/.claude/skills/portfolio-ledger to use it in all your projects:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/swcstudiospace/PumpGrok.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/portfolio-ledger &&
cp -R "$tmp/skills/portfolio-ledger" ~/.claude/skills/portfolio-ledger &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/portfolio-ledger inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/portfolio-ledger to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/swcstudiospace/PumpGrok.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/portfolio-ledger &&
cp -R "$tmp/skills/portfolio-ledger" ~/.agents/skills/portfolio-ledger &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/portfolio-ledger inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/portfolio-ledger to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/swcstudiospace/PumpGrok.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/portfolio-ledger &&
cp -R "$tmp/skills/portfolio-ledger" ~/.cursor/skills/portfolio-ledger &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/portfolio-ledger inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/swcstudiospace/PumpGrok.git --path skills/portfolio-ledger

Or copy the folder to ~/.gemini/skills/portfolio-ledger yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/portfolio-ledger:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/swcstudiospace/PumpGrok.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/portfolio-ledger &&
cp -R "$tmp/skills/portfolio-ledger" ~/.copilot/skills/portfolio-ledger &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/portfolio-ledger inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/swcstudiospace/PumpGrok.git

Then copy PumpGrok/skills/portfolio-ledger into your agent's skills folder as portfolio-ledger. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Tool-based ledger reads
Directs the agent to fetch event history, exposure and P&L through named portfolio tools instead of raw database access.
Hash chain verification
Checks sequence continuity and previous-hash links after restarts before any numbers are served.
Event kind enforcement
Restricts filtering and writing to the enumerated ledger event kinds and limits which roles may append them.
JSONL snapshot export
Covers versioned JSONL exports for reports and audits, treated as derived views of the chain.
Failure handling table
Lists common faults such as chain gaps, direct database reads and invented event kinds with the expected response.

Good for

  • Reconcile the portfolio ledger after a service restart
  • Report current exposure across open positions
  • Calculate realised and unrealised P&L from ledger events
  • Export ledger history to JSONL for an audit
  • Filter ledger events by kind and ticket

Portfolio ledger FAQ

What does the skill need to run?

It relies on the portfolio tools portfolio.ledger_read, portfolio.exposure and portfolio.pnl being available, and on an existing append-only ledger to read from.

Does Portfolio ledger change anything in the ledger?

Writes are limited to journal_note and escalation events through journal.append or desk.event_emit. Other event types are appended only by library code.

What happens if the hash chain fails verification?

The skill says reads stop, and the ledger should be reconciled from the last good snapshot before reporting the issue to the risk role.

Which event kinds are recognised?

The ledger uses order, fill, halt, kill, approval, journal_note and escalation. New kinds are not to be invented and arrive through a reviewed schema change.

How do I install Portfolio ledger in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/portfolio-ledger to use it in all your projects, or to .claude/skills/portfolio-ledger in one project.

Does Portfolio ledger run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Portfolio ledger?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Portfolio ledger?

The closest alternatives to Portfolio ledger are Desk post trade review, Daily report, Portfolio, Desk monitoring and Desk operating model.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from swcstudiospace/PumpGrok

  1. Guides an agent through safe browsing, human hand-off for CAPTCHAs and logins, and session

    • Open source
    • 93 GitHub stars
    • Browser automation
  2. Renders scheduled daily and weekly desk reports from a ledger and delivers them

    • Open source
    • 93 GitHub stars
    • Finance and payments
  3. Checks a trading desk's operator inputs, seat grants and prompt drift before work starts

    • Open source
    • 93 GitHub stars
    • Finance and payments
  4. Enforces a strict single-send checklist for trading bots placing approved paper orders

    • Open source
    • 93 GitHub stars
    • Finance and payments
  5. Standard folder layout and append-only journal rules for PumpGrok bots

    • Open source
    • 93 GitHub stars
    • Developer tools
  6. Fail-closed playbooks that halt, freeze or escalate when a PumpGrok desk fails

    • Open source
    • 93 GitHub stars
    • Developer tools