mcpField
D
dao-best-practice

dao-best-practice

github.com/forge-townDevelopment736 installsUpdated 8w ago
Repository

About dao-best-practice

A conventions skill for creating and modifying DAO write methods. It directs developers to a best-practice guide, template, and checklist, then requires assessing table scope; multi-table writes must invoke the repository-best-practice skill.

Key features

  1. 01Defines a process for DAO write methods
  2. 02Uses a guide, template, and checklist
  3. 03Requires assessment of tables affected by writes
  4. 04Routes multi-table writes to the Repository skill
  5. 05Requires an optional tx parameter for single-table methods

Use cases

  1. 01Create a DAO write method following project conventions
  2. 02Assess table scope after changing a write method
  3. 03Create a Repository for a multi-table write
  4. 04Check optional transaction support on single-table methods

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/forge-town/skills --skill dao-best-practice

After installing, type/dao-best-practicein Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

best-practice-examples/
usersDao.ts
references/
checklist.md
dao-best-practice.md
template-dao.ts

Details

From the project README

DAO规范化技能

使用说明

  1. 阅读 DAO最佳实践指南 了解规范
  2. 参考 代码模板
  3. 使用 检查清单 验证

⚠️ 强制后置步骤:Repository 评估

每次完成 DAO 写方法创建或修改后,强制评估:写操作是否涉及多张表?

  • 否(单表) → 流程结束,确保方法签名含可选 tx 参数即可
  • 是(跨表) → 必须触发 repository-best-practice 技能,为该写操作创建 Repository

此评估不可跳过

Comments

Markdown supported