flisk-data
Skill4 starsChanged 33 days agoMITView on GitHub
Reset, seed, snapshot and restore the data in a Flisk project's shared local Postgres - wipe everything, drop one stack's database, run a seed job, or pg_dump and pg_restore a database. Use when the user needs a clean database, reproducible seed data, or to keep state across experiments. To add a database to a service or set up migrations, use flisk-databases.
- Reads credentials
- Deletes or force-pushes
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-databasesSkill
- 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
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
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 41
Seed: run the seed as a one-shot bring-your-own job (flisk resource seed --type bring-your-own --dockerfile ./Dockerfile --restart no …
- Very specific: line 52
Never commit dumps, local data or .env.
≈ “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
Local data: reset, seed, snapshot
Flisk runs one Postgres container per project. Each stack has its own database in it, shared by that stack's services.
Find the names
| Thing | Name (<project> and <stack> with - replaced by _) |
| Container | <project>_postgres |
| Superuser | <project> (password: DB_PASSWORD in the project .env) |
| Database | <project>_<stack> |
| Volume | database-management_<project>_postgres_data |
| Host port | 15432, or FLISK_POSTGRES_PORT |
<project> is project.name in .flisk/project.json. Confirm on the machine: docker volume ls | grep postgres_data, and docker exec <project>_postgres psql -U <project> -d postgres -c '\l'.
Workflow
- Everything from scratch (all stacks lose their data):
flisk down docker volume rm database-management_<project>_postgres_data flisk up - One stack's database (Postgres must be running):
It comes back empty; migrations run again only when the migrator runs again (docker exec <project>_postgres psql -U <project> -d postgres -c "DROP DATABASE <project>_<stack> WITH (FORCE)" docker exec <project>_postgres createdb -U <project> -O <project> <project>_<stack>flisk up, orflisk restart <name>-migrator). - Seed: run the seed as a one-shot bring-your-own job (
flisk resource seed --type bring-your-own --dockerfile ./Dockerfile --restart no --stack <stack> --yes) that depends on the migrator, and make it idempotent. - Snapshot and restore:
docker exec <project>_postgres pg_dump -U <project> -Fc <project>_<stack> > <stack>.dump docker exec -i <project>_postgres pg_restore -U <project> -d <project>_<stack> --clean --if-exists --no-owner < <stack>.dump
Guardrails
- Volumes survive
flisk downby design;flisk down --prune-networksremoves networks, not volumes. Ask before removing a volume. - Flisk has no
db resetordb seedcommand; use the steps above. - Never commit dumps, local data or
.env. Anonymise any dump that comes from production. - Details and a worked seed example: docs/data.md.
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.

