sync-repos
Skill159 starsChanged 9 months agoMITView on GitHub
Manage public/private repository pairs. Verify parity, detect drift, run sync scripts, and validate no sensitive data leaks to the public repo. Use for projects that maintain separate dev and public repositories.
- Reads credentials
3 other projects use a version of this.
Adopted by
Most recently taken up by
- egregore-labs/egregoretheir own version, first seen Oct 1, 2026
- ridermw/my-skillstheir own version, first seen Sep 10, 2026
- SmartAssets-io/skillstheir own version, first seen Aug 12, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- egregore-labs/egregore★ 291same name
- SmartAssets-io/skills★ 2same name
- ridermw/my-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository55 other files it gives its agents.
- ab-testing-frameworkSkill
- account-structure-reviewSkill
- aeo-geo-optimizerSkill
- brand-dnaSkill
- brand-voice-guidelinesSkill
- brazeSkill
- cold-email-outreachSkill
- competitor-ads-analystSkill
- content-creatorSkill
- content-pipelineSkill
- content-workflowSkill
- copywriting-frameworksSkill
- cro-auditorSkill
- cross-platform-auditSkill
- customer-journey-mappingSkill
- data-viz-deckSkill
- dep-auditSkill
- email-composerSkill
- facebook-adsSkill
- frontend-designSkill
- github-readmeSkill
- google-adsSkill
- google-analyticsSkill
- google-tag-managerSkill
- html-report-builderSkill
- icp-researchSkill
- klaviyo-analystSkill
- klaviyo-developerSkill
- landing-page-optimizerSkill
- linkedin-adsSkill
- llms-txtSkill
- looker-studioSkill
- market-researchSkill
- microsoft-adsSkill
- pricing-strategySkill
- pro-deck-builderSkill
- programmatic-seoSkill
- pro-report-builderSkill
- release-notesSkill
- remotion-videoSkill
- repo-healthSkill
- repo-scaffoldSkill
- research-digestSkill
- retention-churn-preventionSkill
- safe-pushSkill
- schema-markup-generatorSkill
- seo-content-writerSkill
- shopifySkill
- social-media-strategySkill
- social-previewSkill
- tech-diagramSkill
- technical-seo-auditSkill
- tiktok-adsSkill
- utm-attribution-strategySkill
- wasted-spend-finderSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 9 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
Before pushing a public repo — verify the sync is clean and current
- Distinctive: line 30
After major dev work — check whether the public repo has drifted behind
- Distinctive: line 32
When setting up a new public/private repo pair for the first time
- Very specific: line 40
If paths are omitted, prompt the user for them.
- Very specific: line 48
Detect sync script: Look for scripts/sync-public.sh, scripts/sync-public.conf, or .syncignore in the dev repo.
- Very specific: line 56
Check last sync timestamp: If scripts/sync-public.sh exists, check its last execution time via the most recent commit in the public repo …
- Very specific: line 71
Locate sync script: Look for scripts/sync-public.sh in the dev repo.
- Distinctive: line 75
Execute the sync script: Run from the dev repo root:
- Distinctive: line 81
Post-sync validation: After the script completes:
- Distinctive: line 82
Run the check procedure again to confirm parity
- Distinctive: line 102
Generate sync-public.conf: Create a config file with:
- Very specific: line 108
Generate sync-public.sh: Create the sync script using the rsync-based template from REFERENCE.md.
- Distinctive: line 142
Always validate after sync: Every sync run ends with a PII/secrets scan on the public repo.
- Distinctive: line 143
Exclusion list is append-only: Never remove exclusion patterns without explicit user approval.
- Very specific: line 145
Conf is separate from script: Keep sync-public.conf separate so exclusion lists are easy to review and update without touching script logic.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Sync Repos
Manage public/private repository pairs. Verify parity between a dev (private) repo and its public counterpart, detect drift, run sync scripts, validate results, and ensure no PII or secrets leak to the public side.
Install
claude install-skill https://github.com/thatrebeccarae/claude-skills/tree/main/sync-reposWhen to Use
- Before pushing a public repo — verify the sync is clean and current
- After major dev work — check whether the public repo has drifted behind
- On a periodic cadence — weekly or before releases, catch unsynced changes early
- When setting up a new public/private repo pair for the first time
Usage
/sync-repos check [dev-path] [public-path]— Compare repos and report drift/sync-repos sync [dev-path] [public-path]— Run sync script and validate/sync-repos setup [dev-path] [public-path]— Create initial sync-public.sh and config
If paths are omitted, prompt the user for them. Look for .syncignore or scripts/sync-public.conf in the dev repo to auto-detect the pair.
Procedure
Check Mode
- Validate paths. Confirm both paths exist and contain
.git/directories. Abort with a clear message if either is not a git repo. - Detect sync script. Look for
scripts/sync-public.sh,scripts/sync-public.conf, or.syncignorein the dev repo. Report whether a sync mechanism exists. - Compare file lists. Generate sorted file lists for both repos (excluding
.git/,node_modules/,dist/). Categorize differences:- Expected exclusions — files matching known exclusion patterns (see Common Exclusion Patterns below) or listed in
.syncignore/sync-public.conf - Unexpected drift — files present in dev but missing from public that are NOT in any exclusion list
- Diverged files — files present in both repos but with different content (compare via
sha256sumorgit hash-object) - Public-only files — files in public but not in dev (legitimate: README, CONTRIBUTING, LICENSE, .github/)
- Expected exclusions — files matching known exclusion patterns (see Common Exclusion Patterns below) or listed in
- Check last sync timestamp. If
scripts/sync-public.shexists, check its last execution time via the most recent commit in the public repo that matches a sync pattern. Compare against the latest commit in the dev repo. - Report. Present a summary table:
- Sync script: found / not found
- Files only in dev (expected): count
- Files only in dev (unexpected): count + list
- Diverged files: count + list
- Public-only files: count + list
- Estimated drift: number of dev commits since last sync
- Recommendation: "in sync", "minor drift", or "sync needed"
Sync Mode
- Run check first. Execute the full check procedure above. If no drift is detected, report "already in sync" and stop.
- Locate sync script. Look for
scripts/sync-public.shin the dev repo. If not found, ask the user whether to run setup mode to create one. - Preview the sync. Show what the sync script will do — files to copy, exclusions, text replacements. Require user confirmation before proceeding.
- Execute the sync script. Run from the dev repo root:
Capture stdout and stderr. If the script exits non-zero, report the error and stop.bash scripts/sync-public.sh - Post-sync validation. After the script completes:
- Run the check procedure again to confirm parity
- Scan the public repo diff for PII and secrets (see REFERENCE.md for scan patterns)
- Flag any findings and block until resolved
- Report results. Summarize:
- Files synced: count
- Exclusions applied: count
- PII/secrets scan: clean or findings
- Next step: "Review changes in public repo, then
/safe-pushwhen ready"
Setup Mode
- Scan the dev repo. Identify files and directories that should NOT sync to public:
- Environment files:
.env,.env.*(except.env.example) - Planning/internal:
.planning/,.claude/,CLAUDE_CONTEXT.md,briefs/ - Data/build artifacts:
data/,dist/,node_modules/,.git/ - Sync infrastructure:
scripts/sync-public.sh,scripts/sync-public.conf - Sensitive config:
*.pem,*.key,*.plist,config/soul.md - Project-specific patterns detected via
.gitignoreanalysis
- Environment files:
- Generate sync-public.conf. Create a config file with:
SOURCE_DIRandTARGET_DIRvariablesPACKAGE_NAMEfor the public repoEXCLUDE_PATHSarray with all identified exclusionsPRESERVE_PATHSarray for public-only files (README, LICENSE, .github/)
- Generate sync-public.sh. Create the sync script using the rsync-based template from REFERENCE.md. Include:
- Config file sourcing
- Path validation
- Target cleanup (preserve
.git/andPRESERVE_PATHS) - rsync with
--delete-excludedand exclusion list - Personal data leak check
- File count summary
- User review. Display the generated config and script. Wait for explicit approval before writing.
- Write files. Save
scripts/sync-public.sh(chmod +x) andscripts/sync-public.confto the dev repo.
Common Exclusion Patterns
These patterns are excluded from sync by default. Append project-specific patterns as needed.
| Pattern | Reason |
.git/ | Git history stays separate |
.env, .env.* | Secrets and environment config |
.planning/ | Internal planning docs |
.claude/ | Claude Code project config |
CLAUDE_CONTEXT.md | Internal agent context |
data/ | Local data / databases |
dist/, node_modules/ | Build artifacts |
*.pem, *.key | Private key material |
*.plist | macOS service config |
scripts/sync-public.* | Sync infrastructure itself |
briefs/ | Internal content briefs |
config/soul.md | Personal agent config |
Key Principles
- Never auto-push. Sync writes files locally. Pushing to remote is always a separate, user-confirmed step via
/safe-push. - Always validate after sync. Every sync run ends with a PII/secrets scan on the public repo. No exceptions.
- Exclusion list is append-only. Never remove exclusion patterns without explicit user approval. It is safer to exclude too much than too little.
- Preserve public-only files. The public repo may have its own README, LICENSE, CONTRIBUTING, .github/ workflows. Sync must never overwrite these.
- Conf is separate from script. Keep
sync-public.confseparate so exclusion lists are easy to review and update without touching script logic.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

