Data Analysis Prompts with Lexicon
Reusable templates for consistent analytical workflows
Data analysis prompts are highly specific. "Analyze this CSV for outliers using IQR method, generate a summary table with mean, median, and standard deviation for each numeric column, and create a matplotlib visualization with these specific formatting preferences" -- typing that every time is painful. And each analyst has their own preferences for statistical methods, visualization styles, output formats, and level of detail. The prompt that produces exactly the right output is often fifty or a hundred words of precise instructions.
Most analysts end up with a collection of Jupyter notebook cells or script comments that contain their go-to prompts. But these are scattered across projects, tied to specific datasets, and hard to reuse. When you start a new analysis, you dig through old notebooks looking for that EDA prompt that worked well, manually edit the dataset-specific parts, and paste it into your AI tool. The friction adds up, and the inconsistency means your analyses do not follow a standard methodology even when they should.
Standardized Analysis Templates
With Lexicon, you create prompt templates for common analytical workflows: EDA (exploratory data analysis), outlier detection, correlation analysis, time series decomposition, hypothesis testing, and feature engineering. Each template has variables for {{data_source}}, {{target_variable}}, and {{output_format}}. Your EDA template might include instructions for checking data types, identifying missing values, computing distribution statistics, and flagging potential data quality issues -- all in a consistent order with your preferred level of detail.
Variables can have defaults that match your most common setup. If you usually work with CSV files and want pandas DataFrames as output, those are the defaults. When a project uses Parquet files or needs results as markdown tables, override just the variables that change.
Visualization Standards
A "Create Chart" prompt with variables for {{chart_type}}, {{color_palette}}, and {{style_guide}} ensures consistent visualizations across analyses. Your brand colors and formatting preferences are baked into the template. Every bar chart uses the same color scheme. Every scatter plot has the same axis label formatting. Every time series chart uses the same date formatting conventions. The visual consistency that normally requires a style guide and manual enforcement happens automatically because it is encoded in the prompt template.
This is especially valuable for analysts who produce reports for stakeholders. The CEO should not see different chart styles depending on which analyst ran the numbers or which day of the week the report was generated.
Report Generation
Different audiences need different reporting styles, and switching between them is where most analysts lose time. Lexicon lets you maintain separate prompt templates for each context: "summarize findings for executive audience" produces a concise narrative with key metrics and recommendations. "Write technical methodology section" produces detailed statistical justification with confidence intervals and p-values. "Create data dictionary" produces structured documentation of every variable, its type, and its meaning.
Each template encodes not just what to include but how to present it -- the vocabulary, the level of statistical detail, the balance of text and tables, the overall narrative structure. Switching from a board presentation to a peer review appendix is a different slash command, not a rewrite.
MCP Integration
In Claude Code, /lexicon:eda loads your full exploratory analysis prompt template. Combined with a local data file, Claude runs the analysis using your preferred methods and formatting -- no prompt engineering in the moment. You stay in your analytical flow, moving from data loading to analysis to visualization without breaking context to craft the right prompt.
Because Lexicon serves prompts through MCP, the integration works in Claude Code, Claude Desktop, and any other MCP-compatible client. Your analysis templates are not locked to one tool.
Reproducibility
Saved prompts create reproducible analytical workflows. The same analysis prompt applied to different datasets produces consistent, comparable results. This matters for regulatory reporting, A/B test analysis, and any context where methodology needs to be auditable. When someone asks "how did you calculate that," you can point to a versioned prompt template that defines exactly what statistical methods were used, what thresholds were applied, and how edge cases were handled.
Export your analysis templates as JSON to share with your team or archive alongside your reports. The prompt is as much a part of the methodology as the code itself.
Note: Lexicon is coming soon to the Mac App Store.
Learn More About Lexicon