Kr analyst report fetch
Skill ray5273/kr-research-kit/skills/kr-analyst-report-fetch
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.From its SKILL.md
npx -y skills add ray5273/kr-research-kit --skill kr-analyst-report-fetchAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.1 KB, as published. Nobody here has run it
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.json
Optional flags: --max-reports N (default 0 = all), --cache-dir PATH,
--no-cache, --verbose, --python3 <bin> (override the Python
executable).