xiaohongshu
xiaohongshu
backend-tester
Run isolated test environments for backend changes, manage test data, and verify API endpoints. Use when testing Python backend changes without interfering with production instances.
Full skill instructions
CRITICAL: Always use isolated test environment to avoid conflicts with user's production instance.
Test Configuration:
test_data/ (production uses data/)--debug-all for full loggingUse for testing API endpoints without UI interaction.
1. Start Test Server
uv run python main.py --debug-all --data-dir test_data --port 8001
2. Run Test Commands
Use curl or Python requests to test endpoints:
# Create project
curl -X POST http://localhost:8001/api/projects \
-H "Content-Type: application/json" \
-d '{"name": "Test Project", "working_directory": "/tmp/test"}'
# Create session
curl -X POST http://localhost:8001/api/sessions \
-H "Content-Type: application/json" \
-d '{"name": "Test Session", "project_id": "<project_id>"}'
# Get sessions
curl http://localhost:8001/api/sessions
# Start session
curl -X POST http://localhost:8001/api/sessions/<session_id>/start
3. Verify Responses
4. Stop Server
# Press Ctrl+C to stop server
5. Review Logs
Check test_data/logs/ for detailed debugging:
error.log - All errorscoordinator.log - Session coordinationstorage.log - File operationssdk_debug.log - SDK integrationwebsocket_debug.log - WebSocket lifecycle6. Clean Up
# Remove test data (optional)
rm -rf test_data/
Use when user needs to interact with frontend.
1. Start Test Server in Background
Invoke the process-manager skill to safely manage the test server:
uv run python main.py --debug-all --data-dir test_data --port 80012. Wait for User Confirmation User tests functionality in browser at http://localhost:8001
3. Stop Test Server
Invoke the process-manager skill to safely terminate:
CRITICAL: Always delegate process management to the skill to avoid killing production servers.
Create Operation:
# Test creation
curl -X POST http://localhost:8001/api/<resource> -H "Content-Type: application/json" -d '{...}'
# Verify creation
curl http://localhost:8001/api/<resource>
Read Operation:
# Get list
curl http://localhost:8001/api/<resources>
# Get specific item
curl http://localhost:8001/api/<resources>/<id>
Update Operation:
# Update item
curl -X PUT http://localhost:8001/api/<resources>/<id> -H "Content-Type: application/json" -d '{...}'
# Verify update
curl http://localhost:8001/api/<resources>/<id>
Delete Operation:
# Delete item
curl -X DELETE http://localhost:8001/api/<resources>/<id>
# Verify deletion
curl http://localhost:8001/api/<resources>/<id>
# Should return 404
Test validation:
# Missing required field
curl -X POST http://localhost:8001/api/<resource> -H "Content-Type: application/json" -d '{}'
# Should return 400
# Invalid data type
curl -X POST http://localhost:8001/api/<resource> -H "Content-Type: application/json" -d '{"id": "not-a-uuid"}'
# Should return 400
# Non-existent resource
curl http://localhost:8001/api/<resources>/nonexistent-id
# Should return 404
Complete session workflow:
# 1. Create project
PROJECT=$(curl -X POST http://localhost:8001/api/projects -H "Content-Type: application/json" -d '{"name":"Test","working_directory":"/tmp"}' | jq -r '.project_id')
# 2. Create session
SESSION=$(curl -X POST http://localhost:8001/api/sessions -H "Content-Type: application/json" -d "{\"project_id\":\"$PROJECT\",\"name\":\"Test Session\"}" | jq -r '.session_id')
# 3. Start session
curl -X POST http://localhost:8001/api/sessions/$SESSION/start
# 4. Send message
curl -X POST http://localhost:8001/api/sessions/$SESSION/messages -H "Content-Type: application/json" -d '{"content":"Hello"}'
# 5. Get messages
curl "http://localhost:8001/api/sessions/$SESSION/messages?limit=50&offset=0"
# 6. Pause session
curl -X POST http://localhost:8001/api/sessions/$SESSION/pause
# 7. Terminate session
curl -X POST http://localhost:8001/api/sessions/$SESSION/terminate
# 8. Clean up
curl -X DELETE http://localhost:8001/api/sessions/$SESSION
curl -X DELETE http://localhost:8001/api/projects/$PROJECT
Automated Testing (curl/requests):
Manual Testing (browser):
Unit Tests (pytest):
Test Data Location:
test_data/
├── logs/ # Test run logs
├── projects/ # Test projects
└── sessions/ # Test sessions
Cleaning Up:
# Remove all test data
rm -rf test_data/
# Remove just logs
rm -rf test_data/logs/
# Remove specific session
rm -rf test_data/sessions/<session-id>/
Persistent Test Data: Sometimes useful to keep test data for debugging:
Context: Added new endpoint POST /api/sessions/<id>/reset
Test:
1. Start server: uv run python main.py --debug-all --data-dir test_data --port 8001
2. Create test session
3. Test endpoint: curl -X POST http://localhost:8001/api/sessions/<id>/reset
4. Verify: curl http://localhost:8001/api/sessions/<id>/messages (should be empty)
5. Stop server: Ctrl+C
6. Clean up: rm -rf test_data/
Context: Fixed WebSocket reconnection issue
Test:
1. Invoke process-manager skill to start server in background
2. Server runs on port 8001 with test_data/
3. Inform user: "Test at http://localhost:8001"
4. User tests reconnection scenario
5. User confirms: "Works now"
6. Invoke process-manager skill to stop server by PID
7. Verify cleanup successful
Context: Need to verify session CRUD operations still work
Test Script:
1. Start server
2. Create project, verify response
3. Create session, verify response
4. Update session name, verify
5. Delete session, verify 404 on next get
6. Delete project, verify 404 on next get
7. Stop server
8. Check logs for errors
9. Clean up test_data/
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience