Claude-skill-registry cross-repo-sync
Sync files between BobTheSkull5 and BobFast5 repositories, especially audio files and shared components. Use when syncing audio, copying static files, or managing dual-repo workflow.
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/cross-repo-sync" ~/.claude/skills/majiayu000-claude-skill-registry-cross-repo-sync && rm -rf "$T"
skills/data/cross-repo-sync/SKILL.mdCross-Repository Sync
Handles syncing files between BobTheSkull5 and BobFast5 repositories, particularly audio files and shared components.
When to Use
- Syncing audio files between repos
- Copying static assets (greetings, startup audio, testing audio)
- Updating shared components
- Managing the dual-repo workflow
- Deploying to Raspberry Pi
Repository Structure
BobTheSkull5 (Main repo):
- Full system with MQTT, distributed architecture
- Web configuration interface
- All components and services
BobFast5 (Legacy/Testing repo):
- Simpler architecture
- Used for quick audio testing
- Shares audio files with BobTheSkull5
Common Sync Paths
Audio Files
Greetings:
From: BobTheSkull5/audio/static/greetings/ To: BobFast5/audio/static/greetings/
Startup:
From: BobTheSkull5/audio/static/startup/ To: BobFast5/audio/static/startup/
Testing:
From: BobTheSkull5/audio/static/testing/ To: BobFast5/audio/static/testing/
Sync Commands
Windows (cmd)
Copy single file:
copy "BobTheSkull5\audio\static\testing\filename.mp3" "BobFast5\audio\static\testing\"
Copy all files in directory:
xcopy "BobTheSkull5\audio\static\greetings\*.mp3" "BobFast5\audio\static\greetings\" /Y
Sync entire audio tree:
xcopy "BobTheSkull5\audio\static" "BobFast5\audio\static" /E /Y
Git Bash / WSL
Copy single file:
cp "BobTheSkull5/audio/static/testing/filename.mp3" "BobFast5/audio/static/testing/"
Copy all MP3s:
cp BobTheSkull5/audio/static/greetings/*.mp3 BobFast5/audio/static/greetings/
Sync with rsync:
rsync -av BobTheSkull5/audio/static/ BobFast5/audio/static/
Safe Sync Workflow
-
Check current directory:
pwd # Should be in parent directory containing both repos ls # Should see both BobTheSkull5 and BobFast5 -
Verify source files exist:
ls BobTheSkull5/audio/static/testing/*.mp3 -
Verify destination directory exists:
ls BobFast5/audio/static/testing/ -
Perform sync with confirmation:
# Windows - shows files before copying dir "BobTheSkull5\audio\static\testing\*.mp3" xcopy "BobTheSkull5\audio\static\testing\*.mp3" "BobFast5\audio\static\testing\" /Y -
Verify sync succeeded:
ls BobFast5/audio/static/testing/
Audio Generation Workflow
When generating new audio files:
-
Generate in BobTheSkull5:
cd BobTheSkull5 python generate_greeting_audio.py # or python generate_startup_audio.py -
Verify generated files:
ls audio/static/greetings/ # Check new files exist -
Sync to BobFast5:
cd .. # Go to parent directory cp BobTheSkull5/audio/static/greetings/*.mp3 BobFast5/audio/static/greetings/ -
Test in BobFast5:
cd BobFast5 # Run tests or play audio
Deploy to Pi Workflow
The deploy_to_pi.bat script handles syncing to Raspberry Pi:
# From BobTheSkull5 directory deploy_to_pi.bat
This copies:
- All Python files
- Configuration files (requirements, .env.bob)
- Setup scripts
- Component directories (events, wake_word, stt, llm, tts, state_machine, vision, hardware, web)
What NOT to Sync
Never copy these:
directories.git/- Virtual environments (
,venv/
).venv/
directories__pycache__/
files.pyc- Local configuration (
,.env
)config.yaml - Database files (
,*.db
)*.sqlite - Log files (
)logs/ - Face data (
)facedata/ - Embeddings (
,EmbeddingsDB/
)LongTermDB/
Selective Sync Pattern
Only sync specific audio categories:
REM Greetings only xcopy "BobTheSkull5\audio\static\greetings\*.mp3" "BobFast5\audio\static\greetings\" /Y REM Testing files only xcopy "BobTheSkull5\audio\static\testing\*.mp3" "BobFast5\audio\static\testing\" /Y REM Startup sounds only xcopy "BobTheSkull5\audio\static\startup\*.mp3" "BobFast5\audio\static\startup\" /Y
Bi-directional Sync Caution
Usually sync is one-way: BobTheSkull5 → BobFast5
Reverse sync (BobFast5 → BobTheSkull5) is rare and should be done carefully:
- Only for audio testing results
- Only for experimental audio files
- Never for code changes (different architectures)
Common Sync Scenarios
After generating new greetings:
cd /c/Users/Knarl/Code cp BobTheSkull5/audio/static/greetings/*.mp3 BobFast5/audio/static/greetings/
After generating test audio:
cd /c/Users/Knarl/Code cp BobTheSkull5/audio/static/testing/*.mp3 BobFast5/audio/static/testing/
Before deploying to Pi:
cd /c/Users/Knarl/Code/BobTheSkull5 cmd /c deploy_to_pi.bat
Full audio sync:
cd /c/Users/Knarl/Code rsync -av --include='*.mp3' --include='*.wav' --include='*/' --exclude='*' \ BobTheSkull5/audio/static/ BobFast5/audio/static/
Automation Script Example
@echo off REM sync_audio.bat - Sync all audio files REM Usage: sync_audio.bat echo Syncing audio files from BobTheSkull5 to BobFast5... echo [1/3] Syncing greetings... xcopy "%CD%\BobTheSkull5\audio\static\greetings\*.mp3" "%CD%\BobFast5\audio\static\greetings\" /Y /Q echo [2/3] Syncing startup sounds... xcopy "%CD%\BobTheSkull5\audio\static\startup\*.mp3" "%CD%\BobFast5\audio\static\startup\" /Y /Q echo [3/3] Syncing testing audio... xcopy "%CD%\BobTheSkull5\audio\static\testing\*.mp3" "%CD%\BobFast5\audio\static\testing\" /Y /Q echo. echo Sync complete! pause
Verification Commands
Check file counts match:
# Linux/Git Bash diff <(ls BobTheSkull5/audio/static/greetings/) <(ls BobFast5/audio/static/greetings/) # Windows PowerShell Compare-Object (Get-ChildItem BobTheSkull5\audio\static\greetings) (Get-ChildItem BobFast5\audio\static\greetings)
Check file sizes match:
# Linux/Git Bash ls -lh BobTheSkull5/audio/static/greetings/*.mp3 ls -lh BobFast5/audio/static/greetings/*.mp3
Troubleshooting
"File not found" error:
- Check current working directory with
orpwdcd - Verify source path exists:
ls BobTheSkull5/audio/static/testing/ - Use tab completion to verify paths
"Permission denied" error:
- Files may be in use (close audio players)
- Check file permissions
- Run command prompt as Administrator (Windows)
Files don't appear after copy:
- Check destination directory:
ls BobFast5/audio/static/testing/ - Verify copy command succeeded (check exit code)
- Try absolute paths instead of relative
Wrong files copied:
- Double-check source and destination paths
- Use
flag to overwrite without prompting/Y - Test with single file first before bulk copy
Pro Tips
- Always run from parent directory containing both repos
- Use tab completion to avoid typos in paths
- Verify before bulk operations - test with one file first
- Check file counts after sync to ensure completeness
- Use wildcards carefully -
not*.mp3
to avoid copying unwanted files* - Keep audio in sync - sync immediately after generation
- Document custom sync scripts if you create automation