agentsclimarketplace

Generate from schema

Skill Rockfish-Data/tacklebox/skills/generate-from-schema

Generate synthetic datasets from a schema specification using the Rockfish SDK. Use when a user wants to create synthetic tabular or time-series data with specific structure — independent or derived columns, state machines, timeseries, entity relationships (including composite foreign keys), or realistic PII-like values (names, emails, addresses, SSNs) via NamedEntityProvider. Trigger on phrases like "generate synthetic data", "fake data from a schema", "create a test dataset", "GenerateFromDataSchema", or mentions of entity/foreign-key/state-machine data.From its SKILL.md

Install
npx -y skills add Rockfish-Data/tacklebox --skill generate-from-schema

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.0 KB, 784 tokens by cl100k_base, as published. Nobody here has run it

Generate from schema

Use rockfish.actions.GenerateFromDataSchema to produce synthetic datasets from a schema specification.

When to use this skill

Use when the user wants to generate synthetic tabular or time-series data with:

  • Specific column types (IDs, categoricals, numeric distributions).
  • Derived columns (computed from other columns — e.g. mapping or sampling).
  • Stateful behavior (state machines or timeseries).
  • Cross-entity relationships (foreign keys, including composite keys).
  • Realistic PII-like values (names, emails, addresses, SSNs).

If the user wants to inject scenarios (spikes, outages, ramps, shifts) into an existing time-series dataset, use the inject-scenarios skill instead.

Concept

rockfish.actions.GenerateFromDataSchema takes a DataSchema and produces one synthetic dataset per Entity. A schema is a tree:

DataSchema
├── entities: list[Entity]
│   ├── name, cardinality
│   ├── columns: list[Column]
│   │   ├── name, data_type
│   │   ├── column_type  (independent | derived | stateful | foreign_key)
│   │   └── domain       (id | categorical | uniform_dist | state_machine
│   │                     | timeseries | named_entity_provider | ...)
│   └── (optional) timestamp
├── entity_relationships: list[EntityRelationship]
└── (optional) global_timestamp

How to use

  1. Construct a DataSchema matching the user's data requirements. Two equivalent forms:
    • JSON dict — convenient for simple cases, language-agnostic.
    • Typed dataclasses (DataSchema, Entity, Column, Domain, ...) — validated at construction, better for complex schemas.
  2. Wrap it in ra.GenerateFromDataSchema.Config(schema=..., upload_datasets=True).
  3. Run via WorkflowBuilder().add(generate).start(conn).
  4. Pull results back with workflow.datasets().

Connection

async with rf.Connection.from_config() as conn:
    ...

from_config() reads ~/.config/rockfish/config.toml or ROCKFISH_* env vars. The async with ensures the underlying HTTP session is closed cleanly.

Worked example

See examples/entity-gen.py for a runnable script with four cases:

  1. Simple device schema (JSON dict) — independent + derived columns.
  2. User sessions (typed dataclasses) — state machine + timeseries + foreign key.
  3. Trades (typed dataclasses) — composite foreign key.
  4. Customers (typed dataclasses) — NamedEntityProvider for realistic PII-like values, with a multilingual variant.

Run one example at a time:

python examples/entity-gen.py -e 2

Gotchas

  • Cardinality vs. row count: Entity.cardinality is the number of source rows generated for that entity before any sampling/expansion via relationships. A sessions entity referencing users has its own cardinality independent of users.cardinality.
  • State machines need a trigger_column_name: the column named there appears in the output alongside the state column.
  • Composite foreign keys: declare each FK column with column_type=FOREIGN_KEY and bind them in EntityRelationship.join_columns — the parent-side columns aren't repeated in the child entity's columns list.
  • NamedEntityProvider uniqueness: pass unique_values=N, with_replacement=False when you need uniqueness in the generated pool (e.g. emails, SSNs).

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,696. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.