agentleFS
GiuseppeBellamacinaGiuseppeBellamacina/claude-code-sync/skills/push/SKILL.md

push

Skill1 starsChanged 54 days agoMITView on GitHub

Save this machine's personal Claude Code setup (settings, plugins, MCP, skills, agents, hooks, LSP) into a local sync folder, plus instructions for the external tools; with --cloud also upload everything as one private Claude Artifact, so no USB stick or file transfer is needed. Use when the user runs /setup-sync:push.

  • Reads credentials
  • Installs packages

55 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use get-pr-reviews, push-everything and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • saffron-healthSkill

    get-pr-reviews

    Get nicely formatted output of the last review comments on a PR. Used internally by other skills.

    Also in 3 projects that use this

  • saffron-healthSkill

    push-everything

    Stage ALL changes in the repository (not just session changes), commit, and push. Use when you need to commit all pending changes.

    Also in 3 projects that use this

  • NVIDIASkill

    generate-spec

    Produce a feature specification covering API changes, backward compatibility, cross-language impact, performance, and a file-level change plan. Use when designing a new feature, planning a significant change, or the user asks to spec something out.

    Also in 3 projects that use this

  • ddehartSkill

    knowledge-graph

    Search, capture, and query the claude-code-plugins knowledge graph. Use when asked to "capture this", "add this to the graph", "what do we know about X", "update the graph", "check the graph for X", or when a decision, pattern, or non-obvious fact surfaces mid-session that's worth recording. Also: "log an observation", "what patterns do we have about skill triggering", "any decisions on the knowledge-commons plugin", "what do we know about the commit-creator agent".

    Also in 3 projects that use this

  • MicrosoftSkill

    discover

    Also in 4 projects that use this

  • MicrosoftSkill

    merge

    Merge changes from the topic branch to the merge base branch. Use when the user wants to merge their session's work back to the base branch.

    Also in 3 projects that use this

  • +2 more from saffron-health
  • +1 more from microsoft

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 0 are distinctive, and 7 are very specific to this project.

  • 0

    Common

    Most of the 47 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    leave something out: --exclude <selectors>.

    line 17
  2. Very specific:

    Before adding a file with --add, look at its name and, if in doubt, its content.

    line 21
  3. Very specific:

    Write the commands for this machine's OS, and add the equivalents for the other systems when you know them (for example winget install ...

    line 45
  4. Very specific:

    Use this shape per item: ## <name> / what and why / commands (one block, in order) / verify / needs user (login, secret, confirmation).

    line 47
  5. Very specific:

    Write <folder>/push-report.md with the full detail below, then show the user the compact chat version (see *Chat format* after the …

    line 66
  6. Very specific:

    If it refuses because the page would exceed the Artifact size limit, show the largest files it lists and offer to push again with --exclude …

    line 92
  7. Very specific:

    Add a row to the chat report: Artifact | ✅ published <link> (or ⚠️/❌ with the reason).

    line 97

“Common” is measured: kept by at least 6 in 10 of the 47 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Sync push

Target folder: $ARGUMENTS if given, otherwise ~/.claude-sync.

0. Understand what the user asked

$ARGUMENTS may hold, besides the folder, a request in plain words, in any language: "everything except MCP", "only plugins and settings", "skip hooks and my CLAUDE.md", "also include ~/.gitconfig and ~/notes", "also note that I use ripgrep". Turn it into flags for the scripts:

  • --cloud (or "upload it", "save it online"): after the snapshot is verified, also publish it as an Artifact (step 5). It does not change what is synced.
  • leave something out: --exclude <selectors>; sync only some things: --only <selectors>; add files or folders outside ~/.claude: --add <path> (repeatable; only paths inside the home folder).
  • Categories: plugins, marketplaces, mcp, settings (top-level setting names), hooks, skills, agents, commands, output-styles, themes, workflows, mods, claude-md, keybindings, extra. A selector is a category or category:name for one item (mcp:docs-langchain, plugin:ponytail, settings:theme, agents:reviewer.md).
  • What flags cannot express is yours to handle: an extra tool or command to install goes into externals.md; "don't document external tools" means skip step 2 and say so in the report.
  • Secrets are never included, whatever the request: redaction stays on. If the user asks to sync a secret, explain and offer to document where to get it again.
  • Before adding a file with --add, look at its name and, if in doubt, its content. Refuse or ask for anything that looks like credentials (.env, private keys, token files, credentials*).

Say your interpretation in one line before running ("Syncing everything except MCP servers, plus ~/.gitconfig."). Ask (AskUserQuestion) only when the request is really ambiguous. With no request, sync everything.

1. Snapshot the simple parts (deterministic)

node "${CLAUDE_PLUGIN_ROOT}/scripts/export.mjs" --dir "<folder>" [--exclude ...] [--only ...] [--add ...]

If ${CLAUDE_PLUGIN_ROOT} was not expanded, the script is under ~/.claude/plugins/cache/cosmic-plugins/setup-sync/. It writes manifest.json (settings incl. hooks/enabledPlugins/skillOverrides, user MCP servers, marketplaces, tool inventory) and files/ (hand-made skills, agents, commands, output styles, themes, workflows, CLAUDE.md, keybindings.json, and mods: every plugin folder found in ~/.claude/dev-mods/*/ or listed in CLAUDE_CODE_PLUGIN_DIRS, without node_modules or the generated .claude-plugin/types). Secret-looking env/header values are already replaced by <REDACTED>.

2. Write <folder>/externals.md (your job)

Everything that is not a plain Claude Code command needs written instructions so the pull side can replay it. Read manifest.json (inventory, settings, mcpServers) and the real machine, then document each item in install order:

  • Prerequisites: node/npm, python, uv, git, gh (with the versions found).
  • LSP servers: the *-lsp plugins only register a command; list the binaries they need (check each plugin's .lsp.json/manifest under ~/.claude/plugins/cache/) and the exact install command (e.g. npm install -g pyright typescript typescript-language-server), taken from inventory.npmGlobals.
  • External tools with their own skill/CLAUDE.md block (graphify, hf CLI, etc.): install command, the follow-up command (e.g. graphify install), a verify command, and what is per-project and therefore NOT part of the sync.
  • Hooks and statusLine in settings.json: for each command, say which script/binary it runs, whether it lives in a plugin (then nothing to do) or at a machine-specific absolute path (then say what must be recreated or adapted).
  • Mods: for each mod copied, read its hooks module and manifest. If it shells out ($.process), calls external binaries or MCP servers, reads files at absolute paths, or declares userConfig/pluginConfigs values, document that here. If it has a package.json with dependencies, add the install command. Mods keep cross-session data in $.store; that data is not synced, say so if a mod relies on it.
  • MCP servers: for each one in redacted, name the secret needed and where to obtain it. Never write secret values.
  • Not syncable: claude.ai account connectors (Microsoft 365 etc.) are tied to the account, mention them as informational only.

Write the commands for this machine's OS, and add the equivalents for the other systems when you know them (for example winget install ... / brew install ... / apt install ...), so a pull on another OS starts from something close. The snapshot records the OS it came from (manifest.json → platform).

Use this shape per item: ## <name> / what and why / commands (one block, in order) / verify / needs user (login, secret, confirmation). Verify every command against what is actually installed; do not invent steps.

3. Verify (do not skip)

node "${CLAUDE_PLUGIN_ROOT}/scripts/verify.mjs" --dir "<folder>"

It re-exports the machine into a temp folder and diffs it against the snapshot, scans the snapshot for secret-looking values (pattern names only), and checks externals.md. Exit code 2 means something is wrong. Act on the output before reporting:

  • differences: something changed since the export or was not captured. Re-run step 1 (and update externals.md if needed), then verify again.
  • possibleSecrets: find the value in the named file, remove or redact it, and verify again. Never print the matched text.
  • unmentionedInventory: tools found on the machine that externals.md does not mention. Add them, or tell the user you left them out on purpose.
  • externals.md check failed: write it.

Also confirm by hand what the script cannot see: every command in externals.md was checked against the machine, and every statusLine/hook command with an absolute path is flagged.

4. Report and checklist

Write <folder>/push-report.md with the full detail below, then show the user the compact chat version (see Chat format after the checklist):

# Setup Sync, push report (<date>, <OS>)
## Synced        counts by kind (marketplaces, plugins, MCP servers, skills, agents, commands, styles, themes, workflows, mods, settings entries, externals documented)
## Not synced    each item, why (not syncable / redacted secret / failed), and how to fix it
## Needs you     secrets to re-enter, logins, decisions
## Checklist
- [x] snapshot written and manifest valid
- [x] snapshot matches this machine (verify: no differences)
- [x] no secret-looking values in the snapshot
- [x] externals.md written; every external tool documented with a verified command
- [x] hooks/statusLine with machine-specific paths flagged
- [x] mods copied, their dependencies documented

Tick a box only with evidence from the verify output or a command you ran; otherwise leave it [ ] with the reason.

5. Upload as an Artifact (only with --cloud)

The whole snapshot (manifest.json, externals.md, push-report.md, every file under files/) becomes ONE self-contained HTML page. Do this after steps 3 and 4, so the page carries the verified externals.md and the report.

  1. Pack it. Write the page into your scratchpad directory (or the working directory), never into the sync folder:
    node "${CLAUDE_PLUGIN_ROOT}/scripts/pack.mjs" --dir "<folder>" --out "<scratchpad>/setup-sync-snapshot.html"
    If it refuses because the page would exceed the Artifact size limit, show the largest files it lists and offer to push again with --exclude for them. Do not try to trim anything yourself.
  2. Look for an earlier snapshot: Artifact with action: "list" and a title of Setup Sync Snapshot. If one exists, update it in place (read it first, as the tool requires, then publish with its url) so there is a single copy online; tell the user you replaced the old one.
  3. Otherwise publish with Artifact (file_path = the packed page, icon: "sync", description: one sentence with the date and the source OS). The page is private to the user's account by default; do not make it shared or public, and never publish it anywhere else.
  4. Give the user the artifact link and the one-line next step: on the other machine run /setup-sync:pull --cloud (or pass the link: /setup-sync:pull --cloud <link>). Remind them it holds their personal configuration (secrets are redacted), and that they can ask you to delete it once the pull is done.

Add a row to the chat report: Artifact | ✅ published <link> (or ⚠️/❌ with the reason). Never tick it without the publish result.

Chat format (what the user reads)

The file is the full record; in chat give a compact, scannable version, not the file pasted. Use this shape, omitting any block that would be empty:

## Setup Sync · {push|pull} {✅ done | ⚠️ done with N issues | ❌ failed}
`<folder>` · <date> · <OS>{ · mode: <mode>}

| Synced | |
| --- | --: |
| Marketplaces | 3 |
| Plugins | 19 |
| ... one row per kind that has items | n |

**Verification**
| Check | Result |
| --- | --- |
| Snapshot matches this machine | ✅ 0 differences |
| Secrets scan | ✅ 0 hits |
| ... one row per check that ran | ✅ / ⚠️ / ❌ + a few words |

**⚠️ Needs attention**
- `<item>`: <reason>. Fix: <one line>

**Next:** <the one thing to do now>

Rules: status emoji ✅ ⚠️ ❌ only; counts live in the table, not in prose; one line per issue, always with its fix; list kinds that have nothing in a single line ("None on this machine: skills, agents, mods"); never ✅ for something not verified (use ⚠️ and say why); no paragraphs, no repeating the checklist verbatim, end with the file path of the full report.

End with the folder path, a reminder that it can be moved to another machine (USB, cloud drive, private repo, or --cloud for a private Artifact) before /setup-sync:pull, and a warning that it holds personal config: never put it in a public repo.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.