agentleFS
sentineldesksentineldesk/agent/skills/databases/SKILL.md

databases

Skill0 starsChanged 3 months agoApache-2.0View on GitHub

Work with SQL and NoSQL databases from this desktop — PostgreSQL, MySQL/MariaDB, SQLite, MongoDB, Redis — connecting, querying, checking health, dumping and restoring. Use when the task involves a database, a query, a backup, or a service that will not start because its store is unhappy.

19 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use Problem-Solving Techniques, markdown-novel-viewer and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • truongtv22Skill

    Problem-Solving Techniques

    Apply systematic problem-solving techniques for complexity spirals (simplification cascades), innovation blocks (collision-zone thinking), recurring patterns (meta-pattern recognition), assumption constraints (inversion exercise), scale uncertainty (scale game), and dispatch when stuck. Techniques derived from Microsoft Amplifier project patterns adapted for immediate application.

    Also in 5 projects that use this

  • OpenAnalystIncSkill

    markdown-novel-viewer

    Also in 3 projects that use this

  • truongtv22Skill

    mobile-development

    Build modern mobile applications with React Native, Flutter, Swift/SwiftUI, and Kotlin/Jetpack Compose. Covers mobile-first design principles, performance optimization (battery, memory, network), offline-first architecture, platform-specific guidelines (iOS HIG, Material Design), testing strategies, security best practices, accessibility, app store deployment, and mobile development mindset. Use when building mobile apps, implementing mobile UX patterns, optimizing for mobile constraints, or making native vs cross-platform decisions.

    Also in 5 projects that use this

  • AWSSkill

    planning

    Discovers user intent and generates a structured, step-by-step plan for model customization workflows. This skill must always be activated alongside any other skill when the user's request relates to model customization — including fine-tuning, training, building, customizing, reviewing data, or getting advice on approach, regardless of domain. Do not skip this skill even if the immediate ask is narrow (e.g., reviewing data format or a single workflow step), because planning discovers the full scope of work needed. Also activate when the user wants to resume, continue, or modify an existing plan.

    Also in 5 projects that use this

  • AnthropicSkill

    architecture

    Create or evaluate an architecture decision record (ADR). Use when choosing between technologies (e.g., Kafka vs SQS), documenting a design decision with trade-offs and consequences, reviewing a system design proposal, or designing a new component from requirements and constraints.

    Also in 4 projects that use this

  • carapace-shSkill

    git

    Use when working with Git — object model, references, index, branching, merging, rebasing, remotes, diffs, config, hooks, worktrees, submodules, and plumbing commands. Triggers on: "git", "git branch", "git commit", "git merge", "git rebase", "git checkout", "git stash", "git reset", "git submodule", "git worktree", "git blame", "git bisect", "git reflog", "git hooks", "git config".

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 17 edited versions we read keep these.

  • 1

    Distinctive

    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
  1. Distinctive:

    Every client takes a password on the command line and every one of them is wrong here: it lands in the conversation, the transcript and the …

    line 21
  2. Very specific:

    If none of that is set up, that is an ask_human: have the person configure the credential file, or run the one command that needs it.

    line 31

“Common” is measured: kept by at least 6 in 10 of the 17 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

The rule that outranks everything else here

A write you cannot undo needs a backup you have verified. Not "there is a backup job" — a dump file, with today's date, whose size is not zero. Before any DROP, TRUNCATE, DELETE without a WHERE, schema migration or restore: take one, name it, and say where it is. This is the one domain where the mistake is measured in somebody's business rather than in a reinstall.

Connecting without putting a password in an argument

Every client takes a password on the command line and every one of them is wrong here: it lands in the conversation, the transcript and the action log permanently. Use the mechanisms built for this:

  • PostgreSQL — ~/.pgpass (mode 0600), or PGPASSWORD set inside a single bash -c you do not echo. Better: peer auth as the right user, run_command "sudo -u postgres psql -c '\\l'".
  • MySQL/MariaDB — ~/.my.cnf with a [client] section, mode 0600.
  • MongoDB / Redis — a URI in a file the client reads, not on argv.

If none of that is set up, that is an ask_human: have the person configure the credential file, or run the one command that needs it. See the rule in your system prompt.

Reading before writing

  • Is it even up? service_control postgresql status, then the port: run_command "ss -tulpn | grep -E '5432|3306|27017|6379'". A database that is running and not listening on the interface you expect is a config problem, not a database problem.
  • Can I connect? psql -c 'SELECT 1', mysql -e 'SELECT 1', redis-cli ping, mongosh --eval 'db.runCommand({ping:1})'. One round trip that answers completely beats guessing from a log.
  • Where is the data and is there room? A full partition presents as every kind of database error. run_command "df -h" early.

Queries

Non-interactive always — psql -c, mysql -e, mongosh --eval. An interactive client without a TTY hangs waiting for input nobody can send.

Put a LIMIT on anything exploratory. A SELECT * on a large table pulls the whole thing into the conversation and gets spilled to a locator you then have to page through — you paid for the transfer and learned nothing faster. Count first (SELECT count(*)), then look at a slice.

Read a write before you run it. Wrap a destructive statement in a transaction and inspect it: BEGIN; DELETE ...; SELECT count(*) FROM ...; and ROLLBACK unless the number is what you expected. On MySQL check the storage engine first — MyISAM has no transactions, so there is no rollback to reach for.

Dumps and restores are jobs

job_start   pg_dump -Fc mydb -f /tmp/mydb-2026-08-24.dump
job_wait

Then check the artifact: list_directory for a non-zero size, and for a custom-format dump pg_restore -l to prove it is readable. A dump that returned ok and is 0 bytes is the failure this project ranks worst, and it is only discovered when somebody needs it.

mysqldump --single-transaction for InnoDB so the dump is consistent without locking the site. mongodump/mongorestore. Redis persists with BGSAVE and the file is dump.rdb where the config says.

When it will not start

The journal, not the guesses: journalctl -u postgresql -n 100 --no-pager. The four usual causes are a full disk, a permission on the data directory, a port already taken by an old process, and a config file edited with a typo — postgres -C and mysqld --validate-config check the last one without starting anything.

Download now (ZIP)

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.