test-my-bot
Run the CopperHead bot protocol test suite against a bot file to verify it follows the server protocol correctly.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Run the CopperHead bot protocol test suite against a bot file to verify it follows the server protocol correctly.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | test-my-bot |
| description | Run the CopperHead bot protocol test suite against a bot file to verify it follows the server protocol correctly. |
Use this skill when the user asks to test, validate, or check their bot.
Examples:
Run the bot protocol test suite (tests/test_bot_protocol.py) against the user's bot file. The test suite launches a local CopperHead server, runs the bot against it, and checks protocol compliance.
copperhead-server repo must exist at ../copperhead-server (sibling directory of copperhead-bot).pip install -r requirements.txtDetermine which bot file to test. If the user specifies a file (e.g., "test snake_bot.py"), use that. Otherwise, default to mybot.py.
Verify the bot file exists.
Test-Path <bot_file>
Install bot dependencies if needed.
Set-Location <copperhead-bot directory>
pip install -q -r requirements.txt
Kill any leftover test server processes to avoid port conflicts.
Get-NetTCPConnection -LocalPort 18765,18766 -ErrorAction SilentlyContinue |
ForEach-Object { Stop-Process -Id $_.OwningProcess -Force -ErrorAction SilentlyContinue }
Run the test suite. Use sync mode with a long initial_wait (tests take 2-3 minutes). Wait for the command to complete fully — do not respond until you have the final output.
Set-Location <copperhead-bot directory>
python tests/test_bot_protocol.py --bot <bot_file>
Once the tests finish, display the full results summary to the user. The output ends with a clearly formatted block between ====== lines — show this entire block (from TEST RESULTS SUMMARY through the final --- line) in your response so the user can see each test's PASS/FAIL status. If any tests failed, explain what went wrong and suggest fixes.
18765 (and 18766 for one test) — not the standard 8765 — to avoid conflicts with a running game server.--bot argument accepts any Python bot file that follows the CopperHead bot CLI conventions (--server, --name, --difficulty arguments).