$npx -y skills add kansoku-trade/kansoku --skill sec-edgarUS SEC EDGAR filings — list 10-K/10-Q/8-K/Form 4/S-1, fetch filing text, parse insider Form 4 transactions.
| 1 | # sec-edgar |
| 2 | |
| 3 | > Response language: match user input. |
| 4 | |
| 5 | ## When to use |
| 6 | |
| 7 | Trigger phrases: |
| 8 | |
| 9 | - 8-K / 10-K / 10-Q / Form 4 / S-1 / proxy / DEF 14A |
| 10 | - 美股公告 / SEC filing / EDGAR |
| 11 | - insider trading / 内部人交易 / 高管交易 |
| 12 | - 财报原文 / 招股书 / 风险因素 / MD&A |
| 13 | |
| 14 | **Not for**: 13F holdings analysis (this skill lists 13F filings but does not |
| 15 | parse them into holdings — deferred to a future skill). |
| 16 | |
| 17 | ## Workflow |
| 18 | |
| 19 | 1. **List filings**: `filings.py <TICKER>` (optionally `--type 8-K`). |
| 20 | 2. **Read filing text**: pass `primary_doc_url` from the list output to |
| 21 | `filing_text.py`. Use `--max-chars` to cap; `--section item1a` for risk |
| 22 | factors, `--section mda` (Item 7) for MD&A. |
| 23 | 3. **Insider trades**: `insider.py <TICKER>` parses Form 4 XML for the |
| 24 | past --days window. |
| 25 | |
| 26 | Environment auto-loaded; `SEC_USER_AGENT` is mandatory. |
| 27 | |
| 28 | ## CLI examples |
| 29 | |
| 30 | ```bash |
| 31 | # Latest 5 NVDA 8-Ks |
| 32 | python3 .claude/skills/sec-edgar/scripts/filings.py NVDA --type 8-K --limit 5 |
| 33 | |
| 34 | # All recent NVDA filings |
| 35 | python3 .claude/skills/sec-edgar/scripts/filings.py NVDA --limit 20 |
| 36 | |
| 37 | # Read the most recent 8-K (URL from filings.py) |
| 38 | python3 .claude/skills/sec-edgar/scripts/filing_text.py \ |
| 39 | "https://www.sec.gov/Archives/edgar/data/1045810/000104581026000051/nvda-20260520.htm" \ |
| 40 | --max-chars 20000 |
| 41 | |
| 42 | # Pull Item 1A (Risk Factors) from a 10-K |
| 43 | python3 .claude/skills/sec-edgar/scripts/filing_text.py "<10-K URL>" --section item1a |
| 44 | |
| 45 | # Save full text to disk, get metadata only |
| 46 | python3 .claude/skills/sec-edgar/scripts/filing_text.py "<URL>" --save-raw /tmp/nvda-10k.txt |
| 47 | |
| 48 | # Insider transactions, past 90 days |
| 49 | python3 .claude/skills/sec-edgar/scripts/insider.py NVDA --days 90 |
| 50 | |
| 51 | # Insider + amendments |
| 52 | python3 .claude/skills/sec-edgar/scripts/insider.py NVDA --include-amendments |
| 53 | ``` |
| 54 | |
| 55 | ## Section keys (10-K) |
| 56 | |
| 57 | | Key | 10-K section | |
| 58 | | -------------------- | ----------------------------------------------- | |
| 59 | | `item1` / `business` | Item 1. Business | |
| 60 | | `item1a` / `risk` | Item 1A. Risk Factors | |
| 61 | | `item7` / `mda` | Item 7. MD&A | |
| 62 | | `item7a` | Item 7A. Quantitative & Qualitative Disclosures | |
| 63 | | `item8` | Item 8. Financial Statements | |
| 64 | |
| 65 | `meta.confidence` returned: `high` (clean heading match), `medium` (short |
| 66 | slice, may be incomplete), `low` (heuristic fallback — full text returned |
| 67 | with warning). |
| 68 | |
| 69 | ## Output shapes |
| 70 | |
| 71 | `filings.py`: |
| 72 | |
| 73 | ```json |
| 74 | { |
| 75 | "data": [ |
| 76 | { |
| 77 | "accession": "0001045810-26-000051", |
| 78 | "cik": "0001045810", |
| 79 | "form": "8-K", |
| 80 | "filed_date": "2026-05-20", |
| 81 | "primary_doc_url": "https://www.sec.gov/Archives/edgar/data/1045810/...htm", |
| 82 | "primary_doc_name": "nvda-20260520.htm", |
| 83 | "description": "8-K", |
| 84 | "size": 637530, |
| 85 | "is_xbrl": true |
| 86 | } |
| 87 | ], |
| 88 | "meta": { "cik": "0001045810", "name": "NVIDIA CORP", "count_returned": 1 }, |
| 89 | "ok": true |
| 90 | } |
| 91 | ``` |
| 92 | |
| 93 | `insider.py`: |
| 94 | |
| 95 | ```json |
| 96 | { |
| 97 | "data": [ |
| 98 | { |
| 99 | "accession": "...", |
| 100 | "form": "4", |
| 101 | "filed_date": "2026-05-15", |
| 102 | "reporter": "JEN-HSUN HUANG", |
| 103 | "roles": ["officer:CEO", "director"], |
| 104 | "txn_date": "2026-05-13", |
| 105 | "security_title": "Common Stock", |
| 106 | "code": "S", |
| 107 | "shares": 240000, |
| 108 | "price": 412.5, |
| 109 | "acquire_or_dispose": "D", |
| 110 | "post_holdings": 78000000, |
| 111 | "ownership_kind": "D", |
| 112 | "derivative": false, |
| 113 | "footnote_ids": ["F1"], |
| 114 | "footnotes_text": ["Sale pursuant to 10b5-1 plan adopted ..."] |
| 115 | } |
| 116 | ], |
| 117 | "meta": { "cik": "...", "name": "...", "filings_scanned": 12, "txns_parsed": 24 }, |
| 118 | "ok": true |
| 119 | } |
| 120 | ``` |
| 121 | |
| 122 | ## Error handling |
| 123 | |
| 124 | | Exit code | Meaning | LLM action | |
| 125 | | --------- | ---------------------------------------------- | ---------------------------------------------------------------------- | |
| 126 | | 0 | Success | Parse and narrate. | |
| 127 | | 2 | Missing `SEC_USER_AGENT` | Set in `.env` at project root. | |
| 128 | | 3 | HTTP 4xx, ticker not found, or unparseable XML | Read `hint`. Per-filing parse errors collected in `meta.parse_errors`. | |
| 129 | | 4 | Network | Suggest retry. | |
| 130 | |
| 131 | ## Known limitations |
| 132 | |
| 133 | - `insider.py` only scans the `recent` window of submissions (typically last |
| 134 | ~1000 filings); deep history requires `submissions/CIK*-N.json` paging, |
| 135 | not implemented. |
| 136 | - `filing_text.py` uses an HTML-only extractor — XBRL inline tables are |
| 137 | stripped to text, not parsed into structured rows. |
| 138 | - Section slicing is regex-heuristic; trust `meta.confidence`. |
| 139 | - 10 req/s throttle applied globally acr |