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 rules/weatherpal-ai/mcp-handle/tddgit clone --depth 1 https://github.com/WeatherPal-AI/MCP-handleWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/weatherpal-ai/mcp-handle/tdd)<a href="https://agentmods.dev/rules/weatherpal-ai/mcp-handle/tdd"><img src="https://agentmods.dev/badge/rules/weatherpal-ai/mcp-handle/tdd.svg" alt="Measured on agentmods" height="20"></a>What 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.1 | $0.00000 | $0.01946 |
| Opus 5 | $0.00000 | $0.00973 |
| Sonnet 5 | $0.00000 | $0.00389 |
| Haiku 4.5 | $0.00000 | $0.00195 |
Grade A, and why
tdd scanned grade A with 1 finding 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 6d ago.
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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- API status endpoint: `curl "http://localhost:3003/api/status"` This is a copy
88% identical to tdd — 20 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test-Driven Development (TDD)
Final Verification:
Always use: go test -v ./backend/api/handler/... | grep FAIL
Debugging & Handling Verbose Output:
Avoid go test -v ./... directly in the terminal due to excessive output.
Recommended Alternatives:
- Specific Tests:
go test -v ./... -run ^TestSpecificFunction$(Fastest for pinpointing).
Project Startup and Logging Rules
Service Startup:
- Use
bash ./run.shto start the mcp-handle-status service - This script automatically loads .env, ensures PATH, kills port 3000 processes, and starts the Go backend in background
- Logs are output to
backend.log
Log Monitoring:
- Use
tail -f backend.logto monitor real-time logs - Use
tail -n 50 backend.logto view recent log entries - Use
grep "ERROR\|WARN\|Failed" backend.logto filter error messages Service Management: - Use
pkill -f mcp-handle-statusto stop the service - Check service status with
ps aux | grep mcp-handle-status | grep -v grep - API status endpoint:
curl "http://localhost:3003/api/status"
数据库重置和缓存管理
数据库重置规则:
- 重要: 删除数据库前必须先备份:
cp data/mcp-handle-status.db data/mcp-handle-status.db.backup.$(date +%Y%m%d_%H%M%S) - 仅删除数据库文件
rm -f data/mcp-handle-status.db是不够的 - 必须同时清理Redis缓存:
redis-cli flushdb或redis-cli flushall - 原因:用户列表查询有缓存机制,如果缓存中存在用户数据,系统不会创建新的root用户
完整的数据库重置流程:
# 1. 停止服务
pkill -f mcp-handle-status
# 2. 备份现有数据库
cp data/mcp-handle-status.db data/mcp-handle-status.db.backup.$(date +%Y%m%d_%H%M%S)
# 3. 删除数据库文件
rm -f data/mcp-handle-status.db
# 4. 清理Redis缓存
redis-cli flushdb
# 5. 重新启动服务
bash ./run.sh
验证root用户创建:
- 查看日志:
grep "no user exists\|create a root user" backend.log - 检查数据库:
sqlite3 data/mcp-handle-status.db "SELECT id, username, LENGTH(token) as token_length FROM users;"
前端API调用规范
API路径构建:
- 当使用
frontend/src/utils/api.ts中导出的api实例进行API调用时 (例如api.get,api.post等),请勿在请求路径中再次添加/api前缀。 - 这是因为
api实例的baseURL已经被配置为/api,重复添加会导致/api/api/这样的错误路径。 - 正确示例:
api.get('/user/self')或api.post('/user', data)。 - 错误示例:
api.get('/api/user/self')。
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.
- 6d ago First seen · 131 lines · 1,946 tokens per session scan A de8ddcdce31f
tdd is a cursor rule published in the GitHub repository WeatherPal-AI/MCP-handle (254 stars, last pushed 10mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,946 tokens. A static security scan graded it A with 1 finding (makes network calls). It is 88% identical to tdd, differing in 20 lines, and is treated as a copy.
Other cursor rules, from other repositories
proactive-skills.design-checkpoint
UI / design 工作的 Design Checkpoint、design skill 觸發順序、Design Review template、Design Gate、Cross-Change holistic review 與非 UI exception;動 UI 檔或寫 design artifact 時 path-scoped 載入.
follow-up-register
Follow-up Register 規則——強制 tasks.md 的未解決項目使用 @followup[TD-xxx] marker 並在 docs/tech-debt.md 留下可追蹤 entry;archive gate 攔截未登記 marker.
query-optimization
查詢優化、EXPLAIN、index 設計與 RLS 效能測量.
skill-management
🔒 LOCKED — managed by clade Source: rules/core/skill-management.md Edit at: $CLADEHOME Local edits will be reverted by the next sync. -->.
security-policy
🔒 LOCKED — managed by clade Source: rules/core/security-policy.md Edit at: $CLADEHOME Local edits will be reverted by the next sync. -->.
mcpnuke-tests
Test conventions for mcpnuke — enforces TDD workflow.