fecfile
БесплатноЗапускает вложенные скриптыНе проверенAnalyze FEC (Federal Election Commission) campaign finance filings. Use when working with FEC filing IDs, campaign finance data, contributions, disbursements…
Об этом скилле
FEC Filing Analysis
This skill enables analysis of Federal Election Commission campaign finance filings.
Requirements
- uv must be installed
- Python 3.9+
Dependencies are automatically installed when running scripts with uv run.
First-Time Check
The first time this skill is invoked in a session, verify that uv is installed by running:
uv --version
If this command fails or uv is not found, do not proceed. Instead, inform the user that uv is required but not installed, and direct them to the installation guide: https://docs.astral.sh/uv/getting-started/installation/
Quick Start
Always start by checking the filing size:
uv run scripts/fetch_filing.py <FILING_ID> --summary-only
Based on the summary, decide how to proceed—see Handling Large Filings below for filtering and streaming strategies. Small filings can be fetched directly; large filings require pre-filtering or streaming.
Fetching data:
uv run scripts/fetch_filing.py <FILING_ID> # Full filing (small filings only)
uv run scripts/fetch_filing.py <FILING_ID> --schedule A # Only contributions
uv run scripts/fetch_filing.py <FILING_ID> --schedule B # Only disbursements
uv run scripts/fetch_filing.py <FILING_ID> --schedules A,B # Multiple schedules
The fecfile library is installed automatically by uv.
Field Name Policy
IMPORTANT: Do not guess at field names. Before referencing any field names in responses:
- For form-level fields (summary data, cash flow, totals): Read
references/FORMS.md - For itemization fields (contributors, payees, expenditures): Read
references/SCHEDULES.md
These files contain the authoritative field mappings. If a field name isn't documented there, verify it exists in the actual JSON output before using it.
Handling Large Filings
FEC filings vary enormously in size. Small filings (like state party monthly reports) may have only a few dozen itemizations and can be used directly. However, major committees like ActBlue, WinRed, and presidential campaigns can have hundreds of thousands of itemizations in a single filing. Do not dump large filing data directly into the context window. Avoid streaming large filings to stdout.
Checking Size
Before pulling full schedules, use --summary-only to assess the filing:
uv run scripts/fetch_filing.py <ID> --summary-only
The summary includes financial totals that help gauge filing size without parsing itemizations:
| Field | Description |
|---|---|
col_a_individuals_itemized |
Itemized individual contributions (this period) |
col_a_total_contributions |
Total contributions (this period) |
col_a_total_disbursements |
Total disbursements (this period) |
col_b_individuals_itemized |
Itemized individual contributions (year-to-date) |
col_b_total_contributions |
Total contributions (year-to-date) |
col_b_total_disbursements |
Total disbursements (year-to-date) |
These are dollar totals, not item counts, but combined with the committee name they help you decide:
- Small state/local party with modest totals: Probably safe to pull full schedules
- ActBlue, WinRed, or presidential campaign with millions in totals: Use streaming or post-filter
If you need to verify exact counts before processing, stream with an early cutoff:
uv run scripts/fetch_filing.py <ID> --stream --schedule A | python3 -c "
import sys
count = 0
limit = 256
for line in sys.stdin:
count += 1
if count >= limit:
print(f'Schedule A: {limit}+ items (stopped counting)')
sys.exit(0)
print(f'Schedule A: {count} items')
"
If itemization counts are in the hundreds or more, you must post-filter before presenting results. Even smaller filings may benefit from post-filtering to aggregate or focus the output.
Pre-Filtering at Parse Time
Use CLI flags to filter before data is loaded into memory:
| Flag | Effect |
|---|---|
--summary-only |
Only filing summary (no itemizations) |
--schedule A |
Only Schedule A (contributions) |
--schedule B |
Only Schedule B (disbursements) |
--schedule C |
Only Schedule C (loans) |
--schedule D |
Only Schedule D (debts) |
--schedule E |
Only Schedule E (independent expenditures) |
--schedules A,B |
Multiple schedules (comma-separated) |
Schedules you don't request are never parsed.
Post-Filtering with Pandas
Use Python/pandas to aggregate, filter, and limit results:
cat > /tmp/analysis.py << 'EOF'
# /// script
# requires-python = ">=3.9"
# dependencies = ["pandas>=2.3.0"]
# ///
import json, sys
import pandas as pd
data = json.load(sys.stdin)
df = pd.DataFrame(data.get('itemizations', {}).get('Schedule A', []))
# Aggregate and limit output
print(df.groupby('contributor_state')['contribution_amount'].agg(['count', 'sum']).sort_values('sum', ascending=False).to_string())
EOF
uv run scripts/fet
Установить fecfile в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл fecfile?
Analyze FEC (Federal Election Commission) campaign finance filings. Use when working with FEC filing IDs, campaign finance data, contributions, disbursements, or political committee financial reports. Provides the proper workflow for the fec-api MCP tools (search_committees, get_filings).
Как установить скилл fecfile?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл fecfile запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic