agentleFS
iamcaominhtieniamcaominhtien/kanban-board-mcp/.github/skills/test-data-generator/SKILL.md

test-data-generator

Skill1 starsChanged 37 days agoMITView on GitHub

Generate test data of any format and any size for debugging, testing, and development. Covers JSON, CSV, XLSX, DOCX, PDF, HTML, XML, Markdown, plain text, images (PNG/JPG), and ZIP. Supports both AI-generated inline data (small) and script-generated data (large). Use when: "generate test data", "create sample file", "I need dummy data", "create a large PDF", "generate 10000 JSON records", "make test fixtures", "create a CSV with 50k rows", "I need a 200-page Word document".

  • Pipes a download into a shell
  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always clarify format, size, and content theme before generating.

    line 29
  2. Very specific:

    Use fetch.py — fetches any URL, any file type (PDF, XLSX, DOCX, CSV, …).

    line 322
  3. Distinctive:

    When search results are thin, go directly to these sources:

    line 392

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Test Data Generator Skill

Role

You are a test data engineer who generates realistic, well-structured test files of any format and any size. You pick the right tool for the right job:

  • Small data (≤ 200 records / ≤ 10 pages) — generate inline, directly in the chat response
  • Large data — delegate to the Python script generate.py which runs with a single uv command

Always clarify format, size, and content theme before generating.


Quick Decision Guide

What the user wantsAction
A few JSON objects as a code blockGenerate inline
A small HTML snippetGenerate inline
1000+ JSON recordsgenerate.py json --rows 1000
A CSV with many rowsgenerate.py csv --rows N
A large Excel filegenerate.py xlsx --rows N
A multi-page PDFgenerate.py pdf --pages N
A multi-page Word docgenerate.py docx --pages N
A large HTML pagegenerate.py html --sections N
An XML data filegenerate.py xml --rows N
A Markdown documentgenerate.py md --sections N
A test image (PNG/JPG)generate.py image --width W --height H
Plain text / lorem ipsumgenerate.py lorem --words N
A ZIP bundle of test filesgenerate.py zip
One file of every formatgenerate.py batch --size medium
"Give me a large set of fixtures"generate.py batch --size large --output ./fixtures/
Need real-world documents (reports, papers, invoices…)Search online with filetype: trick — see Finding Real Documents Online
Need real files from the internet (PDF, XLSX, DOCX, CSV…)fetch.py --urls <url1> <url2> or --manifest files.csv

The generate.py Script

Location: .github/skills/test-data-generator/generate.py

Self-contained script using PEP 723 inline dependencies — no manual pip install or venv needed.

Prerequisites

# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh

Run Commands

# JSON -- 5000 user records
uv run .github/skills/test-data-generator/generate.py json --rows 5000

# CSV -- 100,000 transaction records, reproducible
uv run .github/skills/test-data-generator/generate.py csv \
  --rows 100000 --schema transactions --seed 42 --output payments.csv

# Excel -- 50,000 product rows
uv run .github/skills/test-data-generator/generate.py xlsx \
  --rows 50000 --schema products --output catalog.xlsx

# Word document -- ~200 pages
uv run .github/skills/test-data-generator/generate.py docx \
  --pages 200 --output large_doc.docx

# PDF -- 300 pages
uv run .github/skills/test-data-generator/generate.py pdf \
  --pages 300 --output big_report.pdf

# HTML page -- 100 sections
uv run .github/skills/test-data-generator/generate.py html \
  --sections 100 --output page.html

# XML -- 5000 records
uv run .github/skills/test-data-generator/generate.py xml \
  --rows 5000 --output data.xml

# Markdown -- 50 sections
uv run .github/skills/test-data-generator/generate.py md \
  --sections 50 --output document.md

# Image -- 1920x1080 PNG
uv run .github/skills/test-data-generator/generate.py image \
  --width 1920 --height 1080 --output photo.png

# Image -- JPG format
uv run .github/skills/test-data-generator/generate.py image \
  --width 800 --height 600 --format jpg --output thumb.jpg

# Plain text -- ~10,000 words
uv run .github/skills/test-data-generator/generate.py lorem \
  --words 10000 --output article.txt

# ZIP bundle (CSV + JSON + Markdown + HTML)
uv run .github/skills/test-data-generator/generate.py zip \
  --output test_bundle.zip

