Borrowing it
Nothing to install: this file belongs to congwa/mobile-agent. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/congwa/mobile-agent/master/.windsurf/skills/run-tests/SKILL.mdgit clone --depth 1 https://github.com/congwa/mobile-agentWrote 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/skills/congwa/mobile-agent/run-tests)<a href="https://agentmods.dev/skills/congwa/mobile-agent/run-tests"><img src="https://agentmods.dev/badge/skills/congwa/mobile-agent/run-tests/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/congwa/mobile-agent/run-tests"><img src="https://agentmods.dev/badge/skills/congwa/mobile-agent/run-tests.svg" alt="Reviewed on agentmods" width="80" 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.00137 | $0.01849 |
| Opus 5.5 | $0.00055 | $0.00740 |
| Sonnet 5.5 | $0.00027 | $0.00370 |
| Haiku 4.5 | $0.00014 | $0.00185 |
Grade A, and why
run-tests scanned grade A with 0 findings 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 1mo 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 255 lines — stays where its author put it; the contents beside it link to each section on GitHub.
后端测试验证规则
一、强制要求
当修改后端代码时,必须遵循以下规则:
-
新功能必须有测试
- 每个新增的函数/类必须有对应的单元测试
- 测试文件放在
backend/tests/对应目录下 - 测试函数命名:
test_<功能名>_<场景>
-
修改代码必须同步更新测试
- 修改业务逻辑后,必须检查并更新相关测试用例
- 如果修改导致测试失败,需判断是代码 bug 还是测试需要更新
- 业务变更 → 更新测试用例
- 代码 bug → 修复代码
-
测试必须全部通过
- 功能完成的标准:所有相关测试通过
- 不允许跳过或注释掉失败的测试
-
测试用例必须反映最新业务
- 测试用例应该与当前业务逻辑保持一致
- 修改功能时,同时更新测试的预期结果
二、验证命令
2.1 测试命令
# 运行所有测试
cd backend && uv run pytest tests/ -v
# 运行特定模块测试
cd backend && uv run pytest tests/<module>/ -v
# 运行单个测试文件
cd backend && uv run pytest tests/<module>/test_<name>.py -v
# 运行匹配名称的测试
cd backend && uv run pytest -k "<pattern>" -v
2.2 代码质量检查(必须)
# 测试通过后,必须运行 ruff 检查并自动修复
cd backend && uv run ruff check --fix
# 如果有无法自动修复的问题,手动修复后重新检查
cd backend && uv run ruff check
注意:测试通过 + ruff 检查通过,才算代码验证完成。
三、测试目录结构
backend/tests/
├── conftest.py # 共享 fixtures
├── core/ # 核心模块测试
│ ├── test_config.py
│ └── test_errors.py
├── models/ # 数据模型测试
│ └── test_conversation.py
├── repositories/ # 仓库层测试
│ └── test_base.py
├── schemas/ # Schema 测试
│ ├── test_agent.py
│ ├── test_chat.py
│ ├── test_events.py
│ └── test_websocket.py
└── services/ # 服务层测试
├── test_conversation.py
└── test_streaming.py
四、工作流程
4.1 新增功能时
-
先写测试(推荐 TDD)
# tests/services/test_new_feature.py def test_new_feature_basic(): """测试新功能的基本场景""" result = new_feature(input) assert result == expected def test_new_feature_edge_case(): """测试边界情况""" ... def test_new_feature_error_handling(): """测试错误处理""" with pytest.raises(ExpectedError): new_feature(invalid_input) -
实现功能代码
-
运行测试验证
cd backend && uv run pytest tests/services/test_new_feature.py -v -
测试通过后才算完成
4.2 修改现有功能时
- 先找到相关测试文件
# 搜索相关测试 grep -r "test_<功能名>" backend/tests/
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.
- 1mo ago First seen · 255 lines · 137 tokens per session scan A 93c47ccd067c
run-tests is a skill published in the GitHub repository congwa/mobile-agent (51 stars, last pushed 8mo ago), licensed Apache-2.0. It adds 137 tokens to every session and 1,849 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
server-side-calls
Call tRPC procedures directly from server code using t.createCallerFactory() and router.createCaller(context) for integration testing, internal server logic, and custom API endpoints. Catch TRPCError and extract HTTP status with getHTTPStatusCodeFromError(). Error handling via onError option.
mem0-test-integration
Verify a Mem0 integration produced by /mem0-integrate. Runs in the same workspace on the same branch (loose coupling) — installs dependencies, runs the repo's native test suite, then exercises a real end-to-end smoke flow against the user's API key. Produces a scorecard. TRIGGER when: user has just run /mem0-integrate…
prowler-test-api
Testing patterns for Prowler API: JSON:API, Celery tasks, RLS isolation, RBAC. Trigger: When writing tests for api/ (JSON:API requests/assertions, cross-tenant isolation, RBAC, Celery tasks, viewsets/serializers).
python-sdk
Implement or modify Python SDK behavior under python/composio, including tools, toolkits, sessions, auth configs, connected accounts, client integration, and shared Python models. Use for Python core runtime/API work; pair with python-testing and cross-sdk-parity when TypeScript must match.
convex-test
Generate convex-test tests for the app's Convex functions.
voiden
Create and edit Voiden .void files for API testing. Covers the .void file format and all enabled extension block types.