Use when adding new error messages to React, or seeing "unknown error code" warnings.
npx skills add FakeHank/stock_qualitative_analysis_skills
Or install specific skill: npx add-skill https://github.com/FakeHank/stock_qualitative_analysis_skills
# Description
Create comprehensive and deeply analyzed buy-side style qualitative stock analysis reports from filings and public sources with strict citations, chapter-by-chapter workflow, and placeholders for missing evidence. Emphasizes active extraction and detailed analysis of SEC information. Use for Chinese qualitative analysis of listed companies.
# SKILL.md
name: stock-qualitative-analysis
description: Create comprehensive and deeply analyzed buy-side style qualitative stock analysis reports from filings and public sources with strict citations, chapter-by-chapter workflow, and placeholders for missing evidence. Emphasizes active extraction and detailed analysis of SEC information. Use for Chinese qualitative analysis of listed companies.
compatibility: Requires Python 3. Network access needed for SEC EDGAR fetches.
metadata:
author: sysyphus
version: "0.1"
Stock Qualitative Analysis Skill
When to use
Use this skill when a user asks for a qualitative stock analysis report (定性分析) that must be evidence-based and formatted as a structured report. This skill emphasizes strict citations and non-hallucination behavior.
Inputs
- Company name (required)
- Ticker / exchange (optional but recommended)
- Market context (US / HK / CN / other)
- Time window (e.g., FY2015–FY2024; latest quarterly)
- Language preference (Chinese default; English if requested)
- Sources:
- User-provided filings (PDF or HTML)
- SEC EDGAR fetch (optional, if allowed)
- Other public sources (only if cited)
Outputs
- A Markdown report following the template structure in
assets/report-template.md - Each section contains:
结论要点 / 详细情况 / 证据与出处(or English equivalents when English output is requested) - Final
来源清单with SEC filings and other sources in reverse-chronological order
Core rules (non-negotiable)
- Do not state facts without a source.
- Any factual claim MUST include a source string; otherwise use a placeholder in
【...】describing what is needed. - Actively analyze sources: Go beyond surface-level summaries. Extract specific details, quantitative data, and contextual insights relevant to each section of the report template.
- Comprehensive filling: Make the best effort to fill all sections of the report template. If information is truly missing from the provided sources, use a specific placeholder indicating what is missing.
- If real-time data is required, explicitly state that the user must verify freshness.
- No investment advice, price targets, or trading recommendations.
- Default output language: Chinese. If the user query is in English, respond in English.
Execution
- Intake: confirm company name, ticker/exchange, market, time window, and allowed data sources.
- Pre-check local data: before any remote fetching, verify whether local filings are sufficient; only fetch remotely if local data is insufficient.
- Acquire sources: use
scripts/build_source_manifest.pyto pull SEC filings and ingest local PDFs. - Extract key 10-K sections (HTML): use
scripts/extract_sec_html_sections.pyto produce per-item text files (e.g., Item 1/1A/7/8) before analysis. - Section-by-section generation (Agent-driven): for each section in
assets/report-template.md, the Agent expands the section in sequence, producing结论要点 / 详细情况 / 证据与出处based on the available sources and citing evidence. - Progressive write-back: before starting summaries, determine whether a local report file exists; after completing each section, write the content into that file.
- Finalization: rewrite
投资要点概览after all sections are complete, then update来源清单.
Usage
- The Agent executes the section loop at runtime based on the template headings.
- The Agent MUST attempt to fill every section using provided sources and mark missing facts with explicit placeholders.
- If the user asks for English output, the Agent translates the template headings and section labels consistently (e.g., Conclusion / Details / Evidence) while preserving the report structure.
Data acquisition
- SEC EDGAR fetch:
scripts/fetch_sec_edgar.py - Local PDF ingestion:
scripts/ingest_local_pdfs.py - Source manifest:
scripts/build_source_manifest.py - HTML section extractor:
scripts/extract_sec_html_sections.py
Citation format
- SEC filings:
Form 10-K/10-Q/20-F/6-K + 年度/日期 + 章节/标题 - Web sources:
机构/网站 + 发布日期 + 标题
Examples
Example request
“参考 SEC filings,帮我做 AAPL 的定性分析,按模板输出。”
Example output shape
Use assets/report-template.md and fill each section with facts + citations. Unknowns become placeholders.
References
- Guardrails and writing style:
references/prompt-guardrails.md - Report template:
assets/report-template.md - Validation checklist:
references/validation-checklist.md - Goldenset examples:
references/goldenset.md
# README.md
Stock Qualitative Analysis Skill
Overview
A skill for producing buy‑side style qualitative stock analysis reports (定性分析) from SEC filings and other public sources. It enforces strict citations, comprehensive section coverage, and explicit placeholders for missing evidence.
Key Features
- Evidence‑first reporting with explicit citations and placeholders
- Section‑by‑section workflow aligned to
assets/report-template.md - English output when the user query is in English
- Modular data acquisition (SEC EDGAR + local PDFs)
- HTML 10‑K section extraction for faster analysis
Requirements
- Python 3
- Network access for SEC EDGAR fetching (optional)
Directory Structure
SKILL.md: Skill definition and execution rulesassets/report-template.md: Report templatereferences/: Guardrails, validation checklist, goldensetscripts/: Data acquisition and extraction utilities
Quick Start
0) Install the skill in your agent
Place the stock-qualitative-analysis/ folder in the skills directory that your agent scans. For Claude Code, Codex, or OpenCode, use the tool’s configured skills path (check its docs/settings) and ensure the folder name matches stock-qualitative-analysis.
1) (Optional) Prepare sources
Local PDFs and SEC filings are both optional. If you already have files, ingest them; otherwise the Agent can fetch data during execution.
If local filings are available, prefer local PDFs first:
python3 scripts/ingest_local_pdfs.py --folder <local_pdf_dir> --out ./cache/source_manifest.json
2) (Optional) Fetch SEC filings
python3 scripts/fetch_sec_edgar.py --ticker AAPL --form 10-K 10-Q --start 2022-01-01 --out ./cache/sec_edgar
Then build a unified manifest:
python3 scripts/build_source_manifest.py --ticker AAPL --forms 10-K 10-Q --start 2022-01-01 --sec-out ./cache/sec_edgar --out ./cache/source_manifest.json
3) Extract 10‑K HTML sections
python3 scripts/extract_sec_html_sections.py --html <path/to/10k.htm> --items 1,1a,7,7a,8 --out-dir ./cache/sections
4) Generate the report (Agent‑driven)
The Agent reads assets/report-template.md and fills each section using available sources and extracted item text. See SKILL.md for the execution rules.
English Output
If the user query is in English, the Agent must generate an English report while preserving the template structure. Section labels should be translated consistently (e.g., Conclusion / Details / Evidence).
Offline Mode
If network access is blocked (SSL/Cloudflare), use local PDFs and HTML files only. The skill supports building a manifest from local files and extracting sections from local HTML.
Troubleshooting
- SSL/Cloudflare blocked: Use local filings or configure
SEC_USER_AGENTwith multiple agents (comma‑separated). Example:
SEC_USER_AGENT="UA1,UA2" python3 scripts/fetch_sec_edgar.py ... - No item sections found: Verify the HTML file contains Item headings or try different items.
Scripts
scripts/fetch_sec_edgar.py: Download SEC iXBRL HTML and XBRL instance filesscripts/ingest_local_pdfs.py: Build a manifest from local PDFsscripts/build_source_manifest.py: Merge SEC and local sources into a manifestscripts/extract_sec_html_sections.py: Extract Item sections from 10‑K HTMLscripts/validate_report.py: Validate required headings in a report
Attribution
This skill is inspired by https://github.com/noho/learning_notes. Many analysis practices, reporting structure, and workflow ideas originate from that repository. Thanks to the author for sharing the foundational notes.
Improvements vs. noho/learning_notes
- Packaged as an Agent Skill with explicit execution rules in
SKILL.md. - Added modular scripts for SEC EDGAR fetching, local PDF ingestion, and manifest building.
- Added HTML Item section extraction to speed up analysis from large 10‑K files.
- Enforced evidence‑first reporting with placeholders and structured citation rules.
- Added offline‑first guidance and clearer troubleshooting steps.
- Added English output behavior when the user query is in English.
Limitations
- The skill does not provide investment advice or price targets.
- Real‑time data requires user verification.
- Section filling depends on available sources; missing data is explicitly marked.
License
Add your license terms here.
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.