/daloopa-investing:meta-skillfrom daloopa-investing
Converts all Claude Code skills in .claude/skills/ into Python MCP prompt functions, producing a single prompts.py file with one @daloopa_mcp.prompt function per skill. Preserves analytical logic and output structure exactly.
Claude never picks this skill on its own
Its frontmatter has no description. Without a description, Claude Code leaves it out of the list Claude chooses from. Typing /daloopa-investing:meta-skill still runs it.
What the skill costs in Claude's context, stage by stage
No description Claude Code can read, so Claude's list leaves it out: only you can start it.
SKILL.md joins the conversation and stays.
| 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 palette.claude/skills/kpi-taxonomy.md — operating KPIs by business model; inline the relevant rows (or the full table) into any prompt whose skill points to it, since MCP prompts cannot read files.claude/skills/modeling-conventions.md — reading the user's model conventions, three-statement linkage (workbook-edit skills only).claude/skills/fix-debug-audit/references/model-checks.md — model integrity checks and difference signatures (workbook-edit skills only)Every 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. The period parameter is calendar_periods, not periods (outdated): emit discover_company_series(company_id, keywords, calendar_periods), get_company_fundamentals(company_id, calendar_periods, series_ids), search_documents(keywords, company_ids, calendar_periods) even if data-access.md still says periods |
| Section 1.8: Expert Call Transcripts | get_expert_call_transcripts(company_id) — firm-gated BlueHeron expert calls: never-block rule, usage, mandatory call-URL citation | CONDITIONAL — the tool row always stays in the Section 1 tool table; inline the Section 1.8 body verbatim as a shared _EXPERT_CALLS block only in prompts whose skill calls get_expert_call_transcripts |
| 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:
infra/workbook_tools.py to read and edit, which has no MCP equivalent. See Step 2c and Step 2d.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)
3b. Does it call get_expert_call_transcripts? (Look for: "Expert call", "expert calls", get_expert_call_transcripts)
_EXPERT_CALLS block (data-access.md Section 1.8) and keep the skill's expert-call step, including its "if unavailable, skip" instruction — the tool is firm-gated, so the prompt must never stop or fail when it's missing_EXPERT_CALLS (the tool row in the tool table stays regardless)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)
Is it a workbook-edit skill? (Look for: ../modeling-conventions.md, references/model-checks.md, infra/workbook_tools.py)
_MODELING_CONVENTIONS block (from modeling-conventions.md, condensed) and the _WORKBOOK_IO block (Step 2c). Inline the model-checks content (the battery and the signature table) only into fix_debug_audit and, condensed to the checks a port verifies, into port_replicate_model_HTML_TEMPLATE, _ANALYTICAL_VOICE, _EXCEL_ARTIFACT — the deliverable is findings and a change list, not a report or a new model_MODELING_CONVENTIONS and _WORKBOOK_IOThe 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.
Delivery requirement (MCP-prompt path only): The _HTML_TEMPLATE block MUST also include a delivery instruction so clients like ChatGPT don't dump raw HTML source into the chat response. This is specific to the MCP-prompt context — the original Claude Code skills write the report to a reports/*.html file, so this concern does not exist there and must NOT be added to design-system.md. The block must instruct the LLM to: (1) NOT paste raw HTML source in the chat response; (2) generate the report as a downloadable .html file artifact and render it in the interface when the client supports it; (3) keep the chat response to a short confirmation, a download link, and an optional one-sentence summary of contents; and (4) write the HTML document to the file/artifact rather than inline as source, showing the rendered view rather than raw HTML when rendering is available.
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.
Workbook-edit skills (port-replicate-model, fix-debug-audit): The LLM cannot save changes back to the user's uploaded file, so the _WORKBOOK_IO block must instruct it to:
daloopa.com/src/{id} links carry the fundamental ID)..xlsx artifact with the changes applied (using the same base64 + data URI download method as "Excel Output via Artifacts"), labelled prominently "values/formulas only — formatting lost", because SheetJS community edition drops cell styles when it rewrites a file. Never present it as the main output.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 |
python infra/workbook_tools.py tabs/read/refs ... | Read the uploaded workbook in code (see _WORKBOOK_IO). Workbook detection ("newest .xlsx in reports/") becomes "the workbook the user uploaded; ask for it if none" |
python infra/workbook_tools.py apply ... | Replace with the change list table (+ optional SheetJS file, formatting lost) per Step 2c |
python infra/workbook_tools.py recalc ... | Drop — keep the "recompute the affected checks yourself and state the expected values" step; the user confirms them in Excel |
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""" |
port_replicate_model | """Port / Replicate Model""" |
fix_debug_audit | """Fix / Debug / Audit""" |
Workbook-edit signatures differ — they don't take only ticker. Map the skill's argument-hint to optional string parameters:
| Skill argument-hint | Signature |
|---|---|
TICKER [instructions] | def port_replicate_model(ticker: str, instructions: str = "") -> str |
[RANGE] [instructions] | def fix_debug_audit(range: str = "", instructions: str = "") -> str |
Interpolate empty values sensibly (e.g. "Range: {range or 'not given — use the main model sheet\'s used range'}").
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.periods as a parameter name — every one must be calendar_periods._EXPERT_CALLS and that step (with its skip-if-unavailable rule and the [Expert call: {interviewed_affiliation}, {call_date}]({url}) citation); no other prompt includes _EXPERT_CALLS. Inside f-strings, the citation's braces must be doubled ({{interviewed_affiliation}}, {{call_date}}, {{url}}) so they render literally.port_replicate_model and fix_debug_audit never instruct the LLM to build a new model from scratch; both include _WORKBOOK_IO with the change-list output, the expected-check-values step, and the "values/formulas only — formatting lost" label on the optional SheetJS file; neither references infra/workbook_tools.py or reports/.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.What SKILL.md sets; muted values are Claude Code's defaults
None: SKILL.md is the whole skill.
Other plugins' skills for the same job
42 skills in this plugin
/activismActivist vulnerability assessment — performance gaps, likely activist playbook, and defense analysis/bomInteractive product bill-of-materials dashboard with an exploded view, mapping components, suppliers, unit costs, and gross margin sensitivity/build-modelBuild a multi-tab Excel financial model/bull-bearBull/bear/base case scenario framework for a given companynpx claudepluginhub daloopa/investing2 --plugin daloopa-investing