agents-standards
Standards for authoring SDD plugin agents — frontmatter, self-containment, skill references, and no-user-interaction rules.
Scaffolds PostgreSQL database component with migrations, seeds, and management scripts.
$ npx -y skills add LiorCohen/sdd --skill database-scaffolding --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/database-scaffoldingContext preview
The summary Claude sees to decide when to auto-load this skill.
Scaffolds PostgreSQL database component with migrations, seeds, and management scripts.
name: database-scaffolding description: Scaffolds PostgreSQL database component with migrations, seeds, and management scripts. user-invocable: false
Creates database component structure for PostgreSQL-based projects.
The directory path depends on the component name as defined in `sdd/sdd-settings.yaml`. Delegate to the `techpack-settings` skill for directory path resolution — it maps component type (`database`) + name to a filesystem path (e.g., `type=database, name=app-db` → `components/databases/app-db/`). Database components support multiple instances (e.g., `database-app-db/`, `database-analytics-db/`).
components/database[-<name>]/
├── package.json # Component package metadata
├── README.md # Component documentation
├── migrations/
│ └── 001_initial_schema.sql
└── seeds/
└── 001_seed_data.sql| Variable | Description | |----------|-------------| | `{{PROJECT_NAME}}` | Project name for naming and comments |
Use when your project needs:
After scaffolding, database operations are performed via the system CLI:
<plugin-root>/fullstack-typescript/system/system-run.sh database setup <component-name> <plugin-root>/fullstack-typescript/system/system-run.sh database teardown <component-name> <plugin-root>/fullstack-typescript/system/system-run.sh database migrate <component-name> <plugin-root>/fullstack-typescript/system/system-run.sh database seed <component-name> <plugin-root>/fullstack-typescript/system/system-run.sh database reset <component-name> <plugin-root>/fullstack-typescript/system/system-run.sh database port-forward <component-name> <plugin-root>/fullstack-typescript/system/system-run.sh database psql <component-name>
The CLI commands require:
Create numbered SQL files for sequential execution:
migrations/ ├── 001_initial_schema.sql ├── 002_add_users_table.sql ├── 003_add_orders_table.sql └── 004_add_indexes.sql
Each migration should:
Create numbered SQL files for seed data:
seeds/ ├── 001_lookup_data.sql ├── 002_admin_users.sql └── 003_sample_data.sql
Each seed file should:
The database component works alongside the server component:
components/
├── database/ # Schema, migrations, seeds
│ └── migrations/
└── server/
└── src/dal/ # Data access layer queriesThe server's DAL layer imports types and executes queries against the schema defined in the database component.
When scaffolding a database component, the following config section is added to `components/config/`:
database-{name}:
host: localhost
port: 5432
name: appdb
user: app
passwordSecret: db-credentials
pool: 10export type DatabaseConfig = Readonly<{
host: string;
port: number;
name: string;
user: string;
passwordSecret: string;
pool: number;
}>;{
"database-{name}": {
"type": "object",
"properties": {
"host": { "type": "string" },
"port": { "type": "number", "default": 5432 },
"name": { "type": "string" },
"user": { "type": "string" },
"passwordSecret": { "type": "string" },
"pool": { "type": "number", "default": 10 }
},
"required": ["host", "port", "name", "user", "passwordSecret"]
}
}---
To scaffold a database component, build a spec and invoke the engine:
<plugin-root>/fullstack-typescript/system/system-run.sh scaffolding apply --spec spec.json
| Variable | Source | |----------|--------| | `PROJECT_NAME` | From `sdd-settings.yaml` project name |
{
"target_dir": "<project-root>",
"base_dir": "<plugin-root>/skills",
"variables": { "PROJECT_NAME": "<project-name>" },
"operations": [
{
"type": "template_dir",
"source": "components/database/database-scaffolding/templates",
"dest": "components/databases/<database-name>"
}
]
}No conditions needed.
Schema: [`schemas/input.schema.json`](./schemas/input.schema.json)
Accepts database name and optional project name for migration and seed template generation.
Schema: [`schemas/output.schema.json`](./schemas/output.schema.json)
Returns the scaffolding engine result: created files, directories, and scripts; skipped paths; errors; and a human-readable summary.
Structure for AI-assisted development AI coding assistants are powerful but chaotic. You prompt, you get code, but then what?
Repo: LiorCohen/sdd
Standards for authoring SDD plugin agents — frontmatter, self-containment, skill references, and no-user-interaction rules.
Standards for authoring SDD plugin commands — frontmatter, user interaction, skill/agent invocation, CLI integration, and output formatting.
Create a commit following repository guidelines with proper versioning and changelog updates.
Two-step self-review at every task lifecycle phase. Step 1 (this skill) runs in-context to gather session signals — files read vs grepped, user pushback, build…
D2 diagramming language reference for architecture diagrams, sequence diagrams, grid layouts, SQL tables, and class diagrams. Produces .d2 files rendered via…
Writes and maintains user-facing documentation for the SDD plugin. Proactively detects when docs are out of sync with plugin capabilities.