用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/rossoctl/examples --skill orchestrate-tests命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | orchestrate:tests |
| description | Add test infrastructure and initial test coverage to a target repo |
flowchart TD
START(["/orchestrate:tests"]) --> READ["Read plan"]:::orch
READ --> DETECT["Detect test framework"]:::orch
DETECT --> CONFIG["Create test config"]:::orch
CONFIG --> CRITICAL["Identify critical paths"]:::orch
CRITICAL --> WRITE["Write initial tests"]:::orch
WRITE --> BRANCH["Create branch"]:::orch
BRANCH --> SIZE{Under 700 lines?}
SIZE -->|Yes| PR["Commit + open PR"]:::orch
SIZE -->|No| SPLIT["Split into sub-PRs"]:::orch
SPLIT --> PR
PR --> DONE([Phase complete])
classDef orch fill:#FF9800,stroke:#333,color:white
Follow this diagram as the workflow.
Add test infrastructure and initial test coverage. This is Phase 3 and produces PR #2. Tests come before CI and security — good test coverage is a safety net for the code refactoring that security/quality fixes require.
orchestrate:plan identifies tests as a needed phase.repos/<target>/| Marker | Language | Framework | Assertion |
|---|---|---|---|
pyproject.toml | Python | pytest | built-in assert |
go.mod | Go | testing (stdlib) | testify |
package.json | Node | jest or vitest | built-in expect |
requirements.yml | Ansible | molecule | testinfra |
Check existing tests:
find .repos/<target> -type f \( -name "test_*.py" -o -name "*_test.go" -o -name "*.test.*" \) 2>/dev/null
tests/conftest.py — shared fixturestests/__init__.py — package markerpyproject.toml — add [tool.pytest.ini_options] with testpaths = ["tests"]*_test.go files alongside sourcetestdata/ for fixturesinternal/testutil/ for shared helpersjest.config.ts or vitest.config.ts at root__tests__/ directory or *.test.ts alongside sourcemolecule/default/ with molecule.yml, converge.yml, verify.ymlFrom the scan report, find highest-impact areas:
Prioritize smoke tests across areas over exhaustive coverage of one area.
| Language | Convention | Example |
|---|---|---|
| Python | test_<what>_<condition> | test_create_user_returns_201 |
| Go | Test<What><Condition> | TestCreateUserReturns201 |
| Node | describe/it blocks | it('returns 201 when creating user') |
git -C .repos/<target> checkout -b orchestrate/tests
git -C .repos/<target> diff --stat | tail -1
If over 700 lines, split: framework setup in PR #3a, tests in PR #3b.
git -C .repos/<target> add -A
git -C .repos/<target> commit -s -m "feat: add test infrastructure and initial test coverage"
git -C .repos/<target> push -u origin orchestrate/tests
Set tests to complete in phase-status.md.
orchestrate — Parent routerorchestrate:precommit — Previous phase (linting foundation)orchestrate:plan — Defines test phase tasksorchestrate:ci — Next phase (automates running these tests)Add comprehensive CI workflows to a target repo - lint, test, build, security scanning, dependabot, scorecard, action pinning
Brainstorm and create phased enhancement plan for a target repo - PR sizing, phase selection, task breakdown
Add pre-commit hooks, linting, CLAUDE.md, and foundational .claude/ setup to a target repo
基于 SOC 职业分类