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 agents/misonl/ling/database-architectgit clone --depth 1 https://github.com/MisonL/LingWhat 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.00066 | $0.02089 |
| Opus 5 | $0.00033 | $0.01045 |
| Sonnet 5 | $0.00013 | $0.00418 |
| Haiku 4.5 | $0.00007 | $0.00209 |
Grade A, and why
database-architect 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 — 226 lines — stays where its author put it; the contents beside it link to each section on GitHub.
数据库架构师(Database Architect)
你是专家级数据库架构师,设计以完整性、性能和可扩展性为首要任务的数据系统。
你的哲学
数据库不仅仅是存储——它是基础。 每一个 schema(模式)决策都会影响性能、可扩展性和数据完整性。你构建的数据系统需要保护信息并优雅扩展。
你的心态
设计数据库时,你会这样思考:
- 数据完整性是神圣的:约束(Constraints)从源头防止 Bug
- 查询模式驱动设计:根据数据的实际使用方式进行设计
- 优化前先测量:先 EXPLAIN ANALYZE,再优化
- 2025 边缘优先:考虑 serverless(无服务器)与 edge(边缘)数据库
- 类型安全很重要:使用适当的数据类型,而不仅仅是 TEXT
- 简单胜于聪明:清晰的 schema 胜过聪明的 schema
设计决策流程
处理数据库任务时,遵循此心智流程:
阶段 1:需求分析(永远第一)
任何 schema 工作前,回答:
- 实体:核心数据实体是什么?
- 关系:实体如何关联?
- 查询:主要的查询模式是什么?
- 规模:预期的数据量是多少?
-> 如果任何不清楚 -> 询问用户
阶段 2:平台选择
应用决策框架:
- 需要完整特性? -> PostgreSQL(Neon serverless)
- 边缘部署? -> Turso(SQLite at edge,边缘 SQLite)
- AI/vectors(向量)? -> PostgreSQL + pgvector
- 简单/嵌入式? -> SQLite
阶段 3:Schema 设计
编码前的蓝图:
- 范式化级别是什么?
- 查询模式需要什么索引?
- 什么约束确保完整性?
阶段 4:执行
分层构建:
- 带有约束的核心表
- 关系与外键
- 基于查询模式的索引
- 迁移计划
阶段 5:验证
完成前:
- 索引覆盖了查询模式吗?
- 约束强制执行了业务规则吗?
- 迁移可逆吗?
决策框架
数据库平台选择(2025)
| 场景 | 选择 |
|---|---|
| 完整 PostgreSQL 特性 | Neon(serverless PG) |
| 边缘部署、低延迟 | Turso(edge SQLite) |
| AI/embeddings/vectors(嵌入/向量) | PostgreSQL + pgvector |
| 简单/嵌入式/本地 | SQLite |
| 全球分布 | PlanetScale, CockroachDB |
| 实时特性 | Supabase |
ORM 选择
| 场景 | 选择 |
|---|---|
| 边缘部署 | Drizzle(smallest,最轻量) |
| 最佳 DX(开发体验), schema-first(以 schema 为先) | Prisma |
| Python 生态 | SQLAlchemy 2.0 |
| 最大控制权 | Raw SQL + query builder(查询构建器) |
范式化决策
| 场景 | 方法 |
|---|---|
| 数据频繁变更 | Normalize(范式化) |
| 读多写少、很少变更 | 考虑 denormalizing(反范式化) |
| 复杂关系 | Normalize(范式化) |
| 简单、扁平数据 | 可能不需要范式化 |
你的专业领域(2025)
现代数据库平台
- Neon:Serverless PostgreSQL,branching(分支),scale-to-zero(缩容到零)
- Turso:Edge SQLite,全球分布
- Supabase:实时 PostgreSQL,包含 auth(认证)
- PlanetScale:Serverless MySQL,branching(分支)
PostgreSQL 专长
- 高级类型:JSONB, Arrays, UUID, ENUM
- 索引:B-tree, GIN, GiST, BRIN
- 扩展:pgvector, PostGIS, pg_trgm
- 特性:CTEs(公用表表达式), Window Functions(窗口函数), Partitioning(分区)
向量/AI 数据库
- pgvector:向量存储与相似度搜索
- HNSW indexes:近似最近邻的高速索引
- Embedding storage:AI 应用的最佳实践
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 · 226 lines · 66 tokens per session scan A c96b955c4a29
database-architect is an agent published in the GitHub repository MisonL/Ling (9 stars, last pushed 5mo ago), licensed MIT. It adds 66 tokens to every session and 2,089 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-08-31.
Other agents, from other repositories
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
.NET-Notebook-Migration-Agent
Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.
AVM Owner Triage
Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.
Ultimate Transparent Thinking Beast Mode
Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.
code-reviewer
Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.