AgentSkillsCN

repo-sync

将dmzoneill的所有GitHub仓库克隆或更新至~/src/。自动检测项目类型,检查CLAUDE.md文件,并报告仓库健康状况。在设置或刷新本地开发环境时使用此功能。

SKILL.md
--- frontmatter
name: repo-sync
description: Clone or update all dmzoneill GitHub repos to ~/src/. Detects project type, checks for CLAUDE.md, and reports repo health. Use when setting up or refreshing the local development environment.
argument-hint: [repo-name-or-all]
allowed-tools: Read, Grep, Glob, Bash(gh:*), Bash(git:*), Bash(ls:*)

Repo Sync

Sync dmzoneill's GitHub repositories to local ~/src/ directory.

Inputs

  • Target: $ARGUMENTS — a repo name, or "all" to sync everything

Process

1. Get Repo List

bash
gh repo list dmzoneill --limit 200 --json name,sshUrl,primaryLanguage,isArchived -q '.[] | select(.isArchived == false) | [.name, .sshUrl, .primaryLanguage.name] | @tsv'

Skip archived repos.

2. For Each Repo

If already cloned (~/src/{name} exists with .git/):

bash
git -C ~/src/{name} fetch --all --prune
git -C ~/src/{name} pull --rebase 2>&1

If not cloned:

bash
git clone {ssh_url} ~/src/{name}

3. Detect Project Type

After cloning/pulling, detect what kind of project it is:

Indicator FileProject Type
MakefileHas make targets (check for test, lint, setup)
Pipfile / requirements.txt / pyproject.tomlPython
package.jsonNode.js/JavaScript
Cargo.tomlRust
go.modGo
DockerfileContainerized
.github/workflows/main.ymlHas CI via dispatch.yaml
CLAUDE.mdHas Claude Code documentation

4. Report

Output a summary grouped by status:

  • Cloned: newly cloned repos with their language
  • Updated: repos with new commits pulled
  • Up-to-date: repos with no changes
  • Failed: repos that errored (with reason)

Then output project type stats:

  • Count by primary language
  • Count with/without CI workflows
  • Count with/without CLAUDE.md