flisk-databases
Skill4 starsChanged 33 days agoMITView on GitHub
Give a Flisk service a database and migrations - scaffold a backend with `--feature prisma` (adds a `<name>-migrator` resource) or `--feature drizzle`, or run Atlas, Dbmate, TypeORM, MikroORM or another tool as a one-shot migrator job, and connect through the generated `DATABASE_URL`. Use when adding database access, ORM or migration tooling to a service, or when migrations or connections fail. To wipe, seed or snapshot existing data, use flisk-data.
- Reads credentials
In this repository37 other files it gives its agents.
- AGENTS.mdAGENTS.md
- llms.txtllms.txt
- flisk-agentsSkill
- flisk-benchmarkSkill
- flisk-build-runtimesSkill
- flisk-byoSkill
- flisk-contributingSkill
- flisk-dataSkill
- flisk-demo-bubblesSkill
- flisk-deploy-awsSkill
- flisk-deploy-azureSkill
- flisk-deploy-cloudflareSkill
- flisk-deploy-digitaloceanSkill
- flisk-deploy-flySkill
- flisk-deploy-gcpSkill
- flisk-deploy-herokuSkill
- flisk-deploy-railwaySkill
- flisk-deploy-renderSkill
- flisk-deploy-vercelSkill
- flisk-doctorSkill
- flisk-dry-runSkill
- flisk-frontendSkill
- flisk-generated-filesSkill
- flisk-helmSkill
- flisk-import-composeSkill
- flisk-import-procfileSkill
- flisk-layoutSkill
- flisk-portsSkill
- flisk-scaffoldSkill
- flisk-secretsSkill
- flisk-service-jsonSkill
- flisk-starlark-perfSkill
- flisk-troubleshootSkill
- flisk-uiSkill
- flisk-unfollowersSkill
- flisk-upgradeSkill
- layer-autoresearchSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are 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.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 13
Every Flisk project gets one shared Postgres.
- Distinctive: line 23
Run migrations in their own migrator resource, never from the API's start script.
- Very specific: line 24
Read the connection string from the environment (DATABASE_URL).
- Very specific: line 26
If a connection or migration fails, run flisk doctor (it checks DB_PASSWORD and DATABASE_URL in .env) and read the migrator's logs with …
- Distinctive: line 32
Do not commit secrets or local data.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.
Files
Databases and migrations
Every Flisk project gets one shared Postgres; you do not add one. Each stack gets its own database, and Compose sets each backend's DATABASE_URL to it.
Workflow
- Pick the tool when you scaffold the service:
For an existing service, addflisk resource orders-api --type backend --feature prisma --stack shop --yes # Prisma schema + orders-api-migrator flisk resource orders-api --type backend --feature drizzle --stack shop --yes # Drizzle client in src/db.ts + /health/db, no migrator"prisma"tofeaturesEnabledin itsservice.jsononce it has aprisma/schema.prisma. - Run migrations in their own migrator resource, never from the API's start script. Prisma gets one generated. For Drizzle, Atlas, Dbmate, TypeORM, MikroORM or Ptah, copy the matching one-shot job from examples/byo-jobs and register it with
--type bring-your-own --restart no. - Read the connection string from the environment (
DATABASE_URL); do not hard-code one. flisk up <stack>starts Postgres, then the migrator, then the services that depend on it.- If a connection or migration fails, run
flisk doctor(it checksDB_PASSWORDandDATABASE_URLin.env) and read the migrator's logs withflisk logs -s <name>-migrator.
Guardrails
- A service depends on Postgres through
dependsOn; list the migrator instead ofpostgreswhen it creates your tables. - The Postgres volume keeps the password it was created with; changing
DB_PASSWORDlater does not change it (see flisk-data to reset). - Do not commit secrets or local data.
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
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.

