kr-analyst-report-fetch
Skill2 starsChanged 8 days agoMITView on GitHub
Download the PDFs referenced by a `kr-analyst-report-discover` index and extract plain text from each via `pypdf`. Writes a dated JSON file with per-report PDF path, extracted text path, page count, and extraction success flag. Skips reports with `requiresAuth: true` or a missing `pdfUrl`. PDFs and `.txt` siblings are cached per `reportId` and are immutable, so re-runs are cheap. Requires Python 3 and `pypdf` (same dependency as `kr-stock-dart-analysis`). Do not use for IR deck downloads or non-PDF sources — this script assumes selectable-text PDFs.
- Installs packages
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- kr-analyst-report-discoverSkill
- kr-analyst-report-insightSkill
- kr-analyst-report-watchSkill
- kr-article-readabilitySkill
- kr-chatgpt-reviewSkill
- kr-daily-market-newsSkill
- kr-earnings-reviewSkill
- kr-finance-slide-claritySkill
- kr-foreign-analystSkill
- kr-market-leadersSkill
- kr-market-sentimentSkill
- kr-naver-bloggerSkill
- kr-naver-blog-publishSkill
- kr-naver-browseSkill
- kr-naver-insightSkill
- kr-order-backlog-analysisSkill
- kr-portfolio-guardSkill
- kr-portfolio-monitorSkill
- kr-research-siteSkill
- kr-sector-analysisSkill
- kr-sector-auditSkill
- kr-sector-compareSkill
- kr-sector-data-packSkill
- kr-sector-planSkill
- kr-sector-updateSkill
- kr-stock-analysisSkill
- kr-stock-chartSkill
- kr-stock-dart-analysisSkill
- kr-stock-data-packSkill
- kr-stock-planSkill
- kr-stock-updateSkill
- kr-strategy-backtestSkill
- kr-trade-flow-analysisSkill
- kr-web-browseSkill
- telegram-report-senderSkill
- us-daily-market-newsSkill
- us-earnings-reviewSkill
- us-sec-analysisSkill
- us-stock-analysisSkill
- us-strategy-backtestSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
After kr-analyst-report-discover has produced an index JSON for a ticker.
- Distinctive: line 23
When an existing discovered index has new rows you want to refresh into the extracted cache.
- Distinctive: line 26
Do not use this skill to:
- Very specific: line 52
Respect cache: if both files exist and --no-cache was not passed, skip the download + extraction for that report.
- Very specific: line 64
Cap runtime: if --max-reports N was passed.
- Distinctive: line 67
Read references/workflow.md for failure-mode details and the cache layout.
- Distinctive: line 69
Read references/output-format.md for the summary JSON schema.
- Very specific: line 82
Never mutate the input index JSON: Write a new file to --output.
- Very specific: line 86
Do not run OCR: If textLength === 0, flag the report in the output and let kr-analyst-report-insight skip its bullet extraction.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Korean Analyst Report Fetch + Extract
Given a kr-analyst-report-discover index JSON, download each report's PDF
and convert it to plain text. Feeds kr-analyst-report-insight, which writes
the final digest.
When To Use
- After
kr-analyst-report-discoverhas produced an index JSON for a ticker. - When an existing discovered index has new rows you want to refresh into the extracted cache.
Do not use this skill to:
- Discover new reports — that's
kr-analyst-report-discover. - Produce a thesis or digest — that's
kr-analyst-report-insight. - Extract text from image-only PDFs —
pypdfonly returns selectable text. Image-heavy reports will come back withtextLength: 0.
Dependencies
- Node.js (stdlib only).
- Python 3 with
pypdf. Install once:python3 -m pip install pypdf kr-web-browse(fordownloadFile).- Reuses the PDF text extractor from
skills/kr-stock-dart-analysis/scripts/extract-pdf-text.pyviachild_process— do not duplicate the script.
Pipeline
- Read the input index JSON from
--input. - Plan downloads: for each report in the index, skip if
requiresAuth: trueorpdfUrlis null. Compute cache paths:- PDF:
<cache-dir>/pdfs/<ticker>/<reportId>.pdf - TXT:
<cache-dir>/pdfs/<ticker>/<reportId>.txt
- PDF:
- Respect cache: if both files exist and
--no-cachewas not passed, skip the download + extraction for that report. - Download each PDF via
kr-web-browse.downloadFile. On HTTP 4xx or content-type mismatch (HTML instead of PDF), markextractionOk: falsewith an error string and move on. - Extract plain text by invoking the Python script:
python3 skills/kr-stock-dart-analysis/scripts/extract-pdf-text.py \ --input <pdf-path> --output <txt-path> - Measure: capture
textLength(bytes) andpages(from the raw extracted string — the Python script already paginates with\n\n). - Cap runtime if
--max-reports Nwas passed. - Write a summary JSON to the
--outputpath.
Read references/workflow.md for failure-mode details and the cache layout. Read references/output-format.md for the summary JSON schema.
Operating Rules
- Never rewrite or compress the extracted text. The
.txtfile is a verbatim rendering of the PDF's selectable text. Downstream skills quote from it directly. - Cache is immutable — same
reportIdshould never trigger a re-fetch unless--no-cacheis set. Analyst reports are dated artifacts; their content does not change after publication. - Respect the 1-second inter-request delay between PDF downloads
(enforced manually here since
downloadFilebypasses the browse binary). - Never mutate the input index JSON. Write a new file to
--output. - Fail per report, not per run. A single broken PDF should not stop
the rest of the batch. Record the error in
reports[i].errorand continue. - Do not run OCR. If
textLength === 0, flag the report in the output and letkr-analyst-report-insightskip its bullet extraction.
Scripts
fetch-reports.js
node skills/kr-analyst-report-fetch/scripts/fetch-reports.js \
--input .tmp/analyst-report-cache/index/066970/2026-04-18.json \
--output .tmp/analyst-report-cache/extracted/066970/2026-04-18.jsonOptional flags: --max-reports N (default 0 = all), --cache-dir PATH,
--no-cache, --verbose, --python3 <bin> (override the Python
executable).
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
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.

