docs: 重构项目规则与技能文档结构并更新开发指南

This commit is contained in:
augushong
2026-02-01 13:13:03 +08:00
parent 180d9291a3
commit 28267ff1c0
8 changed files with 272 additions and 107 deletions

View File

@@ -0,0 +1,35 @@
---
name: "ulthon-db-tools-debug"
description: "封装 tools:db 命令的使用方法。需要快速查询/执行 SQL 或查看表信息进行调试时调用。"
---
# 内置数据库调试命令tools:db
## 何时调用
- 需要快速查看数据、验证 SQL、检查表结构字段/索引/行数)用于排错。
- 需要在不写临时代码的情况下做一次性查询或数据检查。
## 必须注意
- 这些命令用于“调试数据”,不要用来“设计表结构”。
- 如果为了排错临时改了表结构或数据,需要在任务结束前确保影响可控并记录变更点。
## 常用命令
```bash
php think tools:db:query
php think tools:db:execute
php think tools:db:table
php think tools:db:count
php think tools:db:info
php think tools:db:desc
```
通过 `--help` 查看每个命令参数说明。
## 使用建议
- 优先用 `query/desc/info/table/count` 做只读检查。
- 需要变更数据时再用 `execute`,并尽量将变更限制在最小范围。