run-tests
Use this skill when the user asks to "run tests", "test this", "check if tests pass", "cargo test", "run clippy", "lint this", "check formatting", "cargo…
от coralogix★ 243 звезды на GitHub
Установить run-tests в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Run Tests & Verify
How to run tests, lint, and verify changes in the cx CLI. This skill covers running only - for writing new tests, see the add-command skill.
Quick Reference
| Command | What it does |
|---|---|
cargo test |
Run all unit + integration tests |
cargo test <name> |
Run tests matching a name substring |
cargo test -- --ignored |
Run integration tests (filesystem-dependent, skipped by default) |
cargo fmt --check |
Check formatting (no changes) |
cargo fmt |
Auto-fix formatting |
cargo clippy --locked -- -D warnings |
Lint with warnings-as-errors |
cargo build |
Verify compilation |
Full CI Check
This is the exact sequence CI runs on every PR. Run it before committing or creating a PR:
cargo fmt --check && cargo clippy --locked -- -D warnings && cargo test --locked
The --locked flag ensures the lockfile is respected - this matches .github/workflows/test.yml and lint.yml exactly. CI runs tests on Ubuntu, macOS, and Windows.
What to Run After a Change
Pick the right level of verification based on what changed:
- Any
.rsfile -cargo test+cargo clippy --locked -- -D warnings - Formatting only -
cargo fmt --check(orcargo fmtto auto-fix) Cargo.toml- full CI check (dependency changes affect everything)- API types (
src/commands/<cmd>/api.rs) - run that command's tests first (cargo test alerts,cargo test dataprime), then the full suite - Test files only -
cargo test <relevant_test_name>
Running Specific Tests
Target tests efficiently instead of running the entire suite:
cargo test alerts- all tests with "alerts" in the namecargo test --test dataprime- only thetests/dataprime/integration test binary (input + output + query)cargo test --test dataprime input- only theinputsubmodule of that binarycargo test config::tests- only the tests in theconfigmodulecargo test metrics::tests- only metrics formatting tests
Interpreting Failures
Clippy warnings - treated as errors via -D warnings. Fix every warning before committing. Common ones: unused variables, unnecessary clones, missing error handling.
Format failures - run cargo fmt to auto-fix. These never need manual intervention.
Deserialization test failures - usually means struct field names don't match JSON keys. Check that #[serde(rename_all = "camelCase")] is on response types and that #[serde(default)] is on Vec fields (the API sometimes omits empty arrays).
Compilation errors in tests - likely caused by changing a public function signature. Check callers in both src/ and tests/ directories.
Integration test failures (--ignored) - these depend on filesystem state (~/.cx/ config directory). They may fail if the local environment isn't set up. This is expected in CI where no config exists.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл run-tests?
Use this skill when the user asks to "run tests", "test this", "check if tests pass", "cargo test", "run clippy", "lint this", "check formatting", "cargo fmt", "CI checks", "verify changes", "does this pass tests", "run the full check", "pre-commit check", or wants to verify that code changes are correct. Use this even when the user says something like "make sure this works" or "check for issues" in the context of code changes.
Как установить скилл run-tests?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл run-tests запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…