Ghost Skills Ghost Skills DOCS
← SITE GITHUB ↗
DEVELOPER DOCUMENTATION

The collective memory, documented.

Everything a developer needs to run Ghost Skills: install, the workflow, every command, how the measurement works, privacy, and the network. The package and CLI are ghost (installed from ghost-memory).

GETTING STARTED

Install & first run

Ghost Skills is a Python CLI. Not on PyPI yet — install from GitHub. It reads the Claude Code history you already have; nothing leaves your machine during ingest or scan.

# with uv (recommended) uv tool install git+https://github.com/mathischarlesgauthier/ghost-memory # or with pip pip install git+https://github.com/mathischarlesgauthier/ghost-memory

$ ghost init

One guided command sets everything up and never crashes on a fresh machine. It checks your PATH, stores your Anthropic API key (opt-in, chmod 600, validated by a free metadata ping), detects Claude Code and your history, then runs a first scan and shows your candidates.

$ ghost init ghost is on your PATH. API key validated and saved (chmod 600). Claude Code history: 29 session(s). First scan… N candidate(s) found.
Every step that's missing prints a fix, never a stack trace. Run ghost doctor anytime for a full health check.
THE WORKFLOW

Three commands. That's the whole thing.

Ghost Skills turns the failures you already lived through into skills your agent reuses. The loop is three commands — the rest is inspection and control.

$ ghost run # ingest history, scan for scars, distill the new candidates $ ghost skills # triage what was distilled — cost, duplicates, status $ ghost deploy # push kept skills into ~/.claude/skills/ (Claude Code loads them)

No hooks are installed. ghost deploy writes plain SKILL.md files that Claude Code discovers natively — nothing is silent.

REFERENCE

Command reference

Every command accepts --db (default ~/.ghost/ghost.db). Commands that take an identifier accept a skill id, a candidate id, or a slug — Ghost resolves it and tells you how.

