Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add latestaiagents/agent-skills --skill database-safetygit clone --depth 1 https://github.com/latestaiagents/agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/latestaiagents/agent-skills/database-safety)<a href="https://agentmods.dev/skills/latestaiagents/agent-skills/database-safety"><img src="https://agentmods.dev/badge/skills/latestaiagents/agent-skills/database-safety.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00063 | $0.02576 |
| Opus 5 | $0.00032 | $0.01288 |
| Sonnet 5 | $0.00013 | $0.00515 |
| Haiku 4.5 | $0.00006 | $0.00258 |
Grade A, and why
database-safety scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 401 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Database Safety
CRITICAL: Database operations can be irreversible. This skill prevents data catastrophes.
Danger Levels
| Level | Operations | Requires |
|---|---|---|
| ⛔ CRITICAL | DROP DATABASE, DROP TABLE, TRUNCATE | Backup + explicit confirmation |
| 🔴 HIGH | DELETE without WHERE, UPDATE without WHERE | Explicit confirmation + scope verification |
| 🟠 MEDIUM | DELETE with WHERE, UPDATE with WHERE | Scope verification + preview |
| 🟢 LOW | SELECT, INSERT, CREATE | Standard execution |
Pre-Operation Protocol
Before ANY Data Modification
Step 1: Identify the scope
-- Before DELETE: Count affected rows
SELECT COUNT(*) FROM users WHERE status = 'inactive';
-- Before UPDATE: Preview changes
SELECT id, current_value, 'new_value' as proposed_value
FROM table
WHERE condition;
-- Before DROP: Check foreign keys and dependencies
SELECT
tc.table_name,
kcu.column_name,
ccu.table_name AS foreign_table_name
FROM information_schema.table_constraints AS tc
JOIN information_schema.key_column_usage AS kcu
ON tc.constraint_name = kcu.constraint_name
WHERE tc.constraint_type = 'FOREIGN KEY'
AND ccu.table_name = 'table_to_drop';
Step 2: Present impact to user
## Database Operation Impact Assessment
**Operation:** DELETE FROM users WHERE last_login < '2023-01-01'
**Database:** production_db
**Environment:** production ⚠️
**Impact:**
- Rows to be deleted: 8,234
- Table total rows: 45,678
- Percentage affected: 18%
**Related data that may be affected:**
- orders table: 12,456 rows reference these users (CASCADE DELETE)
- sessions table: 3,234 active sessions will be invalidated
- audit_logs: Will retain 8,234 orphaned references
**This operation is IRREVERSIBLE without a backup.**
Do you want to proceed? Please confirm with the exact count: "yes, delete 8234 rows"
For Critical Operations
DROP TABLE
⛔ **CRITICAL: DROP TABLE REQUESTED**
**Command:** DROP TABLE legacy_users
**Current state:**
- Table exists: ✓
- Row count: 15,234
- Size on disk: 45.2 MB
- Foreign key references: 3 tables
- Last backup: 2024-01-15 09:00:00 (2 days ago)
**This will permanently delete:**
- 15,234 records
- All indexes (4)
- All constraints (7)
- All triggers (2)
**Cascade impact:**
- orders.user_id: 23,456 rows will have NULL user_id (SET NULL)
- comments.author_id: 8,901 rows will be deleted (CASCADE)
**Before proceeding, I will:**
1. Create a backup of this table
2. Export data to JSON/CSV for recovery
3. Document the table schema for recreation if needed
Proceed with backup and drop? Type "yes, drop legacy_users permanently" to confirm.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 401 lines · 63 tokens per session scan A 3e4a4f620363
database-safety is a skill published in the GitHub repository latestaiagents/agent-skills (5 stars, last pushed 4mo ago), licensed MIT. It adds 63 tokens to every session and 2,576 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
embeddings
Vector embeddings with HNSW indexing, sql.js persistence, and hyperbolic support. 75x faster with agentic-flow integration. Use when: semantic search, pattern matching, similarity queries, knowledge retrieval. Skip when: exact text matching, simple lookups, no semantic understanding needed.
chroma-integration
Chroma local vector database setup and operations for development and production.
AgentDB Performance Optimization
Optimize AgentDB performance with quantization (4-32x memory reduction), HNSW indexing (150x faster search), caching, and batch operations. Use when optimizing memory usage, improving search speed, or scaling to millions of vectors.
drizzle-orm-expert
Expert in Drizzle ORM for TypeScript — schema design, relational queries, migrations, and serverless database integration. Use when building type-safe database layers with Drizzle.
redis
Skill "redis" from dhaupin/vant, covering redis, when to use, what to do, 1. connect and 2. operations.
web-backend-builder
Scaffold backend API, data models, ORM setup, and endpoint inventory with OpenAPI output.