mobile-agent: Skill for Windsurf

.windsurf/skills/run-tests/SKILL.md

run-tests is a skill for Windsurf from congwa/mobile-agent. It costs 137 tokens per session (1,849 once invoked), scanned A, original, Apache-2.0.

Backend testing rules for Python projects that use pytest, a Python testing tool, and Ruff, a Python code checker. They require tests and checks for backend changes.

In plain words
What is it for?
Use them when adding features, fixing bugs, or refactoring backend Python code: update tests, run pytest, and run Ruff checks.
Why use it?
They make code changes easier to verify by requiring updated tests and preventing unfinished or style-checked failures from being treated as complete.

Skill for Windsurf

Written for Windsurf: installed under .windsurf/.

This is congwa/mobile-agent's own configuration. It tells Windsurf how to work on mobile-agent itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mobile-agent configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/congwa/mobile-agent/master/.windsurf/skills/run-tests/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/congwa/mobile-agent

Made for: Windsurf.

Wrote 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.

agentmods badge for run-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/congwa/mobile-agent/run-tests/github.svg)](https://agentmods.dev/skills/congwa/mobile-agent/run-tests)
Your own site
<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.

agentmods 80×15 button for run-tests

Your own site · 80×15
<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>
Per session 137 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,849 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 1mo ago against content hash 93c47ccd067c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

.windsurf/skills/run-tests/SKILL.md · 255 lines

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.

后端测试验证规则

一、强制要求

当修改后端代码时,必须遵循以下规则:

  1. 新功能必须有测试

    • 每个新增的函数/类必须有对应的单元测试
    • 测试文件放在 backend/tests/ 对应目录下
    • 测试函数命名:test_<功能名>_<场景>
  2. 修改代码必须同步更新测试

    • 修改业务逻辑后,必须检查并更新相关测试用例
    • 如果修改导致测试失败,需判断是代码 bug 还是测试需要更新
    • 业务变更 → 更新测试用例
    • 代码 bug → 修复代码
  3. 测试必须全部通过

    • 功能完成的标准:所有相关测试通过
    • 不允许跳过或注释掉失败的测试
  4. 测试用例必须反映最新业务

    • 测试用例应该与当前业务逻辑保持一致
    • 修改功能时,同时更新测试的预期结果

二、验证命令

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 新增功能时

  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)
    
  2. 实现功能代码

  3. 运行测试验证

    cd backend && uv run pytest tests/services/test_new_feature.py -v
    
  4. 测试通过后才算完成

4.2 修改现有功能时

  1. 先找到相关测试文件
    # 搜索相关测试
    grep -r "test_<功能名>" backend/tests/
    

Read the full file on GitHub · 255 lines

Changes

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.

  1. 1mo ago First seen · 255 lines · 137 tokens per session scan A 93c47ccd067c

Subscribe to this mod's changes

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.

Related

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.

trpc/trpc · 61 tokens

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…

mem0ai/mem0 · 207 tokens

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).

prowler-cloud/prowler · 62 tokens

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.

ComposioHQ/composio · 60 tokens

convex-test

Generate convex-test tests for the app's Convex functions.

openclaw/clawhub · 16 tokens

voiden

Create and edit Voiden .void files for API testing. Covers the .void file format and all enabled extension block types.

VoidenHQ/voiden · 28 tokens