Export a sanitized copy of your Claude Code skills to a public repo. Scans for sensitive content, applies sanitization, and verifies clean before export.
Create a sanitized, shareable version of your Claude Code skills. This skill:
/sync-skills-public - Run full sync workflow
/sync-skills-public --dry-run - Show what would change without writing
/sync-skills-public --scan-only - Just run the sensitive content scan
Create ~/.claude/sync-skills-config.md:
# Sync Skills Public Config
## Paths
**Source:** `~/.claude/skills/`
**Destination:** `~/repos/claude-code-skills/` (or your public repo path)
## Sanitization Rules
### Personal Name
- Find: `Alex` (or your name)
- Replace with: `[YOUR_NAME]`
### Personal Paths
| Pattern | Replacement |
| ------------------------------------------------- | ----------------------- |
| `~/Library/Mobile Documents/com~apple~CloudDocs/` | `~/your-cloud-storage/` |
| `/Users/yourname/` | `/Users/[username]/` |
| (add your patterns) | |
### Private URLs
| Pattern | Replacement |
| ---------------------------------------- | ------------------- |
| `https://your-workspace.notion.site/...` | `[YOUR_NOTION_URL]` |
| (add your URLs) | |
## Files to Exclude
Skip these files entirely (don't copy to public):
- `.DS_Store`
- `sensitive-content-context.md`
- `sync-skills-config.md`
- (add others)
## Files to Skip Sanitization
Copy as-is without sanitization (already clean):
- `brainstorming/SKILL.md`
- `code-reviewer/SKILL.md`
- (add others you've verified are clean)
## Post-Export
After successful export:
- [ ] Auto-commit: false (set to true if you want auto-commits)
- [ ] Commit message template: "Sync skills from local - [DATE]"
Load configuration
~/.claude/sync-skills-config.mdCheck destination repo state
Invoke sensitive-content-scanner on ~/.claude/skills/
Review findings:
Present scan summary:
Scan Results:
- X files scanned
- X findings to sanitize
- X files already clean
Proceed with sanitization? [y/n]
For each file:
Sanitization report:
Sanitizing: writeup/SKILL.md
- Line 3: "Danny" → "[YOUR_NAME]" (4 occurrences)
- Line 25: iCloud path → placeholder
- Line 31: iCloud path → placeholder
Sanitizing: coach/SKILL.md
- Line 86: iCloud path → placeholder
Copying unchanged: brainstorming/SKILL.md
Copying unchanged: code-reviewer/SKILL.md
...
Re-run sensitive-content-scanner on the OUTPUT directory
Verify clean:
Show verification result:
Verification scan: PASSED
- 0 critical issues
- 0 high issues
- 2 medium issues (acceptable)
Ready to write to destination.
Clear destination (or sync incrementally)
Write sanitized files
Generate/update public README.md (see template below)
Report completion:
Export complete!
Files written: 24
Files sanitized: 6
Files copied unchanged: 18
Destination: ~/repos/claude-code-skills/
If auto-commit enabled in config:
Changes staged:
M skills/writeup/SKILL.md
M skills/coach/SKILL.md
A skills/new-skill/SKILL.md
Commit with message: "Sync skills from local - 2025-01-10"? [y/n]
If not:
To commit these changes:
cd ~/repos/claude-code-skills
git add .
git commit -m "Sync skills from local - 2025-01-10"
git push
Generate/update this in the destination:
# Claude Code Skills
A collection of skills for [Claude Code](https://claude.ai/code).
## Installation
Copy the skills you want to `~/.claude/skills/`:
\`\`\`bash
# Clone this repo
git clone https://github.com/[username]/claude-code-skills.git
# Copy all skills
cp -r claude-code-skills/skills/\* ~/.claude/skills/
# Or copy individual skills
cp -r claude-code-skills/skills/brainstorming ~/.claude/skills/
\`\`\`
## Customization
Some skills reference placeholder paths like `[YOUR_PATH]` or `[YOUR_NAME]`.
Search for these and replace with your actual values:
\`\`\`bash
grep -r "\[YOUR" ~/.claude/skills/
\`\`\`
## Available Skills
| Skill | Description |
| ----- | ----------- |
[Auto-generated from skill descriptions]
## Skill Structure
Each skill lives in its own directory:
\`\`\`
skills/
skill-name/
SKILL.md # Main skill definition
references/ # Optional supporting files
\`\`\`
## License
[LICENSE]
---
Exported from local skills on [DATE].
With --dry-run:
DRY RUN - No files will be written
Would sanitize:
- writeup/SKILL.md (4 replacements)
- coach/SKILL.md (1 replacement)
- content-from-briefing/SKILL.md (2 replacements)
Would copy unchanged:
- brainstorming/SKILL.md
- code-reviewer/SKILL.md
[...]
Would generate: README.md
With --scan-only:
Create ~/.claude/sync-skills-config.md with required settings.
Initialize the destination as a git repo first, or remove the git checks from config.
The sanitization rules didn't catch everything. Check the verification report and add missing patterns to your config.
Your config is missing sanitization rules for some personal content. Add the patterns to the config.
| Command | What it does |
|---|---|
/sync-skills-public |
Full sync workflow |
/sync-skills-public --dry-run |
Preview without writing |
/sync-skills-public --scan-only |
Just scan for sensitive content |