plugins/ai-registry/skills/syncing-skills-to-github/SKILL.md
This skill should be used when the user wants to sync skills to GitHub, push skill changes to a remote repository, or back up local skills. Syncs Claude Agent Skills from ~/.claude/skills/ (local) to GitHub repository using git commands. Commits changes, pushes to remote, and updates Notion AI Building Blocks with GitHub URLs.
npx skillsauth add jamesgray-ai/handsonai syncing-skills-to-githubInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
⚡ This skill runs in Claude Code with access to your terminal and git credentials.
Sync Claude Agent Skills from ~/.claude/skills/ (local machine) to GitHub repository jamesgray007/agent-skills with detailed commit history and automated Notion tracking. Skills are stored in a flat directory structure. Part 2 of the two-skill export→sync workflow.
Trigger this skill after:
exporting-skills-from-claude)~/.claude/skills/~/.claude/skills/ using git status~/.claude/skills/ is a git repository[email protected]:jamesgray007/agent-skills.git or https://github.com/jamesgray007/agent-skills.git2d5edcfd-b924-80cf-a0a0-000ba0164e40~/.claude/skills/
├── .git/ # Git repository
├── README.md # Auto-generated skill index
├── generate-readme.sh # Script to regenerate README
├── aggregating-post-performance/
├── analyzing-hubspot-deals/
├── creating-lesson-content/
├── designing-course-syllabus/
├── exporting-skills-from-claude/
├── syncing-skills-to-github/
├── writing-launch-email-sequence/
├── writing-linkedin-posts/
├── writing-substack-posts/
└── [other skills...]
cd ~/.claude/skills
# Check if this is a git repo
if [ ! -d .git ]; then
echo "❌ Not a git repository. Initialize first:"
echo " cd ~/.claude/skills"
echo " git init"
echo " git remote add origin [email protected]:jamesgray007/agent-skills.git"
exit 1
fi
# Check remote
git remote -v
cd ~/.claude/skills
# Get status
git status --porcelain
# Parse output:
# M = Modified file
# A = Added file (staged)
# D = Deleted file
# ?? = Untracked file
# R = Renamed file
# Examples:
# ?? exporting-skills-from-claude/SKILL.md → New skill
# M writing-linkedin-posts/SKILL.md → Updated skill
# D old-skill/SKILL.md → Deleted skill
# Parse git status to identify which skill directories changed
# Extract skill-name from file paths
# Example logic:
git status --porcelain | \
grep -E "SKILL.md|references/" | \
sed 's|^...||' | \
cut -d'/' -f1 | \
sort -u
# Output: List of skill-name paths with changes
# e.g., writing-linkedin-posts, syncing-skills-to-github
Single Skill:
[CREATE|UPDATE|FIX] skill-name: Brief description
- What changed specifically
- Why this change was made
- Impact or benefit
Multiple Skills:
[SYNC] Updated N skills
New skills:
- skill-a: Description
- skill-b: Description
Updated skills:
- skill-c: What changed
- skill-d: What changed
Deleted skills:
- skill-e: Reason for removal
Semantic Prefixes:
[CREATE] - New skill added[UPDATE] - Existing skill modified[FIX] - Bug fix or correction[REFACTOR] - Code improvement, no functionality change[DOCS] - Documentation updates only[SYNC] - Batch commit of multiple changes[RETIRE] - Skill archived/deprecatedcd ~/.claude/skills
# Stage all changes
git add .
# Or stage specific skill
git add skill-name/
# Commit with generated message
git commit -m "$COMMIT_MESSAGE"
# Verify commit
git log -1 --oneline
cd ~/.claude/skills
# Push to main branch
git push origin main
# If push fails (e.g., branch diverged), handle appropriately
# Option 1: Pull and merge
git pull --rebase origin main
git push origin main
# Option 2: Force push (use with caution)
# git push --force origin main
For each skill that was synced, update the GitHub URL in Notion.
Instructions for Claude Code:
For each changed skill directory (e.g., "exporting-skills-from-claude"):
Search for the skill in Notion AI Building Blocks:
Notion:notion-searchquery: The skill directory name (e.g., "exporting-skills-from-claude")data_source_url: "collection://2d5edcfd-b924-80cf-a0a0-000ba0164e40"Extract the page ID from search results:
page_id from first result: results[0].idBuild the GitHub URL:
https://github.com/jamesgray007/agent-skills/tree/main/{skill-name}https://github.com/jamesgray007/agent-skills/tree/main/exporting-skills-from-claudeUpdate the Notion page:
Notion:notion-update-page{
"data": {
"command": "update_properties",
"page_id": "[page_id from step 2]",
"properties": {
"GitHub": "[github_url from step 3]",
"Status": "Deployed"
}
}
}
Handle errors:
Example execution:
Skill: syncing-skills-to-github
1. Search: Notion:notion-search
→ Found page_id: 2e1edcfd-b924-811a-99b7-c1d4724722fa
2. GitHub URL: https://github.com/jamesgray007/agent-skills/tree/main/syncing-skills-to-github
3. Update: Notion:notion-update-page
→ Updated GitHub URL ✓
→ Set Status to "Deployed" ✓
Result: ✅ Notion updated successfully
Auto-generate an index of all skills.
cd ~/.claude/skills
# Run the README generation script
./generate-readme.sh
# This script:
# - Scans all skill folders
# - Extracts skill descriptions from SKILL.md frontmatter
# - Generates a formatted README with a single table
# Stage and commit README
git add README.md
git commit -m "[DOCS] Update README with skill index"
git push origin main
Trigger: "Sync the exporting-skills-from-claude skill to GitHub"
Process:
~/.claude/skills/Example:
User: "Sync the writing-linkedin-posts skill to GitHub"
Claude (in Claude Code):
[Checking ~/.claude/skills/writing-linkedin-posts/...]
[Detected changes: SKILL.md modified]
Changes detected:
- writing-linkedin-posts/SKILL.md (modified)
Generating commit message...
[Staging changes...]
[Committing...]
[Pushing to GitHub...]
✅ Synced writing-linkedin-posts to GitHub
📝 Commit: abc123f
🔗 https://github.com/jamesgray007/agent-skills/tree/main/writing-linkedin-posts
[Updating Notion AI Building Blocks...]
✅ Updated GitHub URL in Notion
Complete!
Trigger: "Sync all changed skills to GitHub" or "Sync skills to GitHub"
Process:
git status to detect all changesExample:
User: "Sync all changed skills to GitHub"
Claude (in Claude Code):
[Scanning ~/.claude/skills/...]
[Running git status...]
Changes detected in 3 skills:
New skills:
- exporting-skills-from-claude
Modified skills:
- writing-linkedin-posts
- creating-video-content
Generating commit message...
[Staging all changes...]
[Committing...]
[Pushing to GitHub...]
✅ Synced 3 skills to GitHub
📝 Commit: def456g
🔗 https://github.com/jamesgray007/agent-skills
[Updating Notion AI Building Blocks for 3 skills...]
✅ Updated exporting-skills-from-claude
✅ Updated writing-linkedin-posts
✅ Updated creating-video-content
[Updating README.md...]
✅ Generated skill index
Complete! All skills are now synced.
Trigger: "Show what would sync to GitHub" or "Preview git sync"
Process:
Example:
User: "Show what would sync to GitHub"
Claude (in Claude Code):
[Scanning for changes...]
Would sync 2 skills:
Modified:
- writing-linkedin-posts/SKILL.md (347 lines changed)
- writing-linkedin-posts/references/HOOKS.md (new file)
Commit message would be:
---
[UPDATE] writing-linkedin-posts: Added 20 new hook templates
- New reference file with hook templates
- Updated main SKILL.md with examples
- Categorized by industry and use case
---
Ready to sync? (yes/no)
❌ Error: ~/.claude/skills is not a git repository
To fix:
1. cd ~/.claude/skills
2. git init
3. git remote add origin [email protected]:jamesgray007/agent-skills.git
4. git add .
5. git commit -m "[INIT] Initial skill repository"
6. git push -u origin main
❌ Error: Push rejected (branch diverged)
This means the remote has commits you don't have locally.
Options:
A) Pull and rebase (recommended)
B) Pull and merge
C) Force push (⚠️ destructive)
Which would you like?
If user chooses A:
git pull --rebase origin main
git push origin main
❌ Error: Merge conflicts detected
Conflicts in:
- writing-linkedin-posts/SKILL.md
You need to resolve these manually:
1. Open the file in your editor
2. Look for <<<<<<< HEAD markers
3. Resolve conflicts
4. git add writing-linkedin-posts/SKILL.md
5. git rebase --continue
6. git push origin main
Would you like me to show the conflicts?
⚠️ Warning: GitHub sync succeeded but Notion update failed
Skills synced to GitHub: 3
Notion updates failed: 1
- exporting-skills-from-claude (not found in AI Building Blocks)
GitHub URL: https://github.com/jamesgray007/agent-skills
Would you like to register the missing skill in Notion?
ℹ️ No changes detected in ~/.claude/skills/
Everything is already synced to GitHub.
Last sync: 2026-01-12 14:30:45
Last commit: abc123f "[UPDATE] writing-linkedin-posts: Added hooks"
Recommendation: Simple main-only
main branchv1.0-stable-2026-01Alternative: Development branch
main → Production-ready skills
development → Testing/in-progress skills
This skill is Part 2 of the workflow:
Complete workflow:
Claude.ai (/mnt/skills/user/)
↓ [Export]
Local (~/.claude/skills/)
↓ [Sync] ← This skill
GitHub (github.com/jamesgray007/agent-skills)
↓ [Update URLs]
Notion (AI Building Blocks database)
After successful GitHub sync:
Skills synced to GitHub can be:
jamesgray007/agent-skills is privateMorning (Claude.ai):
User: Create a skill for aggregating HubSpot metrics for weekly reviews
Claude: [Creates skill in Claude.ai]
[Skill saved to /mnt/skills/user/hubspot-metrics-aggregation/]
[Registered in Notion AI Building Blocks]
End of Day (Claude Desktop):
User: Export the hubspot-metrics-aggregation skill
Claude: [Exports to ~/.claude/skills/hubspot-metrics-aggregation/]
✅ Exported successfully
End of Day (Claude Code - terminal):
User: Sync the hubspot-metrics-aggregation skill to GitHub
Claude: [Detects new skill]
[Commits with "[CREATE] hubspot-metrics-aggregation: Pull weekly metrics"]
[Pushes to GitHub]
[Updates Notion]
✅ Complete!
Sunday Planning (Claude Code):
User: Sync all changed skills to GitHub
Claude: [Scanning...]
Changes detected in 5 skills:
New: 2 skills
- hubspot-metrics-aggregation
- email-response-templates
Updated: 3 skills
- writing-linkedin-posts (added hooks)
- creating-video-content (new platforms)
- syncing-skills-to-github (refactored for flat structure)
[Commits with batch message]
[Pushes to GitHub]
[Updates all 5 skills in Notion]
[Generates README.md via generate-readme.sh]
✅ Synced 5 skills
During work (Claude.ai):
User: The importing-maven-students skill is broken, fix it
Claude: [Fixes skill]
[Tests fix]
Immediately after (Claude Desktop):
User: Export importing-maven-students
Claude: [Exports to ~/.claude/skills/importing-maven-students/, conflict detected]
[Shows diff]
User: Overwrite with cloud version
Claude: [Overwrites]
✅ Exported
Immediately after (Claude Code):
User: Sync importing-maven-students to GitHub - urgent fix
Claude: [Detects changes in importing-maven-students]
[Commits: "[FIX] importing-maven-students: Fixed CSV parsing bug"]
[Pushes to GitHub]
[Updates Notion]
✅ Fix deployed!
jamesgray007/agent-skillsdocumentation
Write Standard Operating Procedure documentation for workflows and save as markdown files. Selects full or lightweight SOP template based on autonomy level (deterministic vs. guided/autonomous), then adapts for workflow type (Manual, Augmented, Automated). Use when the user asks to write an SOP, document a workflow, create procedure documentation, or capture how a workflow is executed. Triggers on "write an SOP", "document this workflow", "create operating instructions", "how is this workflow executed".
documentation
Write Business Process Guide documentation that explains when, why, and how to execute a complete business process with its component workflows, and save as markdown files. Use when documenting a business process end-to-end, creating playbooks, or explaining how multiple workflows fit together. Triggers on "write process guide", "document this process", "create a playbook for", "how do these workflows connect".
development
This skill should be used when the user wants to register or update AI building blocks (Skills, Agents, Prompts, Context MDs) in the Notion AI Building Blocks database. Triggers after skill creation, agent creation, prompt authoring, context MD updates, or when the user asks to register, add, or track a building block in Notion.
documentation
This skill should be used when the user wants to name a workflow, write workflow descriptions, standardize workflow documentation, add a workflow to Notion, or structure workflow entries. Generates consistent, outcome-focused names and descriptions for business workflows and creates entries in the Notion Workflows database.