From devops-toolkit
Use when cloning repositories, deciding where to place a project, reorganizing misplaced repos, checking for Go vs non-Go projects, or auditing repository locations across the home directory.
How this skill is triggered — by the user, by Claude, or both
Slash command
/devops-toolkit:git-repo-organizerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Organize git repositories by language following GOPATH conventions for Go and `~/src/` for everything else.
Organize git repositories by language following GOPATH conventions for Go and ~/src/ for everything else.
digraph placement {
"New repository" [shape=box];
"Is it primarily Go?" [shape=diamond];
"~/go/src/github.com/org/repo" [shape=box, color=blue];
"~/src/github.com/org/repo" [shape=box, color=green];
"New repository" -> "Is it primarily Go?";
"Is it primarily Go?" -> "~/go/src/github.com/org/repo" [label="yes"];
"Is it primarily Go?" -> "~/src/github.com/org/repo" [label="no"];
}
| Project Type | Location |
|---|---|
| Go projects | ~/go/src/github.com/org/repo |
| Python, JS, Rust, etc. | ~/src/github.com/org/repo |
| Mixed (primarily Go) | ~/go/src/... |
| Mixed (other primary) | ~/src/... |
# Check for Go indicators
test -f go.mod && echo "Go project"
find . -maxdepth 2 -name "*.go" | head -1
Quick inspection before cloning:
git clone [email protected]:org/repo.git /tmp/repo-check
cd /tmp/repo-check
if [ -f "go.mod" ] || [ -n "$(find . -maxdepth 2 -name '*.go')" ]; then
echo "Go → ~/go/src/github.com/org/repo"
else
echo "Other → ~/src/github.com/org/repo"
fi
rm -rf /tmp/repo-check
Go projects:
mkdir -p ~/go/src/github.com/org
cd ~/go/src/github.com/org
git clone [email protected]:org/repo.git
Non-Go projects:
mkdir -p ~/src/github.com/org
cd ~/src/github.com/org
git clone [email protected]:org/repo.git
Find all repositories:
find ~/go/src -name ".git" -type d -maxdepth 5
find ~/src -name ".git" -type d -maxdepth 3
Find misplaced Go projects in ~/src:
for dir in ~/src/*; do
[ -f "$dir/go.mod" ] && echo "Misplaced Go: $dir"
done
Check for uncommitted changes:
for dir in ~/go/src/github.com/*/*; do
[ -d "$dir/.git" ] && cd "$dir" && \
! git diff-index --quiet HEAD -- 2>/dev/null && \
echo "Uncommitted: $dir"
done
git remote -v to get org/repomv ~/src/project ~/go/src/github.com/org/repocd new/path && go build (for Go projects)| Task | Command |
|---|---|
| Clone Go project | mkdir -p ~/go/src/github.com/org && cd $_ && git clone ... |
| Clone other project | mkdir -p ~/src/github.com/org && cd $_ && git clone ... |
| Find all repos | find ~/go/src ~/src -name ".git" -type d |
| Check if Go | test -f go.mod |
| Create worktree | gwt <branch-name> (see git-worktree-manager skill) |
For parallel development on multiple branches, use the gwt function which creates worktrees under .worktrees/ inside the repo root. See the git-worktree-manager skill for full documentation.
cd ~/src/github.com/org/repo
gwt feat-new-api # creates .worktrees/feat-new-api
cd .worktrees/feat-new-api
npx claudepluginhub knowledgexhunta/devops-toolkit --plugin devops-toolkitGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.