# Batch -- one file of every format, medium size
uv run .github/skills/test-data-generator/generate.py batch \
  --size medium --output ./fixtures/

# Size preset shortcut (no need to count rows/pages)
uv run .github/skills/test-data-generator/generate.py pdf --size large
uv run .github/skills/test-data-generator/generate.py json --size small --schema transactions

# French locale
uv run .github/skills/test-data-generator/generate.py json \
  --rows 500 --locale fr_FR --output french_users.json

CLI Reference

Shared options (available on every subcommand)

OptionDescriptionDefault
--schemaData theme: users, products, transactions, logs, articles, loremusers
--localeFaker locale (en_US, fr_FR, vi_VN, ja_JP, de_DE, …)en_US
--seedInteger seed for reproducible output(random)
--output / -oOutput file path(auto-named)
--sizePreset: small / medium / large — sets default rows/pages/sections(medium if omitted)

--schema applies to json, csv, xlsx only. Document formats always generate rich content.

Size preset values

Presetpagesrowssectionswordsimage
small51005500400×300
medium505,000205,000800×600
large500100,00010050,0001920×1080

Subcommand-specific options

SubcommandKey optionExample
json--rows N--rows 10000
csv--rows N--rows 100000
xlsx--rows N--rows 50000
docx--pages N--pages 200
pdf--pages N--pages 500
html--sections N--sections 100
xml--rows N--rows 5000
md--sections N--sections 50
image--width W --height H --format png|jpg--width 1920 --height 1080
lorem--words N--words 10000
zip(no size option — always bundles 200 rows + 5 sections)
batch--size small|medium|large--size large

Explicit --rows / --pages / --sections always override --size.


Data Schemas

Schemas apply to structured row-based formats: json, csv, xlsx.

users (default)

Person-centric: id, name, email, phone, company, job, address, country, birthdate, registered_at, active, score.

products

E-commerce catalog: id, sku, name, description, category, brand, price, stock, rating, tags, created_at.

transactions

Financial ledger: id (UUID), seq, from_account, to_account, currency, amount, method, status (pending/completed/failed/refunded), timestamp, description, ip_address.

logs

Application logs: seq, timestamp, level (DEBUG/INFO/WARNING/ERROR/CRITICAL), service, request_id, method (HTTP verb), path, status_code, duration_ms, user_agent, ip, message.

articles

Blog/news content: id, title, slug, author, category, tags, summary, body (5 paragraphs), views, likes, published_at, updated_at.

lorem

Minimal placeholder: id, title, body, value (int), flag (bool).


AI-Generated Inline Data

For small data (≤ 200 records), generate directly in the response — no script needed.

Guidelines for inline generation

JSON

[
  { "id": 1, "name": "Alice Smith",  "email": "alice@example.com", "active": true  },
  { "id": 2, "name": "Bob Johnson",  "email": "bob@example.com",   "active": false },
  { "id": 3, "name": "Carol Davis",  "email": "carol@example.com", "active": true  }
]

CSV

id,name,email,score
1,Alice Smith,alice@example.com,87.5
2,Bob Johnson,bob@example.com,62.0
3,Carol Davis,carol@example.com,95.3

XML

<?xml version='1.0' encoding='utf-8'?>
<records count="2">
  <record id="1"><name>Alice Smith</name><email>alice@example.com</email></record>
  <record id="2"><name>Bob Johnson</name><email>bob@example.com</email></record>
</records>

HTML snippet

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>Test Page</title></head>
<body>
  <h1>Sample Report</h1>
  <table>
    <tr><th>Name</th><th>Email</th></tr>
    <tr><td>Alice Smith</td><td>alice@example.com</td></tr>
  </table>
</body>
</html>

Common Recipes

API test fixtures

# 200 user records -- small enough for a fixture file, large enough to stress pagination
uv run .github/skills/test-data-generator/generate.py json \
  --rows 200 --schema users --seed 1 --output tests/fixtures/users.json

# Transaction log for testing a payment service
uv run .github/skills/test-data-generator/generate.py csv \
  --rows 10000 --schema transactions --seed 42 --output tests/fixtures/payments.csv

Stress-testing a document parser

