debug-local-db
Skill2 starsChanged 19 days agoApache-2.0View on GitHub
Debug database issues in local/ephemeral environments - PostgreSQL, SQLite, Podman containers. Use when user says "debug local DB", "local database", "PostgreSQL local", "SQLite workflow".
In this repository124 other files it gives its agents.
- add-projectSkill
- ansible-configure-vmSkill
- api-smoke-testSkill
- appinterface-checkSkill
- attach-session-to-jiraSkill
- aws-rds-debugSkill
- beerSkill
- bootstrap-all-knowledgeSkill
- bootstrap-knowledgeSkill
- build-persona-styleSkill
- cancel-pipelineSkill
- cert-checkSkill
- check-ci-healthSkill
- check-integration-testsSkill
- check-mr-feedbackSkill
- check-my-prsSkill
- check-secretsSkill
- ci-retrySkill
- cleanup-branchesSkill
- cleanup-stale-executionsSkill
- clone-jira-issueSkill
- close-issueSkill
- close-mrSkill
- cloud-inventorySkill
- coffeeSkill
- compare-optionsSkill
- create-jira-issueSkill
- create-mrSkill
- create-slide-deckSkill
- data-migration-verifySkill
- debug-prodSkill
- deploy-to-ephemeralSkill
- dev-workflow-orchestratorSkill
- discovered-work-summarySkill
- edit-slide-deckSkill
- email-digestSkill
- environment-overviewSkill
- explain-codeSkill
- export-presentationSkill
- extend-ephemeralSkill
- find-similar-codeSkill
- gather-contextSkill
- gdrive-researchSkill
- gke-cluster-opsSkill
- hello-worldSkill
- hotfixSkill
- inscope-researchSkill
- investigate-alertSkill
- investigate-service-issuesSkill
- investigate-slack-alertSkill
- jira-hygiene-allSkill
- jira-hygieneSkill
- knowledge-refreshSkill
- konflux-statusSkill
- learn-architectureSkill
- learn-patternSkill
- list-presentationsSkill
- local-build-testSkill
- local-dev-environmentSkill
- manage-local-servicesSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 40
If dump_schema: pg_dump() — full schema dump
- Distinctive: line 51
Check lock contention in locks output
- Distinctive: line 53
Check container logs for "fatal" or "error"
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Debug Local Database
Debug database issues in local or ephemeral environments. Uses Podman (not Docker) for container operations.
Inputs
| Input | Type | Default | Purpose |
database | string | "local" | local, ephemeral, workflow |
issue_description | string | "" | Issue description |
dump_schema | bool | false | Dump full schema for analysis |
Workflow
1. Bootstrap
persona_load("developer")— database and Podman toolscheck_known_issues("psql"),check_known_issues("podman"),check_known_issues("database")
2. Podman Container Checks
podman_logs(container="postgres")— database logspodman_exec(container="postgres", command="psql --version")— PostgreSQL version
3. PostgreSQL Checks
psql_connections()— active connectionspsql_activity()— current activitypsql_locks()— lock contentionpsql_size()— database sizepsql_tables()— list tablespsql_schemas()— list schemaspsql_query("SELECT pid, now() - pg_stat_activity.query_start AS duration, query, state FROM pg_stat_activity WHERE (now() - pg_stat_activity.query_start) > interval '5 seconds' ORDER BY duration DESC LIMIT 10;")— long-running queriespsql_describe(table="pg_stat_user_tables")— key tables- If
dump_schema:pg_dump()— full schema dump
4. SQLite (if database == "workflow")
sqlite_tables()— tablessqlite_schema()— schemasqlite_query("SELECT name, type FROM sqlite_master WHERE type='table' ORDER BY name;")— basic statssqlite_vacuum()— vacuum
5. Analysis
- Check lock contention in locks output
- Flag long-running queries (>5s)
- Check container logs for "fatal" or "error"
- Parse connection count; flag if > 50
6. Failure Learning
- "connection refused" →
learn_tool_fix("psql_connections", "connection refused", "PostgreSQL not running", "Start with podman start postgres") - "no such container" →
learn_tool_fix("podman_logs", "no such container", "Container does not exist", "Create with podman run -d --name postgres postgres:latest")
7. Memory
memory_session_log("Debug local database ({database})", "healthy=X, issues=Y")
Key MCP Tools
persona_load,check_known_issues,learn_tool_fix,memory_session_logpodman_logs,podman_execpsql_connections,psql_activity,psql_locks,psql_size,psql_tables,psql_schemas,psql_describe,psql_query,pg_dumpsqlite_tables,sqlite_schema,sqlite_query,sqlite_vacuum
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

