dummy-dataset
它能做什么
它按你指定的列、取值范围和业务规则,以你选择的格式创建逼真的示例数据集。适合需要测试或演示数据的开发者和产品团队。
适用场景
- ✓当你需要为测试应用或数据库准备示例记录时。
- ✓当你需要为演示或原型准备逼真的模拟数据时。
- ✓当你希望有一个可重复运行、用来生成测试数据的脚本时。
技能链接
https://github.com/phuryn/pm-skills/blob/main/pm-execution/skills/dummy-dataset/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请为我制作一个包含 200 条虚拟客户订单的 CSV 文件,其中有订单日期、金额和状态列,用于测试我的仪表板。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体定义列规格和约束,应用逼真的模式,并把数据生成为文件,或生成一个可运行的脚本。然后它检查输出是否有效且完整。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Dummy Dataset Generation
Generate realistic dummy datasets for testing with customizable columns, constraints, and output formats (CSV, JSON, SQL, Python script). Creates executable scripts or direct data files for immediate use.
Use when: Creating test data, generating sample datasets, building realistic mock data for development, or populating test environments.
Arguments:
$PRODUCT: The product or system name$DATASET_TYPE: Type of data (e.g., customer feedback, transactions, user profiles)$ROWS: Number of rows to generate (default: 100)$COLUMNS: Specific columns or fields to include$FORMAT: Output format (CSV, JSON, SQL, Python script)$CONSTRAINTS: Additional constraints or business rules
Step-by-Step Process
- Identify dataset type - Understand the data domain
- Define column specifications - Names, data types, and value ranges
- Determine row count - How many sample records needed
- Select output format - CSV, JSON, SQL INSERT, or Python script
- Apply realistic patterns - Ensure data looks authentic and valid
- Add business constraints - Respect business logic and relationships
- Generate or script data - Create executable output
- Validate output - Ensure data quality and completeness
Template: Python Script Output
import csv
import json
from datetime import datetime, timedelta
import random
# Configuration
ROWS = $ROWS
FILENAME = "$DATASET_TYPE.csv"
# Column definitions with realistic value generators
columns = {
"id": "auto-increment",
"name": "first_last_name",
"email": "email",
"created_at": "timestamp",
# Add more columns...
}
def generate_dataset():
"""Generate realistic dummy dataset"""
data = []
for i in range(1, ROWS + 1):
record = {
"id": f"U{i:06d}",
# Generate values based on column definitions
}
data.append(record)
return data
def save_as_csv(data, filename):
"""Save dataset as CSV"""
with open(filename, 'w', newline='') as f:
writer = csv.DictWriter(f, fieldnames=data[0].keys())
writer.writeheader()
writer.writerows(data)
if __name__ == "__main__":
dataset = generate_dataset()
save_as_csv(dataset, FILENAME)
print(f"Generated {len(dataset)} records in {FILENAME}")
Example Dataset Specification
Dataset Type: Customer Feedback
Columns:
- feedback_id (auto-increment, U001, U002...)
- customer_name (realistic names)
- email (valid email format)
- feedback_date (dates last 90 days)
- rating (1-5 stars)
- category (Bug, Feature Request, Complaint, Praise)
- text (realistic feedback)
- product (electronics, clothing, home)
Constraints:
- Ratings skewed: 40% 5-star, 30% 4-star, 20% 3-star, 10% 1-2 star
- Bug category only with ratings 1-3
- Feature requests only with ratings 3-5
- Email domains realistic (gmail, yahoo, company.com)
Output Deliverables
- Ready-to-execute Python script OR direct data file
- CSV file with proper headers and formatting
- JSON file with valid structure and types
- SQL INSERT statements for database population
- Data validation and constraint compliance
- Realistic, business-appropriate values
- Documentation of data generation logic
- Quick-start instructions for using the dataset
Output Formats
CSV: Flat tabular format, easy to import into spreadsheets and databases
JSON: Nested structure, ideal for APIs and NoSQL databases
SQL: INSERT statements, directly executable on relational databases
Python Script: Executable generator for custom or large datasets
常见问题
有哪些输出格式?
CSV、JSON、SQL 插入语句以及 Python 脚本。
它能保持表之间的关系有效吗?
能。当描述了业务约束和关系时,它会予以应用。
默认的行数是多少?
默认一百行,除非你要求其他数量。
详情
作者的原始描述
Generate realistic dummy datasets for testing with customizable columns, constraints, and output formats (CSV, JSON, SQL, Python script). Use when creating test data, building mock datasets, or generating sample data for development and demos.
repo: phuryn/pm-skills
热度
- GitHub 星标
- 28k
- 排名
- #9881
- 许可证
- MIT
- 更新时间
- 2026/10/29
评论
- …
同一仓库的更多技能
ab-test-analysis
28k帮你的智能体解读 A/B 测试结果,检查统计显著性和样本量,并建议某个变体是上线、延长测试还是停止。
cohort-analysis
28k帮你的智能体按同期群分析用户留存,展示每组用户的参与度和功能采用率随时间的变化。
sql-queries
28k帮你的智能体把用自然语言描述的业务问题,转换为 PostgreSQL、MySQL 或 BigQuery 等数据库的 SQL 查询。
brainstorm-okrs
28k帮你的智能体起草团队的 OKR,包括定性的目标和与公司目标一致、可衡量的关键结果。