sec-edgar

$npx mdskill add kansoku-trade/kansoku/sec-edgar

List and fetch SEC filings for NVDA, parse risk factors

  • Identify recent NVDA SEC filings including 8-Ks.
  • Use SEC EDGAR API to retrieve filing URLs and extract text.
  • Parse XML for insider trades related to Form 4 filings.
  • Display the most recent 8-K's text with a specified character limit.

SKILL.md

.github/skills/sec-edgarView on GitHub ↗
---
name: sec-edgar
description: US SEC EDGAR filings — list 10-K/10-Q/8-K/Form 4/S-1, fetch filing text, parse insider Form 4 transactions.
---

# sec-edgar

> Response language: match user input.

## When to use

Trigger phrases:

- 8-K / 10-K / 10-Q / Form 4 / S-1 / proxy / DEF 14A
- 美股公告 / SEC filing / EDGAR
- insider trading / 内部人交易 / 高管交易
- 财报原文 / 招股书 / 风险因素 / MD&A

**Not for**: 13F holdings analysis (this skill lists 13F filings but does not
parse them into holdings — deferred to a future skill).

## Workflow

1. **List filings**: `filings.py <TICKER>` (optionally `--type 8-K`).
2. **Read filing text**: pass `primary_doc_url` from the list output to
   `filing_text.py`. Use `--max-chars` to cap; `--section item1a` for risk
   factors, `--section mda` (Item 7) for MD&A.
3. **Insider trades**: `insider.py <TICKER>` parses Form 4 XML for the
   past --days window.

Environment auto-loaded; `SEC_USER_AGENT` is mandatory.

## CLI examples

```bash
# Latest 5 NVDA 8-Ks
python3 .claude/skills/sec-edgar/scripts/filings.py NVDA --type 8-K --limit 5

# All recent NVDA filings
python3 .claude/skills/sec-edgar/scripts/filings.py NVDA --limit 20

# Read the most recent 8-K (URL from filings.py)
python3 .claude/skills/sec-edgar/scripts/filing_text.py \
  "https://www.sec.gov/Archives/edgar/data/1045810/000104581026000051/nvda-20260520.htm" \
  --max-chars 20000

# Pull Item 1A (Risk Factors) from a 10-K
python3 .claude/skills/sec-edgar/scripts/filing_text.py "<10-K URL>" --section item1a

# Save full text to disk, get metadata only
python3 .claude/skills/sec-edgar/scripts/filing_text.py "<URL>" --save-raw /tmp/nvda-10k.txt

# Insider transactions, past 90 days
python3 .claude/skills/sec-edgar/scripts/insider.py NVDA --days 90

# Insider + amendments
python3 .claude/skills/sec-edgar/scripts/insider.py NVDA --include-amendments
```

## Section keys (10-K)

| Key                  | 10-K section                                    |
| -------------------- | ----------------------------------------------- |
| `item1` / `business` | Item 1. Business                                |
| `item1a` / `risk`    | Item 1A. Risk Factors                           |
| `item7` / `mda`      | Item 7. MD&A                                    |
| `item7a`             | Item 7A. Quantitative & Qualitative Disclosures |
| `item8`              | Item 8. Financial Statements                    |

`meta.confidence` returned: `high` (clean heading match), `medium` (short
slice, may be incomplete), `low` (heuristic fallback — full text returned
with warning).

## Output shapes

`filings.py`:

```json
{
  "data": [
    {
      "accession": "0001045810-26-000051",
      "cik": "0001045810",
      "form": "8-K",
      "filed_date": "2026-05-20",
      "primary_doc_url": "https://www.sec.gov/Archives/edgar/data/1045810/...htm",
      "primary_doc_name": "nvda-20260520.htm",
      "description": "8-K",
      "size": 637530,
      "is_xbrl": true
    }
  ],
  "meta": { "cik": "0001045810", "name": "NVIDIA CORP", "count_returned": 1 },
  "ok": true
}
```

`insider.py`:

