/code-generator
Generates production-ready analysis code in Python, R, SQL. Invoke when user wants reusable code for data analysis, ML, or visualization.
$ npx -y skills add liangdabiao/claude-data-analysis-ultra-main --skill code-generator --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/code-generator
Context preview
The summary Claude sees to decide when to auto-load this skill.
Generates production-ready analysis code in Python, R, SQL. Invoke when user wants reusable code for data analysis, ML, or visualization.
SKILL.md
code-generator.SKILL.mdname: "code-generator"
description: "Generates production-ready analysis code in Python, R, SQL. Invoke when user wants reusable code for data analysis, ML, or visualization."
Code Generator
Expert software engineer specializing in generating production-ready data analysis code.
When to Invoke This Skill
Invoke this skill when user:
- Needs reusable analysis code
- Wants to automate data processing
- Asks for machine learning code
- Needs visualization code
- Specifies a code type (data-cleaning, statistical, visualization, machine-learning, custom)
Code Types (Advanced Mode)
用户可以指定代码类型:
1. data-cleaning (数据清洗)
**适用场景**: 数据预处理
生成代码:
- 缺失值处理
- 数据类型转换
- 重复值检测
- 数据标准化
- 异常值处理
2. statistical (统计分析)
**适用场景**: 统计分析
生成代码:
- 描述性统计
- 假设检验
- 相关性分析
- 回归分析
- 统计可视化
3. visualization (数据可视化)
**适用场景**: 图表创建
生成代码:
- Matplotlib/Seaborn 图表
- Plotly 交互式图表
- 统计图表
- 仪表板
4. machine-learning (机器学习)
**适用场景**: 预测建模
生成代码:
- 特征工程
- 模型训练
- 模型评估
- 交叉验证
- 特征重要性
5. custom (自定义)
根据用户需求生成特定代码
Core Capabilities
Programming Languages
- **Python**: pandas, numpy, scipy, scikit-learn
- **R**: tidyverse, stats, caret
- **SQL**: PostgreSQL, MySQL, BigQuery
Code Types
- Data processing pipelines
- Statistical analysis scripts
- Machine learning models
- Visualization code
- API integrations
- Automation scripts
Code Standards
Python Standards
import pandas as pd
import numpy as np
def process_data(df):
"""数据处理函数"""
# 处理逻辑
return processed_dfR Standards
library(tidyverse)
process_data <- function(df) {
# 处理逻辑
}Output Standards
File Formats
- **Python**: `.py`
- **R**: `.R`
- **SQL**: `.sql`
Output Directory
- `./generated_code/`
Quality Requirements
- Well-documented
- Type hints (Python)
- Error handling
- Unit tests
- Chinese comments
Collaboration
Work with other skills:
- **data-explorer**: Get analysis requirements
- **visualization-specialist**: Get visualization specs
- **report-writer**: Document code usage
Read more
name: "code-generator" description: "Generates production-ready analysis code in Python, R, SQL. Invoke when user wants reusable code for data analysis, ML, or visualization."
Code Generator
Expert software engineer specializing in generating production-ready data analysis code.
When to Invoke This Skill
Invoke this skill when user:
- Needs reusable analysis code
- Wants to automate data processing
- Asks for machine learning code
- Needs visualization code
- Specifies a code type (data-cleaning, statistical, visualization, machine-learning, custom)
Code Types (Advanced Mode)
用户可以指定代码类型:
1. data-cleaning (数据清洗)
**适用场景**: 数据预处理
生成代码:
- 缺失值处理
- 数据类型转换
- 重复值检测
- 数据标准化
- 异常值处理
2. statistical (统计分析)
**适用场景**: 统计分析
生成代码:
- 描述性统计
- 假设检验
- 相关性分析
- 回归分析
- 统计可视化
3. visualization (数据可视化)
**适用场景**: 图表创建
生成代码:
- Matplotlib/Seaborn 图表
- Plotly 交互式图表
- 统计图表
- 仪表板
4. machine-learning (机器学习)
**适用场景**: 预测建模
生成代码:
- 特征工程
- 模型训练
- 模型评估
- 交叉验证
- 特征重要性
5. custom (自定义)
根据用户需求生成特定代码
Core Capabilities
Programming Languages
- **Python**: pandas, numpy, scipy, scikit-learn
- **R**: tidyverse, stats, caret
- **SQL**: PostgreSQL, MySQL, BigQuery
Code Types
- Data processing pipelines
- Statistical analysis scripts
- Machine learning models
- Visualization code
- API integrations
- Automation scripts
Code Standards
Python Standards
import pandas as pd
import numpy as np
def process_data(df):
"""数据处理函数"""
# 处理逻辑
return processed_dfR Standards
library(tidyverse)
process_data <- function(df) {
# 处理逻辑
}Output Standards
File Formats
- **Python**: `.py`
- **R**: `.R`
- **SQL**: `.sql`
Output Directory
- `./generated_code/`
Quality Requirements
- Well-documented
- Type hints (Python)
- Error handling
- Unit tests
- Chinese comments
Collaboration
Work with other skills:
- **data-explorer**: Get analysis requirements
- **visualization-specialist**: Get visualization specs
- **report-writer**: Document code usage
基于 Claude Skill 架构的智能数据分析平台。提供两套完整的技能体系: 通用数据分析技能 - 6阶段完整分析流程 互联网数据分析技能 - 7个专业分析模块 + 1个入口技能
Other skills on claude-data-analysis-ultra-main.
- /ab-testing-analyzer
全面的AB测试分析工具,支持实验设计、统计检验、用户分群分析和可视化报告生成。用于分析产品改版、营销活动、功能优化等AB测试结果,提供统计显著性检验和深度洞察。
Open skill - /attribution-analysis-modeling
Perform multi-touch attribution analysis using Markov chains, Shapley values, and custom attribution models. Use when you need to analyze marketing channel effectiveness, calculate conversion attribution, optimize marketing budgets, or understand customer journey paths. Supports
Open skill - /content-analysis
Analyze text content using both traditional NLP and LLM-enhanced methods. Extract sentiment, topics, keywords, and insights from various content types including social media posts, articles, reviews, and video content. Use when working with text analysis, sentiment detection,
Open skill - /data-analysis
通用的 6 阶段数据分析助手:数据质量→探索性分析→假设生成→可视化→代码生成→综合报告。提供完整的方法论和模板!
Open skill - /data-exploration-visualization
自动化数据探索和可视化工具,提供从数据加载到专业报告生成的完整EDA解决方案。支持多种图表类型、智能数据诊断、建模评估和HTML报告生成。适用于医疗、金融、电商等领域的数据分析项目。
Open skill - /data-explorer
Performs exploratory data analysis, statistical analysis, and pattern discovery. Invoke when user wants to analyze data, find patterns, statistical testing, or get deep insights.
Open skill

