This guide walks you through generating a development skill from a repository you have cloned, then using that skill in a different folder where you do your actual development work.
You have:
- A cloned repository (e.g.,
~/repos/my-project/) - where you pulled the code - A development folder (e.g.,
~/dev/my-project-work/) - where you actually write code - A public GitHub repository - the source of truth for issues and commits
You want the skill to be generated once, then available everywhere.
Skills are stored globally at ~/.claude/skills/<repo-name>/
This means:
- Generate the skill from any folder
- Use it from any other folder
- The skill auto-triggers when you mention the repo name
cd ~/repos/my-projectclaude/github-cloner owner/my-project
Or with the full URL:
/github-cloner https://github.com/owner/my-project
-
Analysis mode: Choose "Full clone" or "API only"
- If you're already in the repo folder, "API only" is often enough
- "Full clone" reads README, CLAUDE.md, .github/ for more context
-
Commit history: Choose 3/6/12 months based on repo activity
Claude will:
- Fetch issues from GitHub
- Fetch PRs from GitHub
- Fetch recent commits
- Analyze patterns
- Generate the skill
Files created at:
~/.claude/skills/my-project/
├── SKILL.md # Human-readable skill
└── analysis.json # Machine-readable data
cd ~/dev/my-project-workclaudeThe skill triggers when you:
- Mention the project name
- Work on files related to the project
- Ask about development conventions
You can also explicitly reference it:
Using the my-project skill, what are the commit conventions?
Let's say you have:
- Repo:
https://github.com/acme/widget-app - Clone location:
/Users/you/repos/widget-app - Dev location:
/Users/you/work/widget-features
Generate the skill:
cd /Users/you/repos/widget-app
claude
# In Claude:
/github-cloner acme/widget-app
# Answer prompts, wait for generation
# Exit ClaudeUse the skill:
cd /Users/you/work/widget-features
claude
# The widget-app skill is now available!
# Ask: "What's the commit format for this project?"
# Ask: "Who are the main contributors?"
# Work on code with full contextWhen the repo has new commits, PRs, or issues:
# From any folder:
claude
/github-cloner acme/widget-appThe skill will be regenerated with fresh data.
ls ~/.claude/skills/You should see your project folder:
widget-app/
├── SKILL.md
└── analysis.json
If you want another LLM (Gemini, GPT, etc.) to use this data:
-
Copy the files:
cp ~/.claude/skills/widget-app/analysis.json /path/to/other/location/ -
Give the other LLM these instructions:
Read the file analysis.json which contains repository analysis: - contributors: Who works on what - conventions: Commit and PR patterns - recent_prs: Current development context - feature_areas: What areas of the codebase exist Use this to understand the project's development patterns.
-
Generate once, use everywhere - The skill is global, not tied to a folder
-
API-only is often enough - If you just need issues/PRs/commits, skip the clone
-
Re-generate periodically - Keep the skill fresh with new commits/PRs
-
Check the analysis.json - It has structured data you can parse or share
-
Works with private repos - Just make sure
gh auth loginhas access
"gh: command not found"
brew install gh
gh auth login"Could not fetch repo metadata"
- Check you have access to the repo
- Run
gh auth statusto verify authentication
Skill not showing up
- Check
ls ~/.claude/skills/for the folder - Restart Claude Code to reload skills
Want to delete a skill
rm -rf ~/.claude/skills/my-project/