# 500-page PDF
uv run .github/skills/test-data-generator/generate.py pdf \
  --pages 500 --output stress_test.pdf

# 200-page Word doc
uv run .github/skills/test-data-generator/generate.py docx \
  --pages 200 --output stress_test.docx

Full fixture set for a new feature

# Generate one file of every format -- small size, reproducible
uv run .github/skills/test-data-generator/generate.py batch \
  --size small --seed 99 --output ./tests/fixtures/

Localized data

# Vietnamese users
uv run .github/skills/test-data-generator/generate.py json \
  --rows 1000 --locale vi_VN --output vn_users.json

# Japanese product catalog
uv run .github/skills/test-data-generator/generate.py xlsx \
  --rows 500 --schema products --locale ja_JP --output jp_catalog.xlsx

Image upload testing

# Batch of images at different sizes
uv run .github/skills/test-data-generator/generate.py image --size small  -o thumb.png
uv run .github/skills/test-data-generator/generate.py image --size medium -o medium.png
uv run .github/skills/test-data-generator/generate.py image --size large  -o large.png
uv run .github/skills/test-data-generator/generate.py image --width 1200 --height 630 --format jpg -o og_image.jpg

Finding Real Documents Online

Sometimes generated data isn't enough — you need real files with authentic structure, formatting quirks, embedded fonts, scanned pages, or complex layouts that synthetic data can't replicate.

Fetching Real Files from the Internet

Use fetch.py — fetches any URL, any file type (PDF, XLSX, DOCX, CSV, …).

Script location: .github/skills/test-data-generator/fetch.py

# Fetch files by URL (filename inferred from URL)
uv run .github/skills/test-data-generator/fetch.py \
    --urls "https://example.com/budget.xlsx" "https://example.com/users.csv"

# Fetch with explicit names via a manifest CSV (url,filename — one per line)
uv run .github/skills/test-data-generator/fetch.py \
    --manifest files.csv --output ./fixtures/

Manifest CSV format:

https://arxiv.org/pdf/1810.04805, bert_pretraining.pdf
https://example.com/products.xlsx, products.xlsx
https://example.com/users.csv, users.csv
# lines starting with # are ignored

Implementation note — always use requests, not urllib:

# ✅ requests handles SSL automatically on macOS/Linux
import requests
response = requests.get(url, timeout=60)
response.raise_for_status()
with open(out_path, "wb") as f:
    f.write(response.content)

# ❌ urllib needs manual SSL workarounds on macOS (CERTIFICATE_VERIFY_FAILED)
import urllib.request
urllib.request.urlopen(url)

The filetype: Search Trick

Append filetype:<ext> to any Google (or Bing) search query to surface publicly available files of that exact type:

annual report filetype:pdf
invoice template filetype:xlsx
research paper machine learning filetype:pdf
project plan filetype:docx
product catalog filetype:xlsx
contract template filetype:docx
data dictionary filetype:csv

Works on Google, Bing, and DuckDuckGo. Google returns the most results.

By format — ready-to-use queries

FormatExample search query
PDFannual report 2023 filetype:pdf
DOCXterms and conditions filetype:docx
XLSXfinancial model filetype:xlsx
CSVopen data population filetype:csv
PPTXpitch deck template filetype:pptx
XMLsitemap filetype:xml
JSONgeojson country borders filetype:json

Reliable open-data sources

When search results are thin, go directly to these sources:

SourceWhat you get
data.govGovernment datasets (CSV, JSON, XML)
kaggle.com/datasetsStructured ML datasets
arxiv.orgResearch PDFs — fetch with fetch.py --urls https://arxiv.org/pdf/{id}
sec.gov/edgarAnnual reports, 10-K filings (PDF, XLSX)
world.openfoodfacts.orgLarge CSV/JSON product data
github.com searchSample files committed to public repos

When to use real documents vs. generated data

SituationRecommendation
Testing parser edge cases (fonts, encoding, embedded images)Real documents
Testing with diverse scientific PDFs (multi-column, equations, figures)fetch.py --manifest papers.csv
Stress-testing with 10k+ rows of uniform dataGenerated data
Reproducing a specific user-reported bugReal document if possible
CI/CD fixture files (must be stable and reproducible)Generated with --seed
Checking layout handling (multi-column PDF, merged Excel cells)Real documents

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.