用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tools-only/X-Skills --skill am-i-complete命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | am-i-complete |
| description | Self-verification protocol that drives completion of testing steps to properly finish the task |
Workflow Reference: See Master Workflow for how this command fits into the verification stage of the agentic workflow.
You're in the middle of a task. Before claiming completion, execute this verification protocol.
<task_identification> First, understand your project's test structure:
Your task type:
<verification_protocol type="fix">
<step_1_reproduce> REPRODUCE THE BUG NOW
Find or create the appropriate test file:
Run this test NOW and confirm it fails:
# -x: stop at first failure (fast feedback for TDD) # -v: verbose output with test names # -s: show print statements and stdout (disable output capture) pytest tests/unit/test_component.py::test_task_completed_should_print_progress -xvsSave the failure output for reference. </step_1_reproduce>
<step_2_fix> APPLY YOUR FIX
Make your code changes to fix the bug. The test you just wrote should guide your fix. </step_2_fix>
<step_3_verify> VERIFY THE FIX WORKS
Run the SAME test - it must pass now:
pytest tests/unit/test_component.py::test_task_completed_should_print_progress -xvs
pytest tests/unit/test_component.py -xvs
pytest tests/integration/ -xvs -k "relevant_keyword"
Show actual output demonstrating the test passes. </step_3_verify>
<step_4_regression> CHECK FOR REGRESSIONS
Run the full test suite relevant to your changes:
pytest tests/unit/test_[affected_module].py -xvs
pytest tests/integration/ -xvs
pytest tests/ -xvs
make test npm test go test ./...
Document any failures and fix them. </step_4_regression>
<step_5_commit> COMMIT YOUR FIX WITH THE TEST
Your commit should include:
</verification_protocol>
STATUS CHECK: Is your regression test committed and passing? If not, continue working.
<verification_protocol type="feature">
<step_1_criteria> DEFINE TEST REQUIREMENTS
Based on your feature, determine where tests belong:
Write the test signatures FIRST (they will fail):
# tests/unit/test_json_exporter.pydef test_export_to_json_creates_valid_file() -> None: """Test that export creates a valid JSON file""" pass # TODO: implement
def test_export_handles_special_characters() -> None: """Test that special characters are properly escaped""" pass # TODO: implement
def test_export_raises_on_invalid_input() -> None: """Test that appropriate errors are raised""" pass # TODO: implement </step_1_criteria>
<step_2_implement> IMPLEMENT FEATURE WITH TESTS
For each test you defined:
pytest tests/unit/test_json_exporter.py -xvs
Don't move forward until all tests pass. </step_2_implement>
<step_3_integration> ADD INTEGRATION TESTS
Create tests/integration/test_[feature]_integration.py:
def test_json_export_full_workflow() -> None: """Test the complete export workflow as a user would use it""" # Setup data = create_realistic_test_data()# Execute
result = export_workflow(data, format='json')
# Verify
assert result.success
assert valid_json(result.output)
assert all_data_preserved(data, result.output)
Run integration tests: pytest tests/integration/test_*_integration.py -xvs </step_3_integration>
<step_4_e2e> ADD E2E TEST IF APPLICABLE
For user-facing features, add tests/e2e/test_[feature]_workflow.py:
<step_5_commit> COMMIT FEATURE WITH ALL TESTS
git add src/[feature_files] tests/ git commit -m "feat: add JSON export functionality</verification_protocol>
STATUS CHECK: Are all your tests committed and passing in the proper test directories? If not, continue working.
<verification_protocol type="refactor">
<step_1_baseline> ENSURE EXISTING TESTS PASS
Before refactoring, verify the current state:
pytest tests/unit/test_[module_to_refactor].py -xvs > /tmp/baseline_tests.txt pytest tests/integration/ -xvs -k [module] >> /tmp/baseline_tests.txt
If tests are missing for the code you're refactoring, ADD THEM FIRST. </step_1_baseline>
<step_2_refactor> PERFORM REFACTOR
Make your refactoring changes. After each significant change, run the tests: pytest tests/unit/test_[refactored_module].py -xvs
Tests should continue passing throughout the refactor. </step_2_refactor>
<step_3_verify> VERIFY BEHAVIOR UNCHANGED
# Run the same tests as baseline pytest tests/unit/test_[module_to_refactor].py -xvs > /tmp/after_tests.txt pytest tests/integration/ -xvs -k [module] >> /tmp/after_tests.txtdiff /tmp/baseline_tests.txt /tmp/after_tests.txt
pytest tests/performance/ -xvs
All tests should pass with similar or better performance. </step_3_verify>
<step_4_commit> COMMIT REFACTOR
git add -A git commit -m "refactor: [description of refactoring]</verification_protocol>
STATUS CHECK: Do all existing tests still pass after refactoring? If not, continue working.
<verification_protocol type="general">
What type of task am I doing? Does it need tests? Where do those tests belong in the existing structure? Determine what validation is needed: - [ ] If code changes: are there tests? - [ ] If bug fix: is there a regression test? - [ ] If feature: are there unit + integration tests? - [ ] If refactor: do existing tests still pass? - [ ] If config/docs: have you validated the changes work? Based on your task: 1. Find or create appropriate test files in the existing test structure 2. Write tests that will live in the codebase (not throwaway tests) 3. Ensure all tests pass 4. Commit tests with your changes</verification_protocol>
<test_location_rules> Where Tests Belong
NEVER create random test files in the project root. ALWAYS follow the project's existing test structure. </test_location_rules>
<permanent_tests> Tests Are Permanent
<temp_artifacts> Temporary Artifacts Only Use /tmp/ or .verification/ (gitignored) ONLY for:
Never commit temporary verification artifacts. </temp_artifacts>
Then execute:
find tests -name "[relevant_module]" -type f
pytest tests/[relevant_path] -xvs
This command ensures you CREATE PERMANENT TESTS, not temporary verification files. Keep working until tests are committed.