Λογότυπο Ghsync

Ghsync

Κοινότητα
bjcoombs
ghsync

Bulk clone and keep in sync every repo you can access on GitHub or GitLab. GitHub: an org's repos via your teams plus the org repo list, or a personal account's repos. GitLab (--provider gitlab --host <host>): every project in every group you belong to, with nested subgroups and projects shared into those groups, laid out under its path_with_namespace; --group narrows to one subtree, and --porcelain / --from-list split discovery from cloning for hosts reachable only from another network. Deduplicates, then clones new repos and fast-forward syncs existing ones (and their worktrees) into a <path>/<repo>-main + <path>/worktree layout. TRIGGER when the user types /ghsync, wants to clone or sync all org repos, their personal repos or all GitLab group projects, asks to mirror everything they have access to on GitHub or a GitLab host, is onboarding into a new enterprise, org or GitLab group, or wants to refresh their local checkouts to latest.

Επισκόπηση

Εκδότηςbjcoombs
Αποθετήριοai-native-toolkit
Όνομα δεξιότηταςghsync
Αστέρια
32
Forks
6
Συνοδευτικά αρχεία
1
Άδεια χρήσηςApache-2.0
Σύνδεσμοι
  • Οδηγίες σε Markdown

    Ένα αρχείο SKILL.md που το μοντέλο φορτώνει όταν χρειάζεται, ώστε να καταναλώνει token μόνο όταν ένα αίτημα είναι πράγματι σχετικό.

  • Λειτουργεί με οποιοδήποτε LLM

    Οι δεξιότητες AI είναι απλό Markdown, όχι κώδικας για συγκεκριμένο πάροχο, επομένως αυτή η δεξιότητα λειτουργεί με GPT, Claude, Gemini, Grok ή ένα τοπικό μοντέλο.

  • 1 συνοδευτικά αρχεία

    Σενάρια, πρότυπα και υλικό αναφοράς που μπορεί να διαβάζει το μοντέλο καθώς εργάζεται. Τα αρχεία είναι μόνο για ανάγνωση και δεν εκτελούνται ποτέ.

  • Ανοιχτού κώδικα

    Δημοσιεύτηκε από bjcoombs στο GitHub. Διαβάστε το πηγαίο περιεχόμενο πριν εγκαταστήσετε τη δεξιότητα.

Εγκατάσταση

Εγκαταστήστε τη δεξιότητα AI Ghsync στο TypingMind για να τη χρησιμοποιείτε με οποιοδήποτε LLM ή προσθέστε τη σε άλλον πράκτορα AI που διαβάζει αρχεία SKILL.md.

1

Εγκατάσταση στο TypingMind

Το TypingMind εγκαθιστά μια δεξιότητα απευθείας από τον φάκελό της στο GitHub — διαβάζει το SKILL.md, συγκεντρώνει τα συνοδευτικά αρχεία σε πακέτο και αποθηκεύει το αποτέλεσμα τοπικά.

  1. Ανοίξτε την εφαρμογή και μεταβείτε στα Πρόσθετα → Δεξιότητες.
  2. Επιλέξτε «Εγκατάσταση από GitHub».
  3. Επικολλήστε το παρακάτω URL του φακέλου της δεξιότητας και επιβεβαιώστε.
    https://github.com/bjcoombs/ai-native-toolkit/tree/main/skills/ghsync
  4. Ενεργοποιήστε τη δεξιότητα σε κάθε συνομιλία όπου θέλετε να είναι διαθέσιμη.
Πρόσθετα → Δεξιότητες → Νέα δεξιότητα → Από URL του GitHub, έπειτα επικολλήστε το URL του φακέλου και πατήστε «Συνέχεια».
2

Εγκατάσταση σε άλλον πράκτορα AI

Κάθε πράκτορας AI που διαβάζει τη μορφή Agent Skills μπορεί να χρησιμοποιήσει αυτή τη δεξιότητα — αντιγράψτε τον φάκελο στον κατάλογο δεξιοτήτων του.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/bjcoombs/ai-native-toolkit.git /tmp/ai-native-toolkit
mkdir -p .claude/skills
cp -r /tmp/ai-native-toolkit/skills/ghsync .claude/skills/ghsync
Επανεκκινήστε το Claude Code μετά την αντιγραφή, ώστε να εντοπίσει τη νέα δεξιότητα.

