Agent Skills#
edg has a set of Agent Skills; slash commands that help you generate, validate, debug, and migrate workload configs without leaving your terminal. Skills live in the edg-skills repo.
Install#
Install all edg skills into your project with one command:
npx skills add codingconcepts/edg-skills --agent claude-code --skill '*' --yesOr install a specific skill:
npx skills add codingconcepts/edg-skills --agent claude-code --skill edg-config --yesWindows users: Git symlinks require Developer Mode enabled or
git config core.symlinks trueset before cloning. Without this, the symlinks in.claude/skills/will be checked out as plain text files. Rungit clone -c core.symlinks=trueto avoid this.
Available Skills#
/edg-config - Generate a workload config#
Generates a complete edg config from a natural language description of your schema and workload. Includes database-specific patterns for all supported drivers.
Example prompts:
/edg-config
I have a users table and an orders table on CockroachDB.
Users have an email, name, and created_at timestamp.
Orders reference a user and have a total, status, and created_at.
I want a 70/30 read/write mix benchmarking order lookups and new order inserts.
Seed with 10k users and 50k orders./edg-config
MySQL e-commerce schema: products (name, category, price, stock),
customers (email, name), and a cart_items join table.
Write-heavy workload simulating add-to-cart with Zipfian product selection
(some products are much more popular). Use batch inserts for seeding./edg-config
Generate a sync config pair for CockroachDB (pgx) and MySQL.
Tables: users (id, email, name) and orders (id, user_id, amount, status).
1000 users and 5000 orders, batched 100 at a time.
I'll use edg sync run with --rng-seed for deterministic dual-write testing./edg-config
MongoDB workload: customers collection with email and name fields,
and an accounts collection referencing customers with a balance field.
Seed 500 customers and 500 accounts, then run random balance lookups./edg-config
Cassandra IoT schema: create a keyspace with a devices table (id UUID, name TEXT)
and a readings table (device_id UUID, ts TIMESTAMP, value DOUBLE).
Seed 100 devices and 10k readings, then run time-range queries./edg-config
CockroachDB bank workload with staged execution: ramp up with 1 worker
doing mostly reads (90%), then steady state with 10 workers doing heavy
transfers (45%), then cool down with 2 workers falling back to default weights.
Use per-stage run_weights to shift the workload mix at each phase.What it produces:
- A full config with
globals,stages,up,seed,init,run,run_weights,workers,deseed, anddownsections - Appropriate expressions for data generation (
gen(),uuid_v7(), distributions) - Reference data setup via
initqueries for use inrunwithref(),ref_same(), etc. - Driver-specific SQL patterns (batch expansion, DDL safety, upsert syntax)
- Sync config pairs for cross-database consistency testing - matched schemas with explicit IDs, identical seed args, and driver-specific batch SQL for use with
edg sync run - Uses shorthand features where appropriate: inline args (
${expr}),__columns__/__values__expansion, query type inference, and named templates to reduce boilerplate
For a quick starting point without an agent,
edg scaffoldgenerates a config interactively from the command line. See Scaffold.
/edg-validate - Validate and fix a config#
Runs edg validate on a config file, interprets errors, and suggests fixes.
Example prompts:
/edg-validate
Check my config at workloads/bench.edg for the pgx driver./edg-validate
Validate examples/ecommerce/mysql.edg and fix any issues you find.What it does:
- Detects the driver from the config content (or uses one you specify)
- Runs
edg validate --driver <driver> --config <path> --explain(errors now include line numbers and enhanced explanations) - Explains each error in plain language
- Suggests (or applies) fixes for common issues:
- Unknown functions or typos in expressions
- Missing
initdatasets referenced byref_*calls - Wrong query type (
execvsquery) - note thattype:is now optional and auto-inferred from the query text - Missing
count/sizeon batch operations
/edg-expression - Compose and debug expressions#
Helps you find the right edg expression for a use case, explains how functions work, and debugs syntax errors.
Example prompts:
/edg-expression
I need to generate a price between $1 and $500 with a log-normal distribution
skewed toward cheaper items, rounded to 2 decimal places./edg-expression
How do I make two columns mutually exclusive (either an email OR a phone
number, but never both?)/edg-expression
What's the difference between ref_rand, ref_same, and ref_perm?
When would I use each one?What it covers:
- All 100+ built-in functions with signatures and descriptions (also available via
edg functions [search]) - Distribution selection guidance (uniform vs normal vs zipf vs exponential)
- Reference data patterns (
ref_randvsref_samevsref_permvsref_diff) - Dependent column patterns with
arg(),cond(), andbool() - Inline args (
${expr}) and__columns__/__values__shorthand - The full expr-lang feature set (array functions, string ops, math, conditionals)
- Tips for debugging with
edg repl(with tab completion for function names)
Tips#
- Combine skills: Generate a config with
/edg-config, then validate it with/edg-validate. - Start with scaffold: Run
edg scaffoldfor a quick interactive starting point, then refine with/edg-configfor more complex needs. - Use the REPL: All expression skills recommend
edg replfor interactive testing with tab completion; no database connection needed. - Discover functions: Run
edg functions [search]to find available functions by name (e.g.edg functions ref,edg functions seq). - Validate after migration: Always run
edg validate --driver <driver> --config <path> --explainafter generating or migrating a config to catch issues before hitting the database.