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 agentmods add skills/subhansh-dev/agent-maxxing/database-patternsnpx skills add subhansh-dev/agent-maxxing --skill database-patternsgit clone --depth 1 https://github.com/subhansh-dev/agent-maxxingWhat 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 | $0.00018 | $0.00539 |
| Opus 5 | $0.00009 | $0.00269 |
| Sonnet 5 | $0.00004 | $0.00108 |
| Haiku 4.5 | $0.00002 | $0.00054 |
Grade A, and why
database-patterns 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 yesterday.
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 — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Database Patterns
Schema Design
Naming
- Tables: plural, snake_case (
users,order_items) - Columns: snake_case (
created_at,user_id) - Primary keys:
id(auto-increment or UUID) - Foreign keys:
<table>_id(user_id,order_id) - Timestamps:
created_at,updated_at,deleted_at
Data Types
- Strings:
VARCHAR(n)for known max,TEXTfor unlimited - Numbers:
INTEGERfor whole numbers,DECIMAL(p,s)for money - Booleans:
BOOLEANorTINYINT(1) - Dates:
TIMESTAMPfor date+time,DATEfor date only - JSON:
JSONB(PostgreSQL) for flexible structure
Relationships
- One-to-many: foreign key on the many side
- Many-to-many: junction table
- One-to-one: foreign key with unique constraint
Indexing
When to Index
- Columns used in WHERE clauses
- Columns used in JOIN conditions
- Columns used in ORDER BY
- Columns with high cardinality (many unique values)
When NOT to Index
- Small tables (< 1000 rows)
- Columns with low cardinality (boolean, status)
- Columns that are frequently updated
- Tables with heavy write loads
Index Types
- B-tree: default, good for most queries
- Hash: exact match only, very fast
- GIN: full-text search, JSON queries
- Partial: index with WHERE clause
Migrations
Rules
- Every migration must be reversible
- Never modify a deployed migration
- Add columns as nullable first, then backfill
- Create index CONCURRENTLY in production
- Test migrations on a copy of production data
Safe Migration Pattern
-- Step 1: Add nullable column
ALTER TABLE users ADD COLUMN bio TEXT;
-- Step 2: Backfill
UPDATE users SET bio = '' WHERE bio IS NULL;
-- Step 3: Add NOT NULL constraint
ALTER TABLE users ALTER COLUMN bio SET NOT NULL;
Query Optimization
- Use EXPLAIN ANALYZE to check query plans
- Avoid SELECT * — select only needed columns
- Use LIMIT for large result sets
- Batch inserts instead of single inserts
- Use connection pooling
- Avoid N+1 queries — use JOINs or eager loading
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.
- yesterday First seen · 78 lines · 18 tokens per session scan A 2b924bcc43fc
database-patterns is a skill published in the GitHub repository subhansh-dev/agent-maxxing (2 stars, last pushed 1mo ago), licensed MIT. It adds 18 tokens to every session and 539 once invoked, about $0.0001 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-08-31.
Other skills, from other repositories
feishu
Work with Feishu or Lark bots, docs, sheets, bitables, approval flows, and OpenAPI/MCP setup without hardcoding credentials.
interview
Ask one useful structured question at a time only when material product/implementation choices are genuinely missing; remember answers and produce a brief/spec. Discoverable facts should be investigated instead of asked.
writing
将共享历史中的已验证事实和计算结果整理成符合受众、格式与长度约束的成稿。.
test
Detect the project’s test stack, run the narrowest useful tests, create tests when authorized, and report coverage/gaps honestly.
verify
Exercise the real app/API/CLI and collect observable evidence; tests alone do not count as end-to-end verification.
build-teaql-app
Build or change a TeaQL application in Java, Rust, Go, Swift, Python, C#/.NET, or TypeScript, including Kotlin/JVM applications that consume Java-generated libraries. Mandatory order: first draft and save a complete KSML model, then verify the client and evaluate that saved model, repair it through repeated evaluation…