clams
Installation
SKILL.md
Skill Directory
All scripts/ paths in this skill are relative to the directory containing this SKILL.md file. Before running any script, resolve the absolute path to this skill's directory first. For example, if this file is at ~/.claude/skills/clams/SKILL.md, then scripts are at ~/.claude/skills/clams/scripts/.
Rules
- Before running your first
clamscommand in a session, source the user's shell profile to ensure PATH is set:source ~/.zshenv 2>/dev/null; source ~/.bashrc 2>/dev/null. Only needed once per session. - Always read the relevant reference file before running a command. Do not guess flags or syntax — check the reference first
- Use
--machine --format jsonfor commands whose output you need to parse or pipe to a script - Use
--format plainwhen the user wants to see report output in the terminal — display the CLI output directly, do not reformat it - Processing order: sync →
clams rates sync→clams journals process→ reports - Default report formats: use
--format plainfor display reports (balance sheet, balance history, portfolio summary) and--format csv --output <path>for data reports (capital gains, journal entries). Only generate PDF when the user explicitly asks for it. - For PDF reports (only when requested): pipe JSON through
<skill-dir>/scripts/render-<report>.sh --pdf <path>. Requiresweasyprint. - Never summarize or reformat amounts from CLI output — use render scripts,
--format plain, or--format csvto let the CLI format them - Never perform arithmetic on financial values. Do not sum, subtract, average, or derive new numbers from CLI output — only display values that Clams itself has calculated and formatted
- There is no
clams reports exportcommand — PDF and CSV are produced as described above - On errors: read the error JSON (
codeandmessagefields) before diagnosing — do not guess the cause. If the error isn't clear, retry the command with--debugfor more detailed output