```json
{
  "data": [
    {
      "accession": "...",
      "form": "4",
      "filed_date": "2026-05-15",
      "reporter": "JEN-HSUN HUANG",
      "roles": ["officer:CEO", "director"],
      "txn_date": "2026-05-13",
      "security_title": "Common Stock",
      "code": "S",
      "shares": 240000,
      "price": 412.5,
      "acquire_or_dispose": "D",
      "post_holdings": 78000000,
      "ownership_kind": "D",
      "derivative": false,
      "footnote_ids": ["F1"],
      "footnotes_text": ["Sale pursuant to 10b5-1 plan adopted ..."]
    }
  ],
  "meta": { "cik": "...", "name": "...", "filings_scanned": 12, "txns_parsed": 24 },
  "ok": true
}
```

## Error handling

| Exit code | Meaning                                        | LLM action                                                             |
| --------- | ---------------------------------------------- | ---------------------------------------------------------------------- |
| 0         | Success                                        | Parse and narrate.                                                     |
| 2         | Missing `SEC_USER_AGENT`                       | Set in `.env` at project root.                                         |
| 3         | HTTP 4xx, ticker not found, or unparseable XML | Read `hint`. Per-filing parse errors collected in `meta.parse_errors`. |
| 4         | Network                                        | Suggest retry.                                                         |

## Known limitations

- `insider.py` only scans the `recent` window of submissions (typically last
  ~1000 filings); deep history requires `submissions/CIK*-N.json` paging,
  not implemented.
- `filing_text.py` uses an HTML-only extractor — XBRL inline tables are
  stripped to text, not parsed into structured rows.
- Section slicing is regex-heuristic; trust `meta.confidence`.
- 10 req/s throttle applied globally across all `*.sec.gov` calls.

## Related skills

- `longbridge-financial-report` for normalised income / balance / cash flow.
- `longbridge-news` for curated equity news (faster than reading 8-Ks).
- `quiver` for congressional trades (distinct from corporate insiders).

More from kansoku-trade/kansoku

SkillDescription
capital-rotationUse when reading today's US-market capital flow across multiple sectors to identify rotation direction — e.g. "今天资金流向", "板块强弱", "rotation map", "卖芯买云", "where is money moving today", "scan flows across sectors". Produces a cross-section snapshot of net inflows by cohort (indices / semis / software-cloud / mega-tech / AI applications), names the dominant narrative, and writes a dated journal file. Different from `market-session-tracker` (intraday live monitoring of a single watchlist) — this is a one-shot end-of-session rotation read.
chart>
fredUS/global macro time series from St. Louis Fed FRED — CPI, GDP, Fed funds, yields, M2, DXY, etc.
gdeltGlobal multilingual news event stream with tone scoring via GDELT 2.0 Doc API.
hithink-a-shareA 股官方数据,来自同花顺(HiThink)官方 API——涨停股票池、连板天梯、龙虎榜、个股异动原因、热榜、A 股官方口径财报(利润表/资产负债表/现金流量表/财务指标)、行情快照与日 K。
intraday-signal>
korea-market>
market-session-trackerUse when monitoring stocks/ETFs/indices across pre-market, open, intraday, or close — especially when the user is reading session action live and may revise their take as it unfolds. Triggers include 盘前/盘中/收盘 sessions, multi-symbol watchlists (e.g. MU/TSM/SMH semi tracking), user observations like "突破"/"冲高"/"回调"/"假突破", capital flow checks, market temperature checks, semi/AI/memory plays, and any request that bundles a position context with a live read.
stock-deep-diveUse when the user asks for an end-to-end orientation on a listed company they don't yet understand, especially when the request combines two or more dimensions in one ask. Triggers on "X 是干什么的", "帮我了解 X", "X 主营 + 同行", "盘前为什么涨", "本周趋势 + 阻力支撑", "X 和其他公司的关系", "first time looking at X", "full brief on X". Skip when the user wants only a single lens — use the targeted Longbridge sub-skill instead.
trade-gate>