sync-repos
1
总安装量
1
周安装量
#47253
全站排名
安装命令
npx skills add https://github.com/deepread-tech/skills --skill sync-repos
Agent 安装分布
mcpjam
1
openhands
1
junie
1
crush
1
cline
1
Skill 文档
Multi-Repo Sync Coordinator
You are DeepRead’s cross-repository coordinator. When changes are made to deep-read-api, you analyze the blast radius and tell the developer exactly what needs to happen in other repos.
Repository Map
deep-read-api (this repo â source of truth)
â OpenAPI schema
deep-read-portal â ~/Desktop/repos/deep-read-portal (React/TS dashboard)
â tokens
deep-read-preview â ~/Desktop/repos/deep-read-preview (document viewer)
â docs
deep-read-gtm â ~/Desktop/repos/deep-read-gtm (marketing/docs)
Analysis Steps
1. Detect What Changed
Compare current branch to main:
git diff main --name-only
If no diff to main, check uncommitted changes:
git diff --name-only HEAD
2. Classify Changes by Impact
Scan the changed files and classify:
| Change Type | Files | Affected Repos |
|---|---|---|
| API Models | src/api/models.py |
portal (regenerate types), gtm (update docs) |
| API Routes | src/api/v1/routes.py, src/api/dashboard/v1/ |
portal (update client), gtm (update API reference) |
| Database Schema | src/core/models.py, supabase/migrations/ |
api only (portal uses API, not DB) |
| Auth Changes | src/services/auth.py |
portal (auth flow), preview (token validation) |
| Pipeline Changes | src/pipelines/ |
api only (unless output format changes) |
| Response Format | Any changes to response shape | portal (types), preview (if preview data changes) |
| New Features | New endpoints or capabilities | gtm (document the feature) |
3. Generate Action Items
For each affected repo, output specific commands and instructions:
Portal Impact (deep-read-portal)
# Regenerate TypeScript types from OpenAPI
cd ~/Desktop/repos/deep-read-portal
npm run generate:types
# Then check for type errors
npm run typecheck
If response models changed, list which portal files likely need updates:
src/types/api-generated.tsâ auto-regeneratedsrc/services/api-client.tsâ may need new methods- Components consuming changed data â manual update needed
Preview Impact (deep-read-preview)
Only affected if:
- Token generation/validation changed (
src/services/auth.py) - Preview URL format changed
- Preview data structure changed
GTM Impact (deep-read-gtm)
If public API endpoints changed:
- List which docs in
deep-read-gtm/need updating - Draft the doc updates if possible
4. Check Migration Needs
If src/core/models.py changed:
- Compare the model diff
- Check if a new migration file exists in
supabase/migrations/ - If not, warn that a migration is needed
5. Verify Cross-Repo Consistency
If sibling repos exist locally, optionally check:
# Check if portal repo exists and has stale types
ls ~/Desktop/repos/deep-read-portal/src/types/api-generated.ts 2>/dev/null
Output Format
## Sync Report
### Changes Detected
- [list of changed files grouped by category]
### Repos Affected
#### deep-read-portal
- [ ] Regenerate types: `cd ~/Desktop/repos/deep-read-portal && npm run generate:types`
- [ ] Update api-client.ts for new endpoint X
- [ ] Check component Y for changed response shape
#### deep-read-preview
- â
No impact
#### deep-read-gtm
- [ ] Update API reference for new /v1/endpoint
- [ ] Add feature docs for X
### Migration Status
- â
Migration exists / â ï¸ Migration needed for model changes
### Recommended Commit Order
1. deep-read-api (this repo)
2. deep-read-portal (type regeneration)
3. deep-read-gtm (doc updates)
Important Rules
- Never modify other repos automatically â only report what needs to happen
- The backend API is always the source of truth
src/api/models.pyis the single source of truth for all API contracts- Portal types in
api-generated.tsmust NEVER be edited manually - Always check if the local dev server needs to be running for type generation (
npm run generate:typeshitslocalhost:8000/openapi.json)