sync-team-profiles
Skill6 starsChanged 3 months agoMITView on GitHub
Fetch (or refresh) registered team-profile sources — git clone on first run, shallow git fetch + reset on subsequent runs — and register discovered profiles under a namespace. TRIGGER when the user says "sync team profiles", "pull the latest team profiles", "refresh team profiles", "update team profiles", "sync from <team-name> profile source", "fetch profiles from the team repo", "/nyann:sync-team-profiles". Do NOT trigger on "add a new team profile source" (that's `add-team-source` — registers without pulling). Do NOT trigger on "sync my branch" (that's the `sync` skill — feature-branch rebase/merge). Do NOT trigger on "install a profile" from a URL when no source is registered yet — walk the user through `add-team-source` first.
- Deletes or force-pushes
In this repository41 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-team-sourceSkill
- bootstrap-projectSkill
- check-prereqsSkill
- cleanup-branchesSkill
- commitSkill
- diagnoseSkill
- diff-profileSkill
- doctorSkill
- explain-diffSkill
- explain-stateSkill
- fleet-retrofitSkill
- fleetSkill
- gen-ciSkill
- gen-claudemdSkill
- gen-dependency-updaterSkill
- gen-devcontainerSkill
- gen-templatesSkill
- gh-protectSkill
- hotfixSkill
- iac-applySkill
- iac-planSkill
- inspect-profileSkill
- learn-profileSkill
- migrate-profileSkill
- new-branchSkill
- optimize-claudemdSkill
- prSkill
- record-decisionSkill
- releaseSkill
- retrofitSkill
- route-docsSkill
- settingsSkill
- setupSkill
- shipSkill
- suggestSkill
- syncSkill
- undo-bootstrapSkill
- undoSkill
- wait-for-pr-checksSkill
- watchSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 37
When the user names a specific source ("sync just the platform- team profiles"), pass --name <source> so unrelated sources don't get pulled.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
sync-team-profiles
Wraps bin/sync-team-profiles.sh.
On first run it shallow-clones each registered team-profile source
(git clone --depth=1); on subsequent runs it does a shallow fetch
(git fetch --depth=1) and git reset --hard FETCH_HEAD to advance
to the latest commit. Every profile under the cache is then validated
against profiles/_schema.json, and valid profiles are registered
under <source-name>/<profile-name>.
1. Pre-flight
- Config at
~/.claude/nyann/config.jsonmust have at least one entry inteam_profile_sources[]. If empty, route toadd-team-sourcefirst. - Uses the sync interval from each source. When the user says
"force refresh" / "ignore the interval" / "pull now", pass
--force. - When the user names a specific source ("sync just the platform-
team profiles"), pass
--name <source>so unrelated sources don't get pulled.
2. Invoke
bin/sync-team-profiles.sh \
[--user-root <dir>] \
[--force] \
[--name <source>]Network operation. Expect up to a few seconds per source. The backend is resilient — a failing source logs the error and moves on to the next.
3. Interpret the JSON summary
Top-level shape is four arrays (see schemas/team-sync-result.schema.json):
synced[]— sources that pulled this run. Each entry:{name, synced_at}.skipped[]— sources within their interval window. Each entry:{name, reason: "within-interval", next_due}. Tell the user the next-due timestamp; they can re-run with--forceif they need to pull immediately.registered[]— every profile that passed schema validation. Each entry:{source, name, namespaced, path}. Thenamespacedfield is what to use withbootstrap-project --profile <namespaced>.invalid[]— anything that didn't make it through (fetch failure, clone failure, hand-edited config with a bad ref/url, TOCTOU on the cache dir, profile that fails schema validation). Each entry:{name|source, kind, error}wherekindis one ofinvalid-name,invalid-ref,invalid-url,fetch-failed,clone-failed,toctou,invalid-schema. Show these but don't treat any single one as fatal — the script logs and moves on to the next source.
4. After sync
- Tell the user how many profiles are newly available.
- Suggest
inspect-profile <source>/<name>to see what a specific team profile does. - Suggest
bootstrap-project --profile <source>/<name>to apply one to a repo.
5. When a source errors
git clone/git fetchfailures are usually auth or network issues and surface ininvalid[]withkind: clone-failedorfetch-failed. The error string passes throughnyann::redact_urlbefore reaching the JSON, so any embeddedhttps://<token>@hostcredentials are scrubbed — safe to relay verbatim. Don't try to auth-fix on the user's behalf.- Corrupted cache (
<user-root>/cache/<source>/contains partial data) — safe to delete the cache dir and re-run. Confirm before deleting; it's a file-system mutation.
When to hand off
- "Add a new source" →
add-team-source. - "My team profile collides with a starter profile" — by design, user + team profiles can shadow starters. Clarify which version will win (user > team > starter) and let the user decide if the shadow is intentional.
- "Drift detection: is my cached team profile out of sync with the
remote?" → that's
check-team-drift(separate backend; not in this skill's scope).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

