Create a structured notes directory for studying and documenting remote GitHub repositories...
Facilitate studying and documenting remote GitHub repositories by creating a structured workspace with:
Use this skill when the user:
Example requests:
The skill creates the following structure:
reference/repo/<github-org-or-user>/<reponame>/
āāā notes/ # Committed - contains markdown notes about the repo
ā āāā README.md # Initial note file with repo metadata
āāā code/ # Gitignored - contains the cloned repository
āāā ... # Contents of the cloned repo
Design rationale:
New in v2: The skill is now worktree-aware and optimizes for git worktree workflows.
When invoked from a git worktree (e.g., /workspace/wip/username-123-feature):
/workspace/reference/repo/<org>/<repo>/code/ (shared)/workspace/wip/username-123-feature/reference/repo/<org>/<repo>/notes/ (local)When invoked from root (/workspace):
/workspace/reference/repo/<org>/<repo>/ (current behavior)Shared code directory:
Worktree-local notes:
# From worktree
cd /workspace/wip/codekiln-173-fix-skill
.claude/skills/setup-remote-repo-notes-dir/scripts/setup_repo_notes.sh https://github.com/anthropics/claude-code
# Result:
# Code: /workspace/reference/repo/anthropics/claude-code/code/ (shared)
# Notes: /workspace/wip/codekiln-173-fix-skill/reference/repo/anthropics/claude-code/notes/ (local)
# From another worktree
cd /workspace/wip/codekiln-180-another-feature
.claude/skills/setup-remote-repo-notes-dir/scripts/setup_repo_notes.sh https://github.com/anthropics/claude-code
# Result:
# Code: /workspace/reference/repo/anthropics/claude-code/code/ (reused!)
# Notes: /workspace/wip/codekiln-180-another-feature/reference/repo/anthropics/claude-code/notes/ (new)
Use the bundled bash script to set up the structure automatically:
.claude/skills/setup-remote-repo-notes-dir/scripts/setup_repo_notes.sh <github-url>
Example:
.claude/skills/setup-remote-repo-notes-dir/scripts/setup_repo_notes.sh https://github.com/anthropics/claude-code
reference/repo/<org>/<repo>/code/ subdirectoryreference/repo/**/code/ directoriesThe script accepts multiple GitHub URL formats:
https://github.com/owner/repohttps://github.com/owner/repo.gitgit@github.com:owner/repo.gitFor custom setups or when the script cannot be used, manually perform these steps:
<org> and <repo>mkdir -p reference/repo/<org>/<repo>/notes
mkdir -p reference/repo/<org>/<repo>/code
git clone <github-url> reference/repo/<org>/<repo>/code
reference/repo/**/code/After running the setup:
Explore the cloned code:
cd reference/repo/<org>/<repo>/code
# Read files, run the project, analyze structure
Document findings in notes:
# Edit notes/README.md or create additional markdown files
cd reference/repo/<org>/<repo>/notes
Commit notes to version control:
git add reference/repo/<org>/<repo>/notes
git commit -m "š docs: add notes for <org>/<repo>"
Code directory remains gitignored - can delete and re-clone anytime
.claude/skills/setup-remote-repo-notes-dir/scripts/setup_repo_notes.sh https://github.com/anthropics/claude-code
Result:
reference/repo/anthropics/claude-code/
āāā notes/
ā āāā README.md # "# claude-code" with metadata
āāā code/ # Full clone of anthropics/claude-code
.claude/skills/setup-remote-repo-notes-dir/scripts/setup_repo_notes.sh https://github.com/facebook/react
Result:
reference/repo/facebook/react/
āāā notes/
ā āāā README.md # "# react" with metadata
āāā code/ # Full clone of facebook/react
scripts/setup_repo_notes.sh
./setup_repo_notes.sh <github-url>
0 - Success1 - Error (invalid URL, clone failure, etc.)"Invalid GitHub URL format"
https://github.com/owner/repo"Repository already cloned"
".gitignore already contains pattern"
Clone fails with authentication error
git@github.com:owner/repo.gitThis skill complements:
code/ directory is fully gitignored and can be safely deletednotes/ for organization