ghost init
Guided onboarding: PATH, API key, Claude Code detection, first scan. Never crashes on a virgin machine.
ghost doctor
Installation diagnostic. Each ✗ says exactly what to do.
ghost ingest
Ingests ~/.claude/projects/**/*.jsonl into SQLite. Idempotent, streaming. --rebuild re-ingests (refuses if files vanished from disk, so no session is lost silently).
ghost scan
Detects scars: FAILURE_LOOP (failure loops), HUMAN_OVERRIDE (your corrections), REPEATED_SEQUENCE (repeated sequences). Triage status survives re-scans.
ghost show <id>
Dumps a candidate's raw evidence: signature, score, occurrences, raw events with their src_file:src_line.
ghost distill <id>
Candidate → SKILL.md. One LLM call, a Pitfalls section where each pitfall cites the failure that proves it, plus a self-critique. Verdict SKILL or SKIP. Refuses to create a duplicate — --force regenerates and disables the old one.
ghost keep / reject <id>
Approve (deployable) or reject (survives re-scans, never re-proposed) a candidate.
ghost skills
Lists distilled skills: verdict, cost, status, deployment. Flags duplicates (⚠DOUBLON) and disabled skills.
ghost deploy
Pushes kept candidates' skills to ~/.claude/skills/ (global) or the project's .claude/skills/. One skill per candidate (the newest). --dry-run shows without writing.
ghost run
The full loop: ingest → scan → distill new candidates under a spend cap (--budget, default $2; --top, default 10). No auto-deploy — triage stays human.
ghost bench <skill>
Measures lift on synthetic micro-benchmarks — self-contained tasks with a deterministic grader. The baseline without the skill really succeeds, so a lift means something.
ghost validate <skill>
Replays real tasks from your history with/without the skill (when short, self-contained cases exist). Runs cut by budget/timeout are a separate category, never counted as failures.
ghost why
Which skills were injectable at the last prompt, and why (triggered by their description).
ghost disable / enable <id>
Remove a deployed skill (never injected again) / reactivate it.
ghost login / upgrade <tier>
Connect to the network (device flow → Ghost token, never your Anthropic key) / open Stripe Checkout for a paid tier.
ghost publish <skill>
Publish a personal skill to the collective memory. Mandatory fail-closed secret scan (shows what's masked) + a diff of exactly what leaves + explicit confirmation. Private by default; --public enters the lift-ranked registry. Lift is measured after and shows in ghost earnings.
ghost usage
This cycle's consumption: plan, community unlocks used / quota, reset date, progress bar. An unlock = the first time a distinct community skill enters your library; re-using one you already unlocked never re-counts.
ghost unlocked
Community skills unlocked this cycle: slug, author, measured lift (or "not yet measured"), sorted by lift.
ghost earnings
Your revenue-share balance (50% of subscriptions, paid for lift × adoption, €50 threshold): balance, measured impact share, installs generated, average measured lift, distance to threshold, payout status. Honest zero until your skills have measured lift.
ghost account / whoami
One-screen dashboard (plan, usage, earnings, public profile) / quick plan + email.
ghost history
Past payouts: date, amount, status.
ghost payout-setup
Enable payouts — optional, only needed to cash out. Opens a secure browser page; no bank details ever pass through the terminal.
ghost telemetry {status,on,off,preview,send}
Off by default. preview prints the exact payload that would be sent. Only aggregate counts — never code, paths, or prompts.
CONCEPTS

How it works

Two behaviors that look like bugs — the SKIP and "no measurable lift" — are exactly what keeps the tool honest.

1 · Scars

ghost scan reads your ingested history and finds three shapes of scar: failure loops (the agent hit the same error several times before converging — the convergence is the knowledge), human overrides (you corrected it — expensive signal), and repeated sequences (a pattern to capture once). Every candidate keeps a stable link to the raw events, so you can always trace back to the proof.

2 · Distillation

ghost distill sends the redacted trace to an LLM that condenses it into a SKILL.md: when to use it, the procedure, and a Pitfalls section where every pitfall cites the failure that proves it. Nothing invented — if the trace proves nothing non-obvious, nothing is written.

3 · SKIP is a feature

Many candidates return SKIP: what the agent already did well is generic and worthless. A catalog that kept everything would drown you in noise. An honest SKIP beats a hollow skill — the triage is the value.

4 · Lift, measured

A skill only matters if it changes what your agent produces. Ghost measures it instead of assuming it — see below.

MEASUREMENT

Measuring lift

The success criterion is a resolved task (a grader passes), not "a commit was produced". Runs cut by budget or timeout are their own category — never failures. If the with/without distributions overlap, the verdict is "no measurable lift" — a result, not a bug. A skill that always showed positive lift would be broken.

$ ghost bench edit-file-modified-since-read --yes ╭─ NO MEASURABLE LIFT (synthetic) │ success without 3/3 → with 3/3 │ n=1 bench · 6 runs · $0.72 turns without 8 → with 9 (+12%, overlapping)
Why synthetic benches and not only replay? A history may contain no short, self-contained, replayable task (real missions mix network, external tools, prod access). Without a baseline that works, a lift number means nothing. Synthetic benches give an honest baseline — and are labeled as such.
TRUST

Privacy & security

Everything lives in ~/.ghost/ (dir 0700, db 0600). ingest, scan, show, skills, deploy touch nothing on the network. Only distill/validate/bench call the Anthropic API, with your key.

Redaction before any send — fail closed

Before a trace leaves for distillation it passes a fail-closed redactor: when in doubt, mask. Only counts are logged, never values. Over-redaction is accepted by contract; under-redaction is a bug.

# what you have in your trace export DATABASE_KEY=sk-live-abc123 # in /Users/you/app.py # what actually leaves export DATABASE_KEY=<redacted:env_secret> # in ~/app.py # what is logged (counts only) redactions {env_secret: 1, home_path: 1}

Telemetry — off by default

Opt-in only, HTTPS required, strict allowlist. Even enabled, it sends only aggregate command names and error classes — never your code, paths, prompts, or skill contents. ghost telemetry preview prints the exact payload before anything is sent.

THE NETWORK

The collective memory

Your own skills are free forever, on your own key. The paid product is access to the collective memory — ranked by measured lift, never by download count. It's metered in unlocks: the first time a distinct community skill enters your library in the billing period. Re-using a skill you already unlocked never re-counts.

$ ghost login # device flow → Ghost token (not your Anthropic key) $ ghost upgrade pro # opens Stripe Checkout for the tier

Authorizing the CLI — the device flow

ghost login never asks for a password. It prints a short code (like K7Q2-9FMX) and opens ghost-memory.com/device in your browser. Enter the code there, click Authorize this device, and the terminal picks up the token on its own — stored in ~/.ghost/ghost_token (0600), never your Anthropic key. The code expires 10 minutes after you run the command; if it lapses, run ghost login again for a fresh one. ghost whoami confirms the connected account.

Tiers: Free $0 (5 lifetime unlocks to try) · Pro $29/mo (200 unlocks) · Team $95/mo (1,000) · Scale $195/mo (4,000, private registry) — then usage-based overage. Hitting the quota is a clear message, never a crash: your local retrieve and already-unlocked skills keep working.

Account & consumption

Read your real account state — computed from live data, never invented. All of these degrade gracefully offline (last-known state, flagged as possibly stale) and never crash.

$ ghost usage # plan, unlocks used / quota, reset, progress bar $ ghost unlocked # community skills unlocked this cycle, by measured lift $ ghost account # one-screen dashboard · ghost whoami for a quick check

Contribute & earn

On a paid plan you don't just use the collective memory — you earn from it. Publish skills that work and a share of subscription revenue (50%, paid for measured lift × adoption) comes back to you. Publishing runs a mandatory fail-closed secret scan and shows the exact redacted diff before anything leaves; skills are private by default.

$ ghost publish my-skill --public # secret scan + diff + confirm → registry $ ghost earnings # balance, impact share, distance to €50 threshold $ ghost payout-setup # optional, only to cash out — secure browser page
Earnings are honestly €0 until your skills have measured lift — the structure reads real data, the numbers follow the measurement as the network grows. See the earn program.
FAQ

FAQ

ghost: command not found

Installed but not on your PATH (often ~/.local/bin). Run uv tool update-shell and reopen your terminal. ghost init and ghost doctor both detect and explain this.

ghost scan finds no candidates

Almost always the history: empty base (run ghost ingest), no Claude Code history yet, or a history too smooth to have scars. That last one is normal, not a bug.

distill says SKIP / bench says "no lift"

Both are honest results. SKIP means what the agent already did well is generic. "No lift" means that, on a baseline that actually works, the skill doesn't measurably change the outcome — proof the measurement doesn't cheat.

Does my code go over the network?

Not by default — ingest and scan are fully local. Distillation sends redacted traces to the Anthropic API with your key. Telemetry is off by default and never sends code.

← BACK TO SITE GITHUB ↗