.claude/skills/meta-skill/SKILL.md
| name | description | argument-hint | |------|-------------|---------------| | convert-skills-to-prompts | Convert all Claude Code skills into MCP prompt functions | (none) | Convert every skill in `.claude/skills/` into a Python MCP prompt function, producing a single output file `prompts.py` with one `@daloopa_mcp.prompt` function per skill. **This is a conversion task, not a rewrite.** The analytical logic, calculations, data requirements, and output structure of each skill must be preserv
npx skillsauth add daloopa/investing .claude/skills/meta-skillInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
| name | description | argument-hint | |------|-------------|---------------| | convert-skills-to-prompts | Convert all Claude Code skills into MCP prompt functions | (none) |
Convert every skill in .claude/skills/ into a Python MCP prompt function, producing a single output file prompts.py with one @daloopa_mcp.prompt function per skill.
This is a conversion task, not a rewrite. The analytical logic, calculations, data requirements, and output structure of each skill must be preserved exactly. What changes is the execution context: from Claude Code (file system, local scripts, MCP tools) to MCP prompt (MCP tools only, no file system, no local scripts).
Read these files first — you need them all loaded before you start converting:
Shared references:
.claude/skills/data-access.md — data access patterns, tool signatures, citation rules.claude/skills/design-system.md — formatting, analytical voice, HTML template, color paletteEvery skill file:
.claude/skills/*/SKILL.md — read all of themNote the full skill list from the directory listing. Some skills may reference other skills (e.g., /initiate calls /research-note + /build-model, /update references prior output). Capture these dependencies.
Before converting any skill, analyze data-access.md and design-system.md to build a dependency map. Each skill uses different parts of these files.
Identify these sections and what each provides:
| Section | Content | MCP Prompt Relevance |
|---------|---------|---------------------|
| Section 1: Daloopa MCP Tools | Tool signatures: discover_companies, discover_company_series, get_company_fundamentals, search_documents | ALWAYS INLINE — every skill needs these |
| Section 1: API Script Fallback | python recipes/company_fundamentals.py etc. | ALWAYS DROP — no file system in MCP prompt context |
| Section 2: External Market Data | Stock quotes, trading multiples, historical prices, peer multiples, risk-free rate | CONDITIONAL — only inline for skills that use market data |
| Section 2: Market Data Resolution Order | MCP → infra scripts → web search → defaults | ALWAYS INLINE — preserve the full 4-step resolution order (MCP tools → infra scripts → web search → defaults) |
| Section 3: Consensus Estimates | Consensus revenue/EPS, forward estimates, revisions, price targets | CONDITIONAL — only inline if the skill doesn't already handle consensus in its own steps |
| Section 4: Citation Requirements | Daloopa citation format, fundamental_id linking, document citations | ALWAYS INLINE — mandatory for all skills |
| Section 5: Infrastructure Tools | market_data.py, chart_generator.py, projection_engine.py, excel_builder.py, docx_renderer.py, etc. | ALWAYS DROP — not available in MCP prompt context |
| Section | Content | MCP Prompt Relevance |
|---------|---------|---------------------|
| Number Formatting | $X.Xbn, 42.3%, 8.5x, etc. | ALWAYS INLINE — all skills output financial data |
| Analytical Density | Three-layer convention (data + context + implication) | ALWAYS INLINE — defines output quality |
| Table Conventions | Columns = periods, rows = metrics, grouping rules | ALWAYS INLINE — all skills produce tables |
| Commentary Blocks | Post-table interpretation requirement | ALWAYS INLINE — all analytical skills |
| Analyst's Perspective | Critical voice, red flags, conviction, signal vs noise | INLINE FOR ANALYTICAL SKILLS — not needed for /setup or pure data-export skills |
| Color Palette | Hex codes for charts and HTML | INLINE FOR HTML SKILLS — needed for the 11 analytical HTML report skills |
| Chart Styling | Chart types, grid lines, labels | DROP — chart_generator.py not available in MCP context |
| Output Formats | .html, .docx, .xlsx, .pdf mapping | DROP — MCP prompts don't write files |
| Typography | Font sizes, header styling | INLINE FOR HTML SKILLS — needed for styled HTML output |
| HTML Report Template | Full CSS template (~100 lines) | INLINE FOR HTML SKILLS — the 11 analytical skills produce HTML, so they need the full template |
For EACH skill, follow this process:
Read the skill's SKILL.md. Classify it:
For this specific skill, determine:
Does it use market data? (Look for: stock price, multiples, EV/EBITDA, P/E, beta, WACC, peer multiples, historical prices)
Does it use consensus estimates? (Look for: consensus, Street expectations, beat/miss, forward estimates, estimate revisions)
Does it use search_documents? (Look for: SEC filings, qualitative research, risk factors, management commentary)
Does it reference infra scripts? (Look for: chart_generator.py, projection_engine.py, excel_builder.py, docx_renderer.py, comp_builder.py, deck_renderer.py, market_data.py)
Does it produce HTML output? (Look for: "Save to reports/*.html", "HTML report template", "design-system.md CSS")
Does it reference other skills? (Look for: /research-note, /build-model, or similar cross-references)
The original skills produce files (.html, .docx, .xlsx, .pdf). MCP prompts return text to a client. For each skill type:
HTML report skills (including ib-deck, supply-chain): The prompt should instruct the LLM to produce the analysis as a complete, self-contained HTML document using the design-system.md CSS template. Inline the full HTML template in the prompt so the LLM produces styled HTML matching the original skill's output format.
CRITICAL anti-hallucination guard: The _HTML_TEMPLATE block (or equivalent section in each HTML skill prompt) MUST include an explicit instruction telling the LLM to NOT generate React/JSX components, MCP wrapper code, or JavaScript applications that programmatically call MCP endpoints. The LLM sometimes hallucinates a React app that imports useState/useEffect and defines const DALOOPA_MCP = "https://mcp.daloopa.com/..." instead of actually calling the tools and producing the HTML report. The prompt must explicitly forbid this and state that the LLM must call the MCP tools itself and return the final HTML with real data embedded.
Excel skills (.xlsx): Instruct the LLM to produce a React artifact with SheetJS that builds and downloads the file in-browser (see "Excel Output via Artifacts" in Step 2d).
Word skills (.docx): Produce the full analytical content as structured text/markdown — binary rendering still requires the infra scripts or a capable client.
When a skill references infra scripts, adapt as follows:
| Original Reference | MCP Prompt Adaptation |
|---|---|
| python infra/chart_generator.py ... | Drop chart generation. Keep the data and analysis that would feed the chart. Describe what chart would be produced (type, axes, data series) so the client can render if capable. |
| python infra/projection_engine.py ... | Inline the projection logic as instructions. The skill should describe HOW to project (growth rates, assumptions, methodology) rather than calling a script. The LLM does the math. |
| python infra/market_data.py ... | Replace with the full market data resolution order: MCP tools → python infra/market_data.py fallback → web search → defaults |
| python infra/excel_builder.py ... | Instruct the LLM to build a React artifact using SheetJS that constructs the .xlsx in-browser with a download button. See "Excel Output via Artifacts" below. |
| python infra/docx_renderer.py ... | Produce the document content as structured text/markdown. Note that .docx rendering requires the project repo or a client that supports document generation. |
| python infra/comp_builder.py ... | Same as excel_builder — React artifact with SheetJS. See "Excel Output via Artifacts" below. |
| python infra/deck_renderer.py ... | Produce the deck content as structured sections/slides. |
| Save to reports/{TICKER}_xxx.html | Replace with "Present as a complete, self-contained HTML document using the design-system template" |
| Save context JSON to reports/.tmp/ | Drop — no file system |
For skills that originally produce .xlsx files (build-model, comp-sheet, and the Excel portion of initiate/update), the prompt should instruct the LLM to create a React artifact that:
import * as XLSX from "xlsx") — the npm package is "xlsx", NOT "sheetjs"XLSX.writeFile() or URL.createObjectURL() — both are blocked in the artifact sandbox)The download handler must use this pattern:
const wbout = XLSX.write(wb, { bookType: "xlsx", type: "base64" });
const a = document.createElement("a");
a.href = "data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64," + wbout;
a.download = "file.xlsx";
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
The prompt should include the sheet structure (tab names, what goes in each tab, column layout) from the original skill so the LLM knows exactly what to build.
Example pattern to include in the prompt:
When presenting the Excel model, create a React artifact that:
- Uses SheetJS (`import * as XLSX from "xlsx"`) to build the workbook — the package is "xlsx", NOT "sheetjs"
- Creates these sheets: [list from original skill]
- Each sheet should have: headers in row 1, data starting row 2, number-formatted columns
- Include a "Download .xlsx" button using the base64 + data URI method (NEVER use XLSX.writeFile() or URL.createObjectURL())
- Download code: `const wbout = XLSX.write(wb, { bookType: "xlsx", type: "base64" }); const a = document.createElement("a"); a.href = "data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64," + wbout; a.download = "file.xlsx"; document.body.appendChild(a); a.click(); document.body.removeChild(a);`
- Show an interactive preview of the key sheets as HTML tables above the download button
- All Daloopa-sourced values should include hyperlink citations in the spreadsheet cells where SheetJS supports it
This gives users the same .xlsx deliverable as the Claude Code skill, just built client-side instead of via infra scripts.
For skills that orchestrate others (like /initiate = /research-note + /build-model):
For /update which references prior output:
For each skill, produce a Python function following this template:
@daloopa_mcp.prompt
def skill_name(ticker: str) -> str:
"""Display Name"""
return f"""[PROMPT CONTENT]
"""
The docstring is used as the display name in MCP clients (e.g., Claude). Without it, bull_bear renders as "Bull bear" — the docstring overrides this to show "Bull / Bear" instead. Use proper title case and formatting:
| Function | Docstring |
|----------|-----------|
| earnings | """Earnings""" |
| earnings_flash | """Earnings Flash""" |
| earnings_prep | """Earnings Prep""" |
| tearsheet | """Tearsheet""" |
| industry | """Industry""" |
| bull_bear | """Bull / Bear""" |
| guidance_tracker | """Guidance Tracker""" |
| inflection | """Inflection""" |
| capital_allocation | """Capital Allocation""" |
| dcf | """DCF""" |
| comps | """Comps""" |
| precedent_transactions | """Precedent Transactions""" |
| supply_chain | """Supply Chain""" |
| research_note | """Research Note""" |
| build_model | """Build Model""" |
| comp_sheet | """Comp Sheet""" |
| ib_deck | """IB Deck""" |
| initiate | """Initiate""" |
Every prompt should have these sections in order:
1. TASK STATEMENT
- What to build, for which company ({ticker})
- One sentence, mirrors the skill's description
2. DATA ACCESS (inlined from data-access.md, filtered per Step 2b)
- Daloopa MCP tool signatures (always)
- Market data instructions (if needed)
- Citation requirements (always)
3. FORMATTING CONVENTIONS (inlined from design-system.md, filtered per Step 2b)
- Number formatting (always)
- Analytical density (always for analytical skills)
- Table conventions (always)
- Commentary blocks (always for analytical skills)
- Analyst's perspective (for analytical skills)
4. ANALYSIS STEPS
- The skill's core steps, preserved exactly
- Infra script references adapted per Step 2d
- File save instructions replaced with "present as response"
5. OUTPUT SPECIFICATION
- What the response should contain (mirrors the skill's output section)
- Adapted for text response vs. file output
- "Data sourced from Daloopa" footer
Create prompts.py with:
# Auto-generated MCP prompt functions from .claude/skills/
# Source: https://github.com/daloopa/investing
#
# Each function returns a prompt string that instructs an LLM to perform
# the same analysis as the corresponding Claude Code skill, using only
# Daloopa MCP tools (no file system, no infra scripts).
#
# Skills converted: [list them]
# Shared references inlined: data-access.md, design-system.md
# Date: [today]
from app.daloopa_mcp import daloopa_mcp
# --- Prompt functions below ---
Then one function per skill, in this order:
Skip /setup — it's an interactive setup wizard for Claude Code auth, not an analytical skill. Note in a comment why it was skipped.
Skip /update — it requires prior context JSON from the file system and re-renders .docx/.xlsx using infra scripts. Not portable to MCP prompt context. Note in a comment why it was skipped.
After generating prompts.py, review each function:
ticker: str, but /industry takes multiple tickers. Check each skill's argument-hint.If any check fails, fix the function before moving on.
After running this skill, you'll have prompts.py with all prompt functions. A few things to be aware of:
/initiate and /update inline their sub-workflows. If you later change /research-note or /build-model, you'll need to regenerate the composite prompts.development
Cash conversion cycle, earnings quality, and working capital deep-dive
testing
Refresh existing research note and Excel model with latest data
tools
Bottoms-up unit economics decomposition for any public company
tools
Quick one-page company overview and snapshot