<< All versions

Skill v1.0.0

currentAutomated scan100/100
voidvec/drogon-claude-plugin/drogon-gen-db-config
──Details
PublishedNovember 17, 2026 at 02:34 PM
Content Hashsha256:ae3c1bd1d8a67ae3...
Git SHA67b2a1a33e23
──Files
Files (1 file, 1.3 KB)
SKILL.md1.3 KBactive
SKILL.md · 42 lines · 1.3 KB

name: drogon-gen-db-config description: 需要配置 drogon 数据库连接(db_clients)时,生成 PostgreSQL / MySQL / SQLite3 的 config.json 片段,含键名与 SQL 注入防护纪律。 license: MIT metadata: version: "1.0.0"


drogon-gen-db-config

生成 drogon 项目的数据库配置(config.json 片段)。

使用场景

当需要配置数据库连接时,使用此技能快速生成符合 drogon 约定的数据库配置。

输入参数

  • db_type: 数据库类型(postgresql、mysql、sqlite3)
  • name: 客户端名称(默认 default)
  • host: 主机地址(PostgreSQL/MySQL)
  • port: 端口(PostgreSQL/MySQL)
  • dbname: 数据库名(PostgreSQL/MySQL)
  • filename: 文件路径(SQLite)
  • user: 用户名(PostgreSQL/MySQL)
  • passwd: 密码(PostgreSQL/MySQL)
  • connection_number: 连接数(默认 1,不是 10——想要 N 条连接必须显式写出来)

输出

生成 config.json 片段,包含正确的 db_clients 配置。

示例

/drogon-gen-db-config db_type=postgresql host=localhost port=5432 dbname=mydb user=postgres

生成 PostgreSQL 配置片段。

参考文件

详细实现指南见 references/code-guide.md(含参数验证、代码模板、禁止模式清单)。生成代码前先读取该文件。

All versions