database
Skill4 starsChanged 9 months agoMITView on GitHub
Database operations — PostgreSQL, MySQL, MongoDB, Redis queries
- Installs packages
We split this skill into the rules it gives an agent
5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 20 edited versions we read keep these.
2
Distinctive
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
- Distinctive: line 192
Use connection strings for complex auth
- Very specific: line 193
Use -c or -e for single queries
- Very specific: line 194
Use \d in psql to describe tables
- Very specific: line 195
Use .help in SQLite for commands
- Distinctive: line 196
Always backup before destructive operations
“Common” is measured: kept by at least 6 in 10 of the 20 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.
Files
Database
Interact with various databases using CLI tools.
Setup
# Check each tool
command -v psql # PostgreSQL
command -v mysql # MySQL
command -v mongosh # MongoDB
command -v redis-cli
command -v sqlite3
# Install PostgreSQL client — macOS: brew install libpq | Ubuntu: sudo apt install postgresql-client
# Install MySQL client — macOS: brew install mysql-client | Ubuntu: sudo apt install mysql-client
# Install MongoDB shell — macOS: brew install mongosh | Ubuntu: https://www.mongodb.com/try/download/shell
# Install Redis CLI — macOS: brew install redis | Ubuntu: sudo apt install redis-tools
# Install SQLite3 — macOS: brew install sqlite | Ubuntu: sudo apt install sqlite3
# For connection strings with passwords, use vault:
# vault_save postgres_url "postgresql://user:pass@host:5432/dbname"
# vault_save mysql_password "secret"
# Keys use lowercase_underscore; auto-inject as UPPERCASE env vars (e.g. $POSTGRES_URL)PostgreSQL
# Connect to database
psql -h localhost -U user -d dbname
# Connection string
psql "postgresql://user:pass@host:5432/dbname"
# Execute query
psql -h localhost -U user -d dbname -c "SELECT * FROM users LIMIT 10;"
# Execute from file
psql -f queries.sql
# List databases
psql -l
# List tables
psql -d dbname -c "\dt"
# Describe table
psql -d dbname -c "\d tablename"
# Export to CSV
psql -d dbname -c "COPY (SELECT * FROM users) TO STDOUT WITH CSV HEADER" > users.csv
# Import CSV
psql -d dbname -c "\COPY users FROM 'users.csv' WITH CSV HEADER"MySQL
# Connect
mysql -h localhost -u user -p dbname
# Execute query
mysql -h localhost -u user -p dbname -e "SELECT * FROM users LIMIT 10;"
# Execute from file
mysql -h localhost -u user -p dbname < queries.sql
# Export database
mysqldump -u user -p dbname > backup.sql
# Import database
mysql -u user -p dbname < backup.sql
# Export single table
mysqldump -u user -p dbname tablename > table.sqlMongoDB
# Connect
mongosh "mongodb://user:pass@host:27017/dbname"
# Or with connection string
mongosh "mongodb+srv://cluster.example.com/dbname" --username user
# Execute query (eval)
mongosh dbname --eval 'db.users.find().limit(10)'
# Export collection
mongoexport --uri="mongodb://host/dbname" --collection=users --out=users.json
# Import collection
mongoimport --uri="mongodb://host/dbname" --collection=users --file=users.json
# Dump database
mongodump --uri="mongodb://host/dbname" --out=backup/
# Restore database
mongorestore --uri="mongodb://host/dbname" backup/dbname/Redis
# Connect
redis-cli -h localhost -p 6379
# With password
redis-cli -h localhost -p 6379 -a password
# Execute command
redis-cli -h localhost GET mykey
# Set value
redis-cli -h localhost SET mykey "value"
# List all keys
redis-cli -h localhost KEYS '*'
# Get database info
redis-cli -h localhost INFO
# Monitor commands
redis-cli -h localhost MONITOR
# Export database
redis-cli -h localhost BGSAVE
# Get all key-value pairs
redis-cli -h localhost --scan | xargs -L 1 redis-cli -h localhost GETSQLite
# Connect
sqlite3 database.db
# Execute query
sqlite3 database.db "SELECT * FROM users LIMIT 10;"
# Import CSV
sqlite3 database.db -cmd ".mode csv" -cmd ".import users.csv users"
# Export to CSV
sqlite3 database.db -cmd ".mode csv" -cmd ".output users.csv" "SELECT * FROM users;"
# Dump database
sqlite3 database.db .dump > backup.sqlCommon Queries
# PostgreSQL - Create table
psql -d dbname -c "
CREATE TABLE users (
id SERIAL PRIMARY KEY,
name VARCHAR(100) NOT NULL,
email VARCHAR(255) UNIQUE,
created_at TIMESTAMP DEFAULT NOW()
);"
# MySQL - Create table
mysql -u user -p dbname -e "
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
email VARCHAR(255) UNIQUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);"
# MongoDB - Create index
mongosh dbname --eval 'db.users.createIndex({email: 1})'Tips
- Use connection strings for complex auth
- Use
-cor-efor single queries - Use
\din psql to describe tables - Use
.helpin SQLite for commands - Always backup before destructive operations
Triggers
database, postgres, mysql, mongodb, redis, sql, database query, psql, database connect
Other versions29 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 29
- gridaco/grida★ 2.7ksame name
- theopenco/llmgateway★ 1.7ksame name
- AsiaOstrich/universal-dev-standards★ 82same name
- msrv-tech/skills★ 60same name
- manu14357/Zelaxy★ 15same name
- darknecrocities/SkillBuilder★ 13same name
- YepAPI/skills★ 8same name
- The-Utopia-Studio/skills★ 6same name
- SecuringTheRealm/str-agentic-adventures★ 4same name
- umararshad4/honey-stack★ 4same name
19 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use monitoring, performance and 10 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.
rogue-dev-studioSkillmonitoring
Claude monitoring and usage tracking tools (UV, claude-monitor, claude-usage-cli). Use when the project needs this capability or the user / team manifest asks for it. Use for specialized `monitoring` work when listed in TEAM.yaml or explicitly requested.
Also in 3 projects that use this
klauswgSkillperformance
Optimize web performance for faster loading and better user experience. Use when asked to "speed up my site", "optimize performance", "reduce load time", "fix slow loading", "improve page speed", or "performance audit".
Also in 6 projects that use this
0xSeroSkillsecurity
Also in 10 projects that use this
mrgoonieSkilldevops
Deploy to Cloudflare (Workers, R2, D1), Docker, GCP (Cloud Run, GKE), Kubernetes (kubectl, Helm). Use for serverless, containers, CI/CD, GitOps, security audit.
Also in 4 projects that use this
JohnJBorenSkillci-cd
CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies
Also in 3 projects that use this
GitHubSkillstate-management
CoreAI Sandbox's TanStack Query + mock-JSON data layer. USE WHEN: editing data-fetching hooks (`app/hooks/use*.ts`), adding mock data in `app/data/`, or wiring a component to query state.
Also in 3 projects that use this
In this repository83 other files it gives its agents.
- a11y-axeSkill
- airtableSkill
- asanaSkill
- audio-ttsSkill
- aws-cliSkill
- azure-cliSkill
- backupSkill
- bookmarksSkill
- browser-automationSkill
- bundler-analyzeSkill
- calculatorSkill
- calendarSkill
- cargoSkill
- changelog-genSkill
- claude-codeSkill
- clickupSkill
- color-contrastSkill
- crypto-walletSkill
- discordSkill
- docker-composeSkill
- dockerSkill
- dora-metricsSkill
- emailSkill
- ffmpegSkill
- filesystemSkill
- gcloudSkill
- githubSkill
- gmailSkill
- gogSkill
- google-calendarSkill
- habitsSkill
- healthSkill
- hubspotSkill
- image-genSkill
- imagemagickSkill
- image-toolsSkill
- jiraSkill
- journalSkill
- kubernetesSkill
- lighthouseSkill
- linearSkill
- locationSkill
- media-configSkill
- meeting-notesSkill
- nginxSkill
- notesSkill
- notionSkill
- obsidianSkill
- ocrSkill
- pandocSkill
- paymentsSkill
- pdf-toolsSkill
- pip-poetrySkill
- pm2Skill
- pomodoroSkill
- project-managerSkill
- qr-codeSkill
- railway-deploySkill
- redis-cliSkill
- release-notesSkill
- The first 60 shown.
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.

