/analyst-kit:analyst-kit-corefrom analyst-kit
Shared runtime for Analyst Kit skills: manages the ~/.analyst-kit data home, config store, local usage analytics, telemetry, update checks, and a per-user learnings log. Auto-loaded as a dependency of every other Analyst Kit skill.
Ships in analyst-kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Every Analyst Kit skill depends on this one. Skills run the Preamble block at start and the
Completion block at end (both injected by scripts/sync-preamble.js in the source
repo); this file documents the machinery behind those blocks, and is what you should
read when the user explicitly asks about Analyst Kit setup, config, telemetry, updates, usage,
or learnings.
~/.analyst-kit/ data homeDefault per-user location for everything Analyst Kit persists. Resolution order:
explicit $AK_HOME → the ~/.analyst-kit/home-path pointer (written when the user relocates
their data during onboarding) → ~/.analyst-kit. ~/.analyst-kit always remains as a fixed bootstrap
that holds the core-path / home-path pointers even after the data is relocated:
| Path | Purpose |
|---|---|
config | key=value settings (analyst-kit-config get/set/list) |
.env | API keys (FMP_API_KEY=...), chmod 600, shared across projects |
device-id | stable anonymous id, created only for community telemetry |
analytics/skill-usage.jsonl | local usage log: start/end events with outcome + duration |
analytics/.pending-* | open-session markers; stale ones finalize as CRASH |
sessions/ | per-agent-session dedupe markers (one prompt round per session) |
learnings.jsonl | per-user learnings log (patterns / pitfalls / preferences) |
last-update-check, update-snoozed | update-check cache (1 day) and snooze (7 days) |
.onboarded, .telemetry-prompted, .env-prompted-<KEY> | once-ever prompt markers |
disabled | skill names turned off because a required API key is missing/declined |
core-path | (bootstrap) cached location of this skill on disk |
home-path | (bootstrap) absolute path to the relocated data home, if the user moved it |
install-manifest.jsonl | what analyst-kit install installed (drives guided upgrades) |
bin/)analyst-kit-config get <key> | set <key> <value> | list — config store. Defaults:
telemetry=off, update_check=true. Optional: posthog_key, posthog_host.analyst-kit-preamble --skill <name> [--env K1,K2] — echoes DEDUP, AK_VERSION,
TELEMETRY, TEL_PROMPTED, ONBOARDED, MISSING_KEYS (+ per-key
KEY_PROMPTED_*), UPGRADE, LEARNINGS, then logs the start event.analyst-kit-log start|end --skill <name> [--outcome <O>] — appends local JSONL events and,
when telemetry is on, fires the remote event in the background.analyst-kit-update-check [--force | --snooze <version>] — prints
UPGRADE_AVAILABLE <local> <remote> or nothing. Max one network fetch per day,
curl --max-time 3.analyst-kit-learn add '<one-line-json>' | recent [--skill S] [--topic T] [--limit N] —
learnings log.analyst-kit-setup status | home <dir> | set-key <K> <V> | skip-key <K> | disable <skill> | enable <skill> | reconcile | ack-telemetry | finish
— onboarding + setup backend. status reports the data home, which installed skills need
which API keys, and each skill's enable/disable state; home relocates the ~/.analyst-kit data
home (migrating data + writing the home-path pointer); set-key writes a key (and
re-enables any now-complete skill); skip-key records a decline (and disables the skills
that need that key); disable/enable toggle a skill; reconcile enables every skill
whose keys are all present and disables the rest; finish writes the onboarding +
telemetry markers. Non-interactive by design — the agent drives the conversation and
calls these to persist. _analyst-kit-home.sh (sourced by every script) resolves the data home;
references/api-keys.tsv maps each key to a description + signup URL; the full setup
playbook the agent follows lives in references/intro.md.All scripts are defensive: they never exit non-zero from the skill's point of view, never block on the network, and a total failure of this runtime must never stop a skill from doing its actual job.
When the user asks to set up Analyst Kit (e.g. "set up analyst-kit", "help me set up Analyst Kit",
"configure all skills"), Read references/intro.md and follow it — it walks the data
home, the telemetry notice, and every installed skill's API keys in one pass. (A
single skill's preamble, by contrast, only handles that one skill's key on demand — the
lazy path.)
A skill whose required key the user doesn't provide is disabled: its name is recorded
in ~/.analyst-kit/disabled, its preamble then echoes DISABLED: yes, and the agent must refuse
to run it and point the user at "set up analyst-kit" (or simply accept the key, which re-enables it
via analyst-kit-setup set-key). This is a soft disable — channel-agnostic and reversible, with
no file surgery on installed skills — so it behaves identically across the plugin,
installer, and codex channels (the install-time routing table still lists the skill; the
runtime preamble is what gates it).
Local analytics/skill-usage.jsonl is always written — it is the user's own machine
and powers crash detection and usage review. The remote leg (PostHog) is gated by
analyst-kit-config get telemetry:
community (default) — {skill, version, outcome, duration_s, platform} plus a
stable random device-id so usage counts deduplicate.anonymous — same event, no identifier of any kind.off — nothing leaves the machine.Telemetry is on by default with explicit opt-out. Remote events never include repo names, file paths, tickers, file content, or API keys. The local log records a sanitized repo slug for the user's own reference; it is never uploaded.
When the user asks to opt out: make a sincere case once before changing anything —
telemetry is what tells the maintainers which skills break, which run slow, and where
users get stuck, so keeping it on directly improves their own experience, and it never
contains their data. Offer anonymous as a middle ground. If they still want out, run
analyst-kit-config set telemetry off immediately and respect the decision — never re-litigate
it in later sessions.
Every skill ends its Completion block with one outcome:
DONE | DONE_WITH_CONCERNS | ERROR | ABORT | NEEDS_CONTEXT.
Report the same status to the user honestly — DONE_WITH_CONCERNS lists the concerns.
Log with analyst-kit-learn add only durable discoveries that would save 5+ minutes in a
future session: a data-source quirk, a per-user preference, a pitfall that produced a
wrong number. Types: pattern (reusable approach), pitfall (what not to do),
preference (user stated). Include "ticker" or "topic" when the learning is
scoped, "confidence" 1–10 (user-stated preference = 10; verified observation = 8–9;
inference = 4–5), and an ISO-8601 "ts". Never log obvious facts, one-time transient
errors, or anything secret. The preamble surfaces recent relevant entries — treat them
as ground truth about this user unless contradicted in-session.
The preamble surfaces UPGRADE_AVAILABLE <old> <new> at most once per day, snoozed
7 days on decline. The guided flow lives in references/upgrade.md (plugin channel →
/plugin marketplace update; installer channel → fetch GitHub tarball, re-run
node bin/analyst-kit.js install for everything in install-manifest.jsonl).
VERSION (opens in a new tab)bin/_analyst-kit-home.sh (opens in a new tab)bin/analyst-kit-config (opens in a new tab)bin/analyst-kit-learn (opens in a new tab)bin/analyst-kit-log (opens in a new tab)bin/analyst-kit-preamble (opens in a new tab)bin/analyst-kit-session-hook (opens in a new tab)bin/analyst-kit-setup (opens in a new tab)bin/analyst-kit-update-check (opens in a new tab)references/api-keys.tsv (opens in a new tab)references/intro.md (opens in a new tab)references/upgrade.md (opens in a new tab)templates/epilogue.md.tmpl (opens in a new tab)templates/preamble.md.tmpl (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
analyst-kit, shared-runtime, configuration, telemetry, learnings
npx claudepluginhub mohitjandwani/analyst-kit --plugin analyst-kit18 skills in this plugin
/13f-analysisFetch and read U.S. institutional 13F-HR filings (quarterly long-equity holdings) for any fund manager from SEC EDGAR — free, no API key. Resolve a fund to its filing entity (CIK), pull the latest or a historical quarter's holdings as a ranked CSV with values normalized to whole dollars and positions rolled up by issuer, and interpret them without the common traps. Triggers: "get the 13F for X", "latest 13F holdings of Y", "what does <fund> own", "pull <manager>'s 13F", "find the CIK for <fund>", "who filed this 13F", "13F analysis of Z".
/analyst-playbookHow to structure any financial analysis before fetching a single number: decide the deliverable (report/deck vs financial-model update), align fiscal calendars and data frequencies, normalize units, route each data series to the right skill, and apply sector-specific conventions (reporting calendars, KPIs, seasonality, valuation norms) from per-sector playbooks loaded on demand. Triggers: "how should I structure this analysis", "compare X and Y", "analyze <company> properly", "what matters for this sector", "which metrics should I use for X", "build an analysis plan for Y".
/analyzing-financial-statementsCalculate and interpret key financial ratios from financial statement data (income statement, balance sheet, cash flow, market data) for investment analysis — profitability (ROE, ROA, margins), liquidity (current/quick/cash), leverage (debt-to-equity, interest coverage), efficiency (asset/inventory/ receivables turnover), valuation (P/E, P/B, P/S, EV/EBITDA, PEG), and per-share metrics, with industry-standard interpretation and benchmarking. Pure-stdlib Python, fully offline — no API key. Triggers: "calculate financial ratios for X", "what's the P/E / ROE / debt-to-equity of Y", "analyze the liquidity / leverage / profitability of Z", "interpret these financial statements", "ratio analysis on this balance sheet", "is this company's margin / coverage healthy", "benchmark <company>'s ratios".
/chartingBuild financially-correct charts from company fundamentals — pick the right chart for the question, normalise units (one unit per axis, $B/$M scaling, %-vs-$ dual axes, rebasing for comparisons), and apply finance conventions (green beat / red miss, accounting negatives, dashed estimates, dark totals). A thin Python+Polars layer normalises already-available data into a chart contract; a TypeScript layer emits Highcharts options and renders a self-contained HTML page. Covers revenue trends & YoY, segment mix, margins, dividends, earnings surprise, estimate-vs-reported, revenue→net-income waterfalls, and price (candlestick/Stock). Use whenever the user wants to chart, plot, graph, or visualize financial data. Triggers: "chart revenue over time", "plot YoY growth with event flags", "revenue breakdown by segment", "dividend history and yield", "earnings surprise chart", "estimate vs reported", "waterfall from revenue to net income", "margins over time", "candlestick / price chart", "compare two companies' revenue", "show visual breakdown of income statement"
/company-universe-managerOwn a watchlist ("universe") of companies and everything time-based about them. Maintain the roster (add / update / soft-delete / reactivate / list with metadata, competitors, rationale) and track each company's key dates — earnings, investor days, ex-dividend, AGMs, conferences, guidance, lockups. Run a daily monitor that re-fetches dates and detects what changed (earnings moved, newly announced, confirmed-from-estimated, dropped), and produce a daily brief (key-date changes, upcoming calendar, news + 8-K material events) as markdown or a branded PDF. Storage is pluggable behind one contract: a local folder (~/company-universe) or a connected server (e.g. Google Sheets over MCP). Triggers: "add company to my universe / watchlist", "list my companies", "when does X report earnings", "track earnings / ex-dividend dates for Y", "what changed in earnings dates", "any investor days coming up", "run the daily universe monitor", "daily brief / report for my watchlist", "schedule the daily check", "upcoming key dates for my companies".
/company-wikiBuild a comprehensive, multi-page company research wiki as a deployed web application. Use for: researching any publicly listed company from any region (US, Europe, Japan, Taiwan, India, or other) and producing a structured wiki covering company overview/history, individual product pages (sourced from earnings calls and investor presentations), 5-year financials, analyst reports, stock price and technical analysis, financial modelling with growth scenarios and forward P/E and P/S multiples, competitor comparison, and a sourced citations page. The wiki is built with React + Tailwind using the webdev tools and deployed on Manus hosting. Triggers: 'build a company wiki for X', 'research wiki on Y', 'make a company research site for Z', 'deep research wiki for <ticker>'.Other plugins' skills for the same job