posit-dev/pointblank/generate-data
Claude Code and agent skill by posit-dev/pointblank
- community
Checking that the SKILL.md file is still in the repository.
Generate synthetic datasets with Pointblank using Schema and field classes. Covers IntField, FloatField, StringField, BoolField, DateField, DatetimeField, and more. Supports presets (name, email, address, etc.), country-specific data, nullable columns, unique constraints, profile_fields() for person data, schemas inferred from a real table, and check_synthetic() for comparing synthetic data with the real data it imitates. Use when creating test data, fixtures, or synthetic datasets for validati…
Install
npx vskill@latest install posit-dev/pointblank/generate-dataSKILL.md
The same SKILL.md was published earlier as posit-dev/pointblank/generate-data.
Generate Data
Skill for creating synthetic datasets from schema definitions and field specifications. Useful for testing validation rules, creating fixtures, generating demo data, and prototyping pipelines.
Quick start
Skill directory structure
When to use what
| I want to... | Use | |
|---|---|---|
| Generate a dataset from a schema | schema.generate() | |
| Generate without creating a Schema | pb.generate_dataset() | |
| Define integer columns | int_field() | |
| Define float columns | float_field() | |
| Define string columns with patterns | string_field(pattern=) | |
| Define string columns with presets | string_field(preset=) | |
| Define boolean columns | bool_field() | |
| Define date columns | date_field() | |
| Define datetime columns | datetime_field() | |
| Define time columns | time_field() | |
| Define duration columns | duration_field() | |
| Add person profile fields | profile_fields() | |
| Generate country-specific data | generate(country="DE") | |
| Mix several countries | generate(country=["DE", "FR"]) | |
| Imitate an existing table | schema_from_tbl(df).generate() | |
| Check synthetic data against real | check_synthetic() | |
| Make columns nullable | nullable=True, null_probability=0.1 | |
| Ensure unique values | unique=True | |
| Use a custom generator function | generator=my_func |
Core concepts
Schema-based generation
Define columns using field classes, then generate:
generate() parameters
| Parameter | Default | Description | |
|---|---|---|---|
n | 100 | Number of rows to generate | |
seed | None | Random seed for reproducibility | |
output | "polars" | "polars", "pandas", or "dict" | |
country | "US" | A country code, a list of them, or a dict of codes to weights | |
shuffle | True | Shuffle rows after generation | |
weighted | True | Use weighted distributions |
generate_dataset() convenience function
It takes the same parameters as generate().
Nullable columns
Any field type supports nulls (null_probability needs nullable=True):
Unique constraints
Ensure all generated values are distinct:
Allowed values (categorical)
Restrict to a specific set of values:
String patterns
Generate strings matching a pattern:
String presets
Use built-in presets for realistic data:
Presets produce country-specific data when country is set, and the presets in a row agree with each other (the email is built from the name, the city, state, and postcode go together). See references/presets-reference.md for the full list; an unknown preset raises a ValueError that lists them.
Profile fields
Generate person-related fields as a group:
Custom generators
Supply your own generator function:
Country-specific generation
Over 100 countries supported (ISO 3166-1 alpha-2 codes):
Workflows
Creating test data for validation rules
- Define the schema matching your production table.
- Use field constraints to generate realistic ranges.
- Add some nullable columns to test null handling.
- Generate the dataset.
- Run your validation plan against it.
Generating fixtures from an existing table
pb.Schema.from_table() is the same as schema_from_tbl(). Each field gets its range, null rate, uniqueness, and (for few distinct values) an allowed= list from the data, and string columns are matched to presets by name and values.
Checking synthetic data against the real data
check_synthetic() compares synthetic data with its seed (the real data it imitates) for fidelity (each column's distribution, by PSI and KS), diversity (repeated rows, and distinct-n for text= columns), and copies of seed rows (exact, or near copies of text= columns):
Inferred fields keep each column's range but not its shape, so numeric columns often fail fidelity; tighten those fields (or use allowed=) when the distribution matters. See the check-training-data skill for more on synthetic data used for training.
Gotchas
- `unique=True` needs a large enough range. If
max_val - min_val
< n, generation will fail for integer fields.
- Only one of `preset`, `pattern`, `allowed` per StringField.
They are mutually exclusive.
- Presets don't need Faker. Their data ships with Pointblank,
so no extra install is needed.
- `seed` makes generation reproducible for a given `n`. With a
larger n, most columns start with the smaller dataset's rows, but not all (email addresses come out differently), so don't rely on a smaller dataset being the first rows of a larger one.
- `output` is `"polars"`, `"pandas"`, or `"dict"`. For other
formats, convert after generation.
- `null_probability` needs `nullable=True`. A probability above 0
without it raises a ValueError, and nullable=True with the default null_probability=0.0 generates no nulls.
Related skills
| Skill | When to use it | |
|---|---|---|
| pointblank | Validate the generated data | |
| scan-and-profile | Profile the real table the schema imitates | |
| write-validation | Write the plan that the test data exercises | |
| check-training-data | Check synthetic data used for training a model |
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/generate-data/SKILL.md
Popularity
- Repository stars
- 483
- Repository forks
- 30
- 7-day trend score
- 31
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/posit-dev/pointblank/generate-data)