AgentSkillsCN

test-suggestions

根据代码变更,智能推荐应运行的测试。当用户修改源代码文件,或询问他们应该运行哪些测试时,可选用此技能。

SKILL.md
--- frontmatter
name: test-suggestions
description: Suggest which tests to run based on code changes. Use this skill when the user modifies source files or asks what tests they should run.

Test Suggestions

This skill suggests which tests to run based on code changes.

When to Use

  • User modifies source files
  • User asks "what tests should I run?"
  • User asks "will my changes break anything?"
  • Before pushing changes

How It Works

  1. Identify changed files from git status
  2. Query test impact graph for file → test mapping
  3. Consider historical co-failures
  4. Prioritize by impact score
  5. Suggest minimal test set

Implementation

Use the argus_what_to_test MCP tool:

  • Input: { "diff": "<git diff>", "project_id": "<project>" }
  • Returns: Prioritized list of tests with reasoning and estimated run time

Output Format

Suggested Tests

PriorityTestReason
🔴 Must Runtest_auth_loginDirectly affected by auth.py changes
🟡 Should Runtest_api_usersUses UserService (transitive)
🟢 Optionaltest_e2e_checkoutLow probability of impact

Quick Command

bash
pytest tests/test_auth_login.py tests/test_api_users.py

Estimated time: ~2 minutes