Χρησιμοποιήστε τη στο TypingMind

Ενεργοποιήστε τη δεξιότητα Ghsync σε οποιαδήποτε συνομιλία στο TypingMind και το μοντέλο αναλαμβάνει τα υπόλοιπα. Το όνομα και η περιγραφή της περιλαμβάνονται στην προτροπή συστήματος και, μόλις προκύψει ένα σχετικό αίτημα, το μοντέλο φορτώνει μόνο του τις πλήρεις οδηγίες — δεν χρειάζεται ποτέ να την καλείτε χειροκίνητα και δεν καταναλώνει token μέχρι να χρησιμοποιηθεί πραγματικά.

Το μοντέλο φορτώνει αυτόματα τη δεξιότητα Ghsync μόλις λάβει ένα σχετικό αίτημα.

Λειτουργεί με οποιοδήποτε μοντέλο AI

Οι δεξιότητες AI είναι απλές οδηγίες Markdown και όχι κώδικας για συγκεκριμένο πάροχο, οπότε η δεξιότητα Ghsync δεν περιορίζεται στο μοντέλο για το οποίο γράφτηκε. Εγκαταστήστε τη μία φορά στο TypingMind και χρησιμοποιήστε τη με GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ή ένα τοπικό μοντέλο που εκτελείτε εσείς — πάντα με τα δικά σας κλειδιά API.

  • Φόρτωση μόνο όταν χρειάζεται

    Η προτροπή συστήματος περιλαμβάνει μόνο το όνομα και την περιγραφή. Οι οδηγίες ανακτώνται με το πρώτο σχετικό αίτημα, οπότε μια δεξιότητα που δεν χρησιμοποιείται δεν έχει κόστος.

  • Αλλάξτε μοντέλα κατά τη συνομιλία

    Επειδή η δεξιότητα αποτελείται από οδηγίες και όχι από κώδικα, η αλλαγή μοντέλου δεν επηρεάζει τη λειτουργία της — το επόμενο μοντέλο διαβάζει το ίδιο αρχείο SKILL.md.

Οδηγίες δεξιότητας

Αυτό είναι το περιεχόμενο του αρχείου SKILL.md που φορτώνει το μοντέλο. Διαβάστε το πριν από την εγκατάσταση — μια δεξιότητα αποτελείται από οδηγίες που θα ακολουθήσει το μοντέλο σας.

ghsync: mirror and sync every repo you can access on GitHub or GitLab

Onboarding into a new enterprise means finding and cloning dozens of repos by hand, then drifting out of date. This skill does both halves: it discovers everything you can reach and keeps it in sync.

  • First run — clones every accessible repo into a worktree-friendly layout.
  • Every run after — fast-forward updates repos already on their default branch, updates their worktrees, and clones anything new. It never clobbers local work: repos with uncommitted changes or on a non-default branch are fetched but not pulled, and reported in the summary.

