SKILL.MD
Common task shortcuts for CV Rapid Response. These patterns save tokens by eliminating redundant exploration.
Quick File Access
Core files (use Read directly):
backend/videostreams.py # Main processing script backend/.env # Configuration CLAUDE.md # Project docs synchronized_security_report.json # Latest detection output
Common Tasks
1. Run Video Processing
Command: cd backend && python3 videostreams.py
Before running:
- •Verify VIDEO_PATH exists:
ls backend/video/ - •Check .env has ROBOFLOW_API_KEY
- •No need to read entire file unless modifying
After running:
- •Check output:
synchronized_security_report.jsonin project root - •Annotated video in project root with prefix
annotated_
2. Change Detection Target
File: backend/videostreams.py:23
Edit: TARGET_OBJECT = "person" → any COCO class (car, bicycle, dog, etc.)
No restart needed - just re-run script
3. Add Video Source
File: backend/videostreams.py:22 Pattern: Add path to VIDEO_SOURCES list
VIDEO_SOURCES = [VIDEO_PATH, "/path/to/video2.mov"]
4. Check Dependencies
Installed: pip list | grep -E "(inference|supervision|opencv)"
Missing: pip install inference supervision opencv-python
Virtual env: .venv exists, may need activation
5. Analyze Detection Report
Location: synchronized_security_report.json
Structure:
{"frame_N": {"cam_1": {"detected": "YES/NO", "center": [x, y]}}}
Quick stats: cat synchronized_security_report.json | grep -c '"detected": "YES"'
6. Model Configuration
Default: yolov8n-640 (COCO trained, 80 classes)
Change model: Edit model_id in videostreams.py:67
Custom model: Set ROBOFLOW_MODEL in .env
Variants: yolov8s-640 (more accurate), yolov8m-640 (balanced)
Token-Saving Patterns
Instead of exploring:
- •User asks about detection → Read videostreams.py:29-63 (synchronized_sink function)
- •User asks about output → Read synchronized_security_report.json
- •User asks about config → Read backend/.env and videostreams.py:16-24
Parallel operations when uncertain:
# Good: Check multiple locations at once
Glob("**/*.env")
Glob("**/config*.py")
Read("backend/videostreams.py")
Avoid redundant reads:
- •Cache file structure mentally from first read
- •Jump to line ranges for specific changes
- •Use Edit tool for known modifications
Environment Setup
Python version: 3.10 (see .venv)
Working directory: Project root /Users/jago/Downloads/Auto-GPT/cv_rapid_response
Backend scripts: cd backend before running
Output location: Project root (not backend/)
Debugging Shortcuts
No video file:
- •Check:
ls backend/video/IMG_3501.MOV - •Fix: Add video to backend/video/
API key error:
- •Check:
grep ROBOFLOW_API_KEY backend/.env - •Fix: Add
ROBOFLOW_API_KEY=your_keyto backend/.env
Import errors:
- •Check:
.venv/bin/python3 -c "import inference" - •Fix:
cd backend && ../.venv/bin/pip install inference
Empty detections:
- •Verify TARGET_OBJECT is valid COCO class
- •Check video has target object
- •Try different model (yolov8s-640 for better accuracy)