スキル一覧に戻る
TaylorHuston

git-sync

by TaylorHuston

A customizable life management framework for Claude Code - skills, agents, and workflows for personal productivity

12🍴 2📅 2026年1月24日
GitHubで見るManusで実行

SKILL.md


name: git-sync description: "Sync all git repos - my-life top repo and spaces/ projects" model: claude-haiku-4-5-20251001 allowed-tools: Read, Glob, Bash

/git-sync

Synchronize all git repositories: the top-level my-life repo and the spaces/ projects.

Usage

/git-sync              # Check status of all repos and branches
/git-sync --pull       # Pull updates for all branches
/git-sync --push       # Push local commits for all branches
/git-sync --clone      # Clone missing repos

Implementation

This skill uses a Python script for reliable validation:

python .claude/skills/git-sync/scripts/sync.py --check   # Status report
python .claude/skills/git-sync/scripts/sync.py --pull    # Pull behind branches
python .claude/skills/git-sync/scripts/sync.py --push    # Push ahead branches
python .claude/skills/git-sync/scripts/sync.py --clone   # Clone missing repos
python .claude/skills/git-sync/scripts/sync.py --json    # JSON output
python .claude/skills/git-sync/scripts/sync.py --suggest-additions  # YAML for untracked repos

Run the script from the my-life repo root directory.

What It Validates

Top-Level Repo (my-life)

  • Branch status (ahead/behind/dirty/diverged)
  • Uncommitted changes
  • Sync status with remote

Index → Filesystem

  • Each project with code: path exists in spaces/
  • Git remote matches remote: in index
  • Branch status (ahead/behind/dirty/diverged)

Filesystem → Index

  • Finds repos in spaces/ not listed in CLAUDE.md
  • Suggests YAML to add them with --suggest-additions

Report Format

============================================================
GIT SYNC REPORT
============================================================

## Top-Level Repo (my-life)

  my-life (1 branch)
    ✓ main - Up to date

## Issues

  missing-repo
    Status: missing
    Directory does not exist
    Remote: https://github.com/user/repo.git

## Repositories

  coordinatr (2 branches)
    ✓ main - Up to date
    ↑ feature/001 - 3 commits to push

  yourbench (1 branch)
    ! main - 2 uncommitted files

## Not in Index

  ? django-tutorial
    Path: spaces/django-tutorial
    Remote: https://github.com/user/django-tutorial.git

------------------------------------------------------------
SUMMARY
------------------------------------------------------------
  Top-level repo:   1 (main: up to date)
  Indexed repos:    15 (14 ok, 1 missing)
  Remote-only:      6
  Not in index:     2

  Branches ahead:   1
  Branches behind:  0
  Branches dirty:   1
  Branches diverged:0
  Local-only:       0

Status Symbols

SymbolMeaning
Up to date
Behind remote (can pull)
Ahead of remote (can push)
Diverged (manual merge needed)
+Local only (no remote tracking)
?Not in index
!Dirty (uncommitted changes)
Error (check manually)

Safety

  • Never force push - if diverged, report and let user handle
  • Never auto-commit - dirty repos are reported, not modified
  • Fetch before status - ensure latest remote info
  • Fast-forward only - pulls fail safely if not fast-forward
  • Skip dirty branches - don't pull if uncommitted changes

Adding Repos to Index

Use --suggest-additions to get YAML:

python .claude/skills/git-sync/scripts/sync.py --suggest-additions

Output:

# Add to CLAUDE.md Projects Index:

  - name: django-tutorial
    code: spaces/django-tutorial/
    remote: https://github.com/user/django-tutorial.git
    branch: main
    status: active  # or: on-hold, archived, experiment

Error Handling

ErrorResolution
Clone failsCheck network, SSH keys, permissions
Remote mismatchUpdate CLAUDE.md or fix remote
Diverged branchesManual merge/rebase required
Missing remoteRepo may be local-only, skip sync

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です