It is org-agnostic: point it at any GitHub org, GitHub Enterprise host, personal account, or a GitLab host (gitlab.com or self-managed) with --provider gitlab; see GitLab below. On GitHub: the script detects the account type itself. For an organization it unions the teams you belong to with the org's repo list (so direct-collaborator and public repos are included even with no team membership); for a personal account it uses the account's repo list (private repos included when it's your own account).

How to run it

The script lives next to this file. Claude Code writes this skill's directory into the script paths below when it loads the skill, so each path is already absolute:

bash
# Org is derived from the directory you run in. To mirror the "meridianhub"
# org, run from a directory named meridianhub:
cd ~/dev/github.com/meridianhub
bash "${CLAUDE_SKILL_DIR}/scripts/ghsync.sh"

The org defaults to the basename of the directory you launch from. So running inside ~/dev/github.com/meridianhub syncs the meridianhub org into that directory. Override the org name or target directory explicitly when they differ:

bash
bash "${CLAUDE_SKILL_DIR}/scripts/ghsync.sh" --org meridianhub --root ~/dev/github.com/meridianhub

What to do when invoked

  1. Confirm the target. Run with --list-repos first (or --list-teams for an org) so the user sees which account and how many repos before any cloning. This doubles as a check that the derived account name is correct.
  2. Dry run on first use against a new org (--dry-run) to preview clones and updates without touching disk.
  3. Run the real sync. Stream the output; the run ends with a summary (up-to-date / updated / failed / uncommitted / branch issues / worktrees).
  4. Surface the exceptions. Call out anything under Failed, Uncommitted changes, or Not on default branch — these are the repos the user may need to deal with manually.

Flags

FlagEffect
--provider github|gitlabWhich host type to sync (default: github)
--root DIRDirectory to clone into; an explicit --root must already exist, in every mode (GitHub default: current directory; GitLab default: ~/dev/<host> with any :port dropped, created on the first real sync)
--list-reposList the deduplicated accessible repos and exit
--porcelainMachine-readable repo list: one path per line to stdout (GitHub: the repo name; GitLab: path_with_namespace), all chatter to stderr; implies --list-repos. Consumed by /ghreport and by --from-list.
--dry-runShow what would be cloned/updated without making changes. On GitLab it creates no directory and writes no .gh_archived_repos; on GitHub it still refreshes .gh_archived_repos in the root
--limit NProcess only the first N repos (useful for a quick test)
--quietSuppress per-repository chatter; keep the final summary
--org NAMEGitHub only. Org or personal account to sync (default: basename of --root / cwd)
--list-teamsGitHub only. List your teams in the org (with repo counts) and exit; orgs only
--host HOSTGitLab only. Host to sync (default: gitlab.com); https:// and a trailing / are accepted, and so is a web port (host:8443)
--group PATHGitLab only. Sync one group and its subgroups instead of every group you belong to. Covers every project the group shows you, including when you belong only to a subgroup of it (projects directly in the group and in sibling subgroups count). If the group itself cannot be read, the run syncs your subgroups under it and prints one stderr warning naming them and what was skipped; it fails only when nothing under the group is reachable
--from-list FILEGitLab only. Sync the paths in FILE (the --porcelain format; blank lines and # comments ignored) with no discovery and no glab

A flag that belongs to the other provider is rejected with an error, not ignored.

GitLab

bash
# Every project in every group you belong to on gitlab.com, into ~/dev/gitlab.com/
bash "${CLAUDE_SKILL_DIR}/scripts/ghsync.sh" --provider gitlab --list-repos
bash "${CLAUDE_SKILL_DIR}/scripts/ghsync.sh" --provider gitlab

# One group subtree on a self-managed host, into ~/dev/gitlab.example.com/
bash "${CLAUDE_SKILL_DIR}/scripts/ghsync.sh" --provider gitlab --host gitlab.example.com --group platform/infra
  • Discovery runs through glab api --paginate: the groups you belong to (groups?min_access_level=10), each group's descendant_groups, and each group's projects and projects/shared. Dedupe is on path_with_namespace, so a project reachable directly and through sharing, or shared into two groups, is cloned once.
  • Layout: each project lands under its own path_with_namespace, so nested subgroups become nested directories and a shared project from another namespace sits under that namespace, not under the group it was shared into: ~/dev/<host>/<group>/<subgroup>/<repo>/<repo>-main plus a sibling worktree/.
  • Archived and empty projects are skipped, as on GitHub.
  • Clone URLs are built from the host: https://<host>/<path>.git, or git@<host>:<path>.git with GHSYNC_GIT_PROTOCOL=ssh. For HTTPS on a private project, let glab auth login set up git credentials. A port on --host is the web and API port: it stays in the HTTPS URL and is dropped from the SSH URL. Set a non-standard SSH port for the host in ~/.ssh/config.
  • Default root: ~/dev/<host>, with any port dropped, so --host gitlab.example.com:8443 syncs into ~/dev/gitlab.example.com/. Two instances on one host name but different ports would share that root: give one an explicit --root.
  • Preview runs (--list-repos, --porcelain, --dry-run) create no directory and write no .gh_archived_repos, so the list can be produced on a machine that will never hold the checkouts. An explicit --root must still exist.
  • Path rules follow GitLab's (lib/gitlab/path_regex.rb): a segment starts with a letter, digit, _ or . (so grp/.dotfiles syncs), then letters, digits, _, - and .. Segments . and .., any segment ending in .git or .atom, and .git in any case are skipped with a warning. So is a first segment, in any case, that names one of ghsync's own root entries (.gh_archived_repos, or .gh_sync_tmp, which older versions delete on every run); deeper segments may use those names.
  • Fail fast: before any discovery call, the script checks that glab and jq are installed and that glab auth status --hostname <host> passes. A failure prints one line naming the host and the check (installed, authentication or reachability) and exits non-zero. It does not retry, and it never tunnels or works around network controls.

Hosts reachable only from another network

Discovery needs the GitLab API; cloning needs only git. When the two are reachable from different places, split the run:

bash
# 1. Where the API answers: save the project list.
bash "${CLAUDE_SKILL_DIR}/scripts/ghsync.sh" --provider gitlab --host gitlab.example.com --porcelain > projects.txt

# 2. Where git reaches the host: clone and sync from the list. No glab needed.
bash "${CLAUDE_SKILL_DIR}/scripts/ghsync.sh" --provider gitlab --host gitlab.example.com --from-list projects.txt

Step 2 builds the same layout as a discovery run and makes no API call. Edit the list to drop projects; --limit applies to it too.

Layout produced

<root>/<path>/       # GitHub: the repo name; GitLab: path_with_namespace
  ├── <repo>-main/   # default-branch checkout, kept clean and up to date
  └── worktree/      # ready for `git worktree add ...`

This matches the worktree convention the rest of the toolkit assumes: <repo>-main stays on the default branch and clean, and feature work happens in sibling worktrees.

Sync safety rules

  • Repos with uncommitted changes (staged or unstaged edits to tracked files; untracked files do not count) are fetched but not pulled (reported under Uncommitted changes).
  • Repos not on their default branch are fetched but not pulled (reported under Not on default branch).
  • Updates are fast-forward only (git pull --ff-only) — no merge commits, no rebases, never a force.
  • Worktrees on the default branch with no local changes are fast-forwarded too.
  • A repo that exists locally without the <repo>-main structure is flagged (Wrong structure) rather than touched.

Requirements & configuration

  • GitHub: gh and jq on PATH, and gh auth status must be authenticated. The script checks both up front.
  • GitLab: glab and jq on PATH, and glab auth status --hostname <host> must pass (--from-list needs only git and jq).
  • GitHub Enterprise: gh uses its configured host. Target a GHE instance by setting GH_HOST=github.example.com or running gh auth login --hostname github.example.com first.
  • Access model: for an organization, repos are discovered by unioning two sources and deduplicating: the teams you belong to (gh api user/teams) and the org repo list (gh repo list <org>), which also surfaces public repos and repos reachable via direct collaborator grants outside any team. Team membership is not a precondition — a user on no team still syncs every repo they can otherwise access. For a personal account, repos come from gh repo list <account> (includes private repos when authenticated as that account). Empty repos with no default branch are skipped in both cases.
  • Blacklist: export GHSYNC_BLACKLIST="repo-a repo-b" to skip oversized or problematic repos. Entries are repository paths (group/sub/repo on GitLab).
  • timeout: optional but recommended (brew install coreutils) — caps each repo at 5 minutes so one hung clone can't stall the run.
  • Archived repos are skipped from cloning and cached to <root>/.gh_archived_repos for reference.

Συνοδευτικά αρχεία

Το μοντέλο τα διαβάζει όποτε χρειάζεται, όσο η δεξιότητα είναι φορτωμένη. Διατίθενται ως αρχεία για ανάγνωση και δεν εκτελούνται ποτέ.

Συχνές ερωτήσεις

Τι κάνει η δεξιότητα AI Ghsync;

Bulk clone and keep in sync every repo you can access on GitHub or GitLab. GitHub: an org's repos via your teams plus the org repo list, or a personal account's repos. GitLab (--provider gitlab --host <host>): every project in every group you belong to, with nested subgroups and projects shared into those groups, laid out under its path_with_namespace; --group narrows to one subtree, and --porcelain / --from-list split discovery from cloning for hosts reachable only from another network. Deduplicates, then clones new repos and fast-forward syncs existing ones (and their worktrees) into a <p...

Γιατί να χρησιμοποιήσετε τη δεξιότητα Ghsync στο TypingMind;

Επειδή την εγκαθιστάτε μία φορά και τη χρησιμοποιείτε με οποιοδήποτε μοντέλο. Η Ghsync είναι απλό Markdown και όχι κώδικας ειδικά για κάποιον πάροχο, επομένως η ίδια δεξιότητα λειτουργεί με GPT-5, Claude, Gemini, Grok ή ένα τοπικό μοντέλο — και μπορείτε να αλλάξετε μοντέλο κατά τη διάρκεια της συνομιλίας χωρίς να διακοπεί η λειτουργία της. Το TypingMind λειτουργεί με τα δικά σας κλειδιά API, οπότε πληρώνετε απευθείας τους παρόχους αντί για συνδρομή ανά θέση χρήστη, ενώ οι δεξιότητες και οι συνομιλίες σας παραμένουν στον δικό σας χώρο αποθήκευσης.

Πώς εγκαθιστώ τη Ghsync στο TypingMind;

Στο TypingMind, ανοίξτε Πρόσθετα → Δεξιότητες → Εγκατάσταση από το GitHub και επικολλήστε το https://github.com/bjcoombs/ai-native-toolkit/tree/main/skills/ghsync. Το TypingMind διαβάζει το αρχείο SKILL.md, συγκεντρώνει τα συνοδευτικά αρχεία και εγκαθιστά τη δεξιότητα, την οποία μπορείτε να ενεργοποιείτε ανά συνομιλία.

Ποια μοντέλα AI μπορούν να χρησιμοποιήσουν τη δεξιότητα Ghsync;

Οποιοδήποτε μοντέλο συνδέετε στο TypingMind. Οι δεξιότητες AI είναι απλές οδηγίες Markdown και όχι κώδικας ειδικά για κάποιον πάροχο, επομένως τα GPT, Claude, Gemini, Grok και τα τοπικά μοντέλα μπορούν όλα να φορτώσουν αυτή τη δεξιότητα όταν ένα αίτημα αντιστοιχεί σε αυτή.

Με πόσα μοντέλα AI μπορώ να χρησιμοποιήσω τη Ghsync;

Με όσα θέλετε. Εφόσον ένα μοντέλο υποστηρίζει δεξιότητες, μπορείτε να χρησιμοποιήσετε τη Ghsync με αυτό — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama και άλλα — όλα στο TypingMind με τα δικά σας κλειδιά API.

Είναι δωρεάν η δεξιότητα AI Ghsync;

Ναι. Δημοσιεύεται στο GitHub από τον χρήστη bjcoombs με την άδεια χρήσης Apache-2.0. Πληρώνετε μόνο τον δικό σας πάροχο AI για τα token που χρησιμοποιείτε.

Τι είναι οι δεξιότητες AI;

Μια δεξιότητα AI είναι ένα επαναχρησιμοποιήσιμο πακέτο οδηγιών που διδάσκει σε ένα μοντέλο AI πώς να εκτελεί μια συγκεκριμένη εργασία. Ακολουθεί την ανοιχτή μορφή Agent Skills: ένα αρχείο SKILL.md με όνομα και περιγραφή, μαζί με τυχόν σενάρια κώδικα, πρότυπα ή αρχεία αναφοράς που μπορεί να χρειαστεί το μοντέλο. Το μοντέλο διαβάζει τις οδηγίες μόνο όταν το αίτημά σας αντιστοιχεί στη δεξιότητα, οπότε μια εγκατεστημένη δεξιότητα δεν κοστίζει τίποτα μέχρι να χρησιμοποιηθεί.

Σε τι διαφέρουν οι δεξιότητες AI από τα πρόσθετα ή τους συνδέσμους MCP;

Ένα πρόσθετο ή ένας σύνδεσμος MCP παρέχει στο μοντέλο νέα εργαλεία που μπορεί να καλέσει — κώδικα που εκτελείται κάπου και επιστρέφει ένα αποτέλεσμα. Μια δεξιότητα AI παρέχει αντί γι’ αυτό γνώσεις και διαδικασίες στο μοντέλο: πώς να προσεγγίσει μια εργασία, ποια βήματα να ακολουθήσει και ποια χαρακτηριστικά έχει ένα καλό αποτέλεσμα. Οι δεξιότητες είναι απλό Markdown, επομένως δεν χρειάζονται διακομιστή, κλειδί API ή περιβάλλον εκτέλεσης και λειτουργούν με οποιοδήποτε μοντέλο.

Προβολή όλων

Στήστε δικό σας χώρο εργασίας AI τώρα

Εγγραφείτε στο ενημερωτικό μας δελτίο για να ενημερώνεστε για νέες λειτουργίες και μελλοντικές κληρώσεις δώρων 👇