agentleFS
rgoerwitrgoerwit/ai-investment-agent/.claude/skills/analyze-ticker/SKILL.md

analyze-ticker

Skill71 starsChanged 36 days agoMITView on GitHub

Run the equity analysis pipeline on one ticker or a batch. Use when asked to analyse, screen, or re-run a ticker, or to capture an eval baseline. Covers modes, charts, batch runs, and what each flag actually changes.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before blaming a code change for a slow run, check token_usage.by_tier in the saved artifact against a previous run.

    line 46

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Running an analysis

poetry run python -m src.main --ticker 0005.HK --output results/0005.HK.md

Use --output whenever you want charts. Without it output goes to stdout and chart generation is disabled, because relative image paths would not resolve. This is the single most common reason a run "loses" its charts. Saved analyses land in results/, which is operator-local — it fills up as you run the pipeline and a fresh clone has none.

Modes

FlagEffect
--quickscreening tier: one debate round instead of two, cheaper models. 2–6 min
(default)full analysis. Median ~11 min, but the tail runs long — see below
--briefshorter final report
--quietless verbose logging
--verbosefull logging
--no-memoryskip ChromaDB entirely
--strictstricter screening
--trace-langfuseenable tracing for this run
--quick-model / --deep-modeloverride the base-group fast and reasoning models
--imagedirchart output directory, default {output_dir}/images

--quick is a screener, not investment-grade output. A quick-mode BUY is qualified as a candidate for full analysis, and downstream reconciliation treats it as a review rather than an executable action.

Timing, and why a run can take two hours

Full mode is median ~11 minutes with a range from 5 minutes to over two hours. The spread is vendor queueing, not machine speed: the same ticker on the same code has taken 5 and 12 minutes hours apart.

Before blaming a code change for a slow run, check token_usage.by_tier in the saved artifact against a previous run. A degraded flex pool costs time and money — queued calls burn their timeout before falling back, and the fallback bills at the standard rate, so the discount inverts exactly when the queue is worst.

Recommend flex for unattended batches, standard when waiting on a result.

Batch

./scripts/run_tickers.sh --quick
caffeinate -i ./scripts/run_tickers.sh        # prevent sleep on macOS

The batch script reads a ticker list you supply. Use its public command-line and configuration contract when changing pacing or suppressing transport diagnostics; do not copy local environment assignments into this skill.

Eval baselines

poetry run python -m src.main --ticker 0005.HK --quick --capture-baseline
poetry run python -m src.main --capture-baseline-cleanup   # sweep stale inflight dirs

A dirty working tree rejects every capture bundle, so the sequence is always commit, then capture.

When a ticker will not resolve

A confirmed listing migration belongs in the ticker-overrides file — copy config/ticker_overrides.example.json and add the entry there. The override applies on both the analysis side and the broker reconciliation side so the two agree.

--force-data-vacuum pushes past the pre-LLM gate that fires when the company name is unresolved and no source has price, currency, or identity. That usually means a delisted or migrated ticker, so prefer fixing the mapping over forcing the run.

Full history: docs/CODEBASE_MEMORY.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.