An equity research skill pack for AI assistants such as ChatGPT, Claude, and Cursor. Give a company name and/or upload financial statement PDFs (e.g. U.S. 10-K / 10-Q, Hong Kong or A-share annual / interim reports).
P0 gates (SKILL.md Step 0A.0): Nothing else runs until (1) report language is en or zh per explicit cues in §0A.1 or the user’s answer to the language question, and (2) when the SEC EDGAR API path applies, the user supplies a real email or explicitly declines — no workspace/, no Phase 1, no company research before that. Do not infer language from chat language alone.
Report language: If the user did not use an explicit phrase from SKILL.md §0A.1, the orchestrator asks the single English/Chinese question and stops until answered. Intermediate JSON and the final report match that language. English output: {Company}_Research_EN.html (header: English name + ticker only). Chinese: {Company}_Research_CN.html.
US SEC API (optional path): For Mode A + US-listed SEC filer, the orchestrator must prompt for email (or accept decline) per SKILL.md Step 0A.2 before research — never assume no email without an explicit user decline.
The workflow collects data, runs financial and industry analysis, and produces one interactive HTML research report with a Sankey revenue flow, a macro-factor waterfall chart, and a Porter Five Forces radar.
Porter score orientation: Porter scores are threat / pressure scores, not attractiveness scores: 1-2 = low threat / green, 3 = mixed / amber, 4-5 = high threat / red. Intense competitive rivalry should score high/red; minimal competition should score low/green.
Repository: github.com/pppop00/Equity-Research-Skill
- Single deliverable (language-specific):
{Company}_Research_CN.html(zh) or{Company}_Research_EN.html(en) — open locally in a browser; light / dark theme toggle included. - Intermediate JSON: financials (
financial_data.json), macro factors withmacro_regime_context(macro_factors.json), news intel,edge_insights.json(Agent 4: one evidence-backed “edge” for the summary), prediction waterfall, Porter analysis,qc_audit_trail.jsonin the standard full workflow after adversarial QC, andfinal_report_data_validation.jsonafter the final data validation pass — easy to audit or pipe into other tools.prediction_waterfall.jsonis the final model source of truth forcompany_specific_adjustment_pct; whencompany_events_detail[]is present it should use the structured raw-to-final bridge fields (raw_impact_pct, timing / overlap / run-rate / probability / realization weights,final_impact_pct,adjustment_reason).qc_audit_trail.jsonmay be absent only in intentionally shortened runs that explicitly skip QC. - Macro + summary depth:
macro_regime_contextties macro narrative to company role and cycle (not a second β table);edge_insights.jsonsupplies the second investment-summary paragraph — both wired inSKILL.mdand the listed agents. - Traceable process: machine-readable contract in
workflow_meta.json+ orchestration inSKILL.md; sub-tasks inagents/; formulas and sector β tables inreferences/.
Note: Final deliverable is either
*_Research_CN.htmlor*_Research_EN.htmlper user choice. Agent instructions may mix English and Chinese; templates are locked separately inagents/report_writer_cn.mdandagents/report_writer_en.md.
Equity-Research-Skill/
├── workflow_meta.json # ★ Machine-readable workflow contract (gates, phase order, packaging profiles)
├── SKILL.md # ★ Start here — main orchestration flow
├── README.md # This file
├── scripts/
│ └── extract_report_template.py # ★ Extract locked HTML fenced block from report_writer_*.md (Phase 5)
│ └── validate_workflow_meta.py # Validate workflow_meta.json schema
├── tests/
│ └── test_extract_report_template.py # CN/EN extraction + CLI + SHA256 snapshot tests
│ └── test_workflow_meta.py # workflow_meta contract validation
├── agents/
│ ├── report_writer_cn.md # ★ Locked Chinese HTML template
│ ├── report_writer_en.md # ★ Locked English HTML template (same structure)
│ ├── final_report_data_validator.md # Final professional data validation before delivery validation
│ ├── report_validator.md # HTML structure / delivery checklist (runs after data audit)
│ ├── financial_data_collector.md
│ ├── macro_scanner.md
│ ├── news_researcher.md
│ ├── edge_insight_writer.md # Non-obvious filing-backed insight → edge_insights.json
│ ├── qc_macro_peer_a.md / qc_macro_peer_b.md # Adversarial QC on macro & prediction
│ ├── qc_porter_peer_a.md / qc_porter_peer_b.md # Adversarial QC on Porter
│ └── qc_resolution_merge.md # Merge QC challenges → updated JSON + qc_audit_trail.json
├── references/
│ ├── prediction_factors.md # Macro model: φ, β, formulas, sector regime / transmission notes
│ ├── porter_framework.md # Porter Five Forces writing guide
│ ├── financial_metrics.md # Metric definitions
│ ├── report_style_guide_cn.md
│ └── report_style_guide_en.md
└── workspace/ # Example run outputs (`{Company}_{Date}/`, HTML + JSON)
Do not change the HTML/CSS/JS skeleton inside
agents/report_writer_cn.mdoragents/report_writer_en.md. Dynamic content is injected only via placeholders; see the rules at the top of each file.
Auditable HTML generation: To reproduce the locked skeleton without copying another company’s finished report, run:
python3 scripts/extract_report_template.py --lang cn --sha256 -o workspace/MyCo_2026-04-08/_locked_cn_skeleton.html
# or: --lang enThen replace {{PLACEHOLDER}} markers only. See SKILL.md Phase 5.
Tests (template extract, Chinese + English):
python3 -m unittest discover -s tests -vValidate workflow contract only:
python3 scripts/validate_workflow_meta.py --meta workflow_meta.jsonIf you change the fenced HTML inside agents/report_writer_*.md, update the expected SHA256 hashes in tests/test_extract_report_template.py.
- Clone (or download ZIP and extract):
git clone https://github.com/pppop00/Equity-Research-Skill.git cd Equity-Research-Skill - Add this repo to your AI session context (folder upload,
@workspace, or open the project locally). - Instruct the model to follow
SKILL.mdstrictly and, in Phase 5, to generate HTML using the locked template inagents/report_writer_cn.mdoragents/report_writer_en.md(match the report language resolved in Step 0A, before Phase 1). - Provide a company name and/or filing PDFs. Suggested output folder:
workspace/{Company}_{Date}/.
- Open the directory containing
SKILL.mdas the workspace, or copy this repo into your project. - Reference the skill in Rules / Skills (e.g. “for equity reports, read and execute
SKILL.md”). You may also copy key points into.cursor/rules. - Example:
@SKILL.md Build a Chinese HTML research report from the 2025 interim PDF I uploaded for company XXX.
- Claude Code: Open the repo as a project; run the multi-agent steps described in
SKILL.md. - Claude.ai: Upload or paste
SKILL.mdplus relevantagents/andreferences/as project knowledge, then ask for phases in order (single thread if you do not use sub-agents).
- Use Advanced Data Analysis (Code Interpreter) or file upload: ZIP
SKILL.md,agents/, andreferences/, or paste the critical sections. - Be explicit: run the full
SKILL.mdpipeline; for the final HTML step, only fill the template inreport_writer_cn.mdorreport_writer_en.mdaccording to the report language — do not rewrite the page structure.
| Mode | Input | Notes |
|---|---|---|
| A | Company name only | More reliance on web research; some numbers are estimates — label confidence clearly. |
| B | Company name + annual-style PDF | Historical periods anchored to the file; forecasts blend macro and company-specific items. |
| C | Company name + multi-period PDFs | Richest factual basis. |
Hong Kong / A-share interim and annual reports also work as file-mode inputs. Validation targets the locked HTML contract.
- Code and docs are licensed under Apache License 2.0 (same as the
LICENSEfile on GitHub). - Reports are model-generated research aids, not investment advice. The prediction block is illustrative / probabilistic — always verify against original filings and regulatory disclosures.
- Issues: Template bugs, drift between
SKILL.mdand agents, or a product that cannot follow the flow — please open an Issue. - Pull requests: Copy improvements, β-table documentation, or best practices for non–U.S. filings are welcome; include a short rationale and how you tested.
To ship the locked template as a single .skill zip bundle, pack this directory according to your client’s skill-install guide and naming conventions.