59 lines
2.2 KiB
Markdown
59 lines
2.2 KiB
Markdown
# TOOLS.md - Local Notes
|
||
|
||
Skills define _how_ tools work. This file is for _your_ specifics — the stuff that's unique to your setup: camera names and locations, SSH hosts and aliases, preferred TTS voices, speaker/room names, device nicknames, anything environment-specific.
|
||
|
||
### MySQL 连接
|
||
- **默认 → VPS**: `101.34.227.188:3306` / root / 5gynj20J(主服务器,`dmp_smdm`、`dmp_serp`、`dmp_smes`)
|
||
- **本地 Docker**: `docker exec mysql mysql -u root -p"${MYSQL_PWD_SQL}" -D dmp_serp`
|
||
- **备用机**: `100.115.195.191:3306` / root / 5gynj20J(库:dmp_smdm、dmp_serp、dmp_smes 等)
|
||
- **密码环境变量**: `MYSQL_PWD_SQL=5gynj20J`(来自 .env)
|
||
- ⚠️ **优先使用本地 mysql 客户端直接连接**,不要每次都用 `docker exec`。
|
||
- ⚠️ **默认数据库连接串**: `mysql -h 101.34.227.188 -u root -p"${MYSQL_PWD_SQL}"`
|
||
|
||
## 🔴 红线(不可违反)
|
||
|
||
1. **🚫 绝不直接执行 SQL 操作数据库!**
|
||
- 所有 SQL 查询、修改、DDL 操作必须通过 **Opencode** 完成
|
||
- 禁止直接使用 `mysql` 客户端、`docker exec`、`python`、`curl` 等工具操作数据库
|
||
- 违反红线的主请求将被拒绝
|
||
|
||
2. **Opencode 配置:**
|
||
- 默认 provider: `newapi`(http://100.115.195.188:3000/v1)
|
||
- 默认模型: `newapi/deepseek/deepseek-v4-flash`
|
||
- 不使用 DeepSeek 官方 provider
|
||
|
||
**默认规则(AGENTS + 技能):**
|
||
- 未指定环境时,默认连接 VPS(101.34.227.188)
|
||
- 脚本表名必须带库前缀(`dmp_xxx.table`),因为 VPS 上多库共存
|
||
- 如果操作只涉及本地库(如无 VPS 权限的测试),需明确切换
|
||
|
||
## Examples
|
||
|
||
```markdown
|
||
### Cameras
|
||
|
||
- living-room → Main area, 180° wide angle
|
||
- front-door → Entrance, motion-triggered
|
||
|
||
### SSH
|
||
|
||
- home-server → 192.168.1.100, user: admin
|
||
|
||
### TTS
|
||
|
||
- Preferred voice: "Nova" (warm, slightly British)
|
||
- Default speaker: Kitchen HomePod
|
||
```
|
||
|
||
## Why Separate?
|
||
|
||
Skills are shared. Your setup is yours. Keeping them apart means you can update skills without losing your notes, and share skills without leaking your infrastructure.
|
||
|
||
---
|
||
|
||
Add whatever helps you do your job. This is your cheat sheet.
|
||
|
||
## Related
|
||
|
||
- [Agent workspace](/concepts/agent-workspace)
|