Skip to content
Agentmart
Submit a tool

remote-dev-sync

在算力更强的远端机器改代码、本地机器 git pull 后运行的同步工作流。覆盖首次环境配置(探测网络/配代理/对齐三端)与日常同步循环(远端 commit→push→本地 pull→run)。触发词:远端开发、远端改代码本地运行、远端机器开发本地跑、remote dev sync、本地拉远端代码跑、用远端算力开发。

Skill by wangjs-jacky

IndexedMIT★ 15
Write a review

Chalk Labs

Need help deploying remote-dev-sync?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/wangjs-jacky-remote-dev-sync

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

在算力更强的远端机器改代码、本地机器 git pull 后运行的同步工作流。覆盖首次环境配置(探测网络/配代理/对齐三端)与日常同步循环(远端 commit→push→本地 pull→run)。触发词:远端开发、远端改代码本地运行、远端机器开发本地跑、remote dev sync、本地拉远端代码跑、用远端算力开发。

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/remote-dev-sync

What's inside

Skill name
remote-dev-sync
Description
在算力更强的远端机器改代码、本地机器 git pull 后运行的同步工作流。覆盖首次环境配置(探测网络/配代理/对齐三端)与日常同步循环(远端 commit→push→本地 pull→run)。触发词:远端开发、远端改代码本地运行、远端机器开发本地跑、remote dev sync、本地拉远端代码跑、用远端算力开发。
License
MIT
Instructions
239 lines in SKILL.md · view on GitHub

Before installing

  • Instructions call the network

Files (2)

  • .gitignore
  • SKILL.md

SKILL.md (first lines)

<role>
你是一个「远端开发 / 本地运行」的 git 同步工作流专家。帮助用户在一台算力更强的远端机器上改代码,本地机器只负责拉取并运行,全程用 git 做中转。
</role>

<purpose>
当用户想「在远端机器开发、本地机器跑」时,建立并驱动一条可靠的 git 同步链路:首次把两端环境探测、配通、对齐;之后每次一键完成「远端提交 → 推送 → 本地拉取 → 本地运行」。所有机器相关的具体值(host、路径、代理、分支、运行命令)都参数化,不写死在本 skill 里——本机已跑通的真实环境沉淀到 gitignored 的 `experience.local.md`,本 skill 可分享给任何人。
</purpose>

<trigger>
远端开发 / 远端改代码本地运行 / 用远端算力开发 / remote dev sync / 本地拉远端代码跑 / 远端机器开发本地跑
</trigger>

<yolo:config>
  <yolo:mode>auto-advance</yolo:mode>
  <yolo:safety-gates>
    <gate>push 到受保护分支(main / master / release*)或任何 force / --force-with-lease push</gate>
    <gate>三端对齐时出现「非 fast-forward / 分叉」(有覆盖丢提交风险)</gate>
    <gate>写入/修改远端机器的 git 全局配置(如配代理)前</gate>
    <gate>任何 reset --hard / clean -fd / 删除分支 等破坏性操作</gate>
    <gate>探测不到运行命令、或运行命令疑似有副作用(部署、迁移、发布)时</gate>
  </yolo:safety-gates>
</yolo:config>

<gsd:workflow>
  <gsd:meta>
    <name>remote-dev-sync</name>
    <trigger>远端开发、远端改代码本地运行、remote dev sync、用远端算力开发、本地拉远端代码跑</trigger>
    <requires>Bash(ssh/git), Read, Write, Edit, AskUserQuestion</requires>
    <constraints>
      <constraint>本 skill(SKILL.md)严禁出现任何真实的 host/IP、绝对路径、用户名、仓库名、分支名、代理端口、token —— 一律用 $VAR 或 &lt;占位符&gt;,真实值只存 experience.local.md(gitignored)</constraint>
      <constraint>每个外部依赖(ssh、git、远端仓库、代理、运行命令)都必须先探测、缺失给降级,不假设作者本机环境</constraint>
      <constraint>YOLO 模式下安全门(yolo:safety-gates)仍需人工确认</constraint>
      <constraint>绝不自动 force push、绝不自动 reset --hard、绝不向受保护分支自动 push</constraint>
      <constraint>对齐三端只用 fast-forward;一旦分叉立即停下交给用户决定(rebase/merge/放弃)</constraint>
    </constraints>
  </gsd:meta>

  <gsd:goal>建立并驱动「远端改、本地拉、本地跑」的 git 同步链路,首次配置 + 日常同步全自动,关键风险点人工确认</gsd:goal>

  <gsd:phase name="load-config" order="1">
    <gsd:step>读取本机 experience.local.md,有配置→直接进入 sync,无→进入 setup</gsd:step>
  </gsd:phase>
  <gsd:phase name="setup" order="2" condition="无本机配置 或 --setup">
    <gsd:step>探测两端(ssh/git/仓库/分支/remote)、探测网络与代理、配通、fast-forward 对齐三端、探测运行命令、写入 experience.local.md</gsd:step>
  </gsd:phase>
  <gsd:phase name="sync" order="3">
    <gsd:step>远端 commit→push→本地 pull→本地 run,一气呵成,仅安全门阻塞</gsd:step>
  </gsd:phase>
  <gsd:phase name="sediment" order="4">
    <gsd:step>过程中发现新模式/踩坑,写回 experience.local.md 的「有效/失败模式」表</gsd:step>
  </gsd:phase>
</gsd:workflow>

---

# Remote Dev Sync — 远端开发 / 本地运行

> 一句话:在强机器(远端)改代码,弱机器(本地)`git pull` 后运行,git 做中转。本机的具体环境沉淀在 `experience.local.md`,本文件保持通用可分享。

## 一、模型与角色

```
[远端机器 = 开发端]  改代码 → commit → push ─┐
                                            ├─→ [中转: GitHub fork 或 点对点]
[本地机器 = 运行端]  pull ← ───────────────┘  → run
```

- **远端(开发端)**:算力/环境更强,跑编辑器或 AI 编码、build。仓库路径 `$REMOTE_REPO`,ssh 目标 `$REMOTE_SSH`。
- **本地(运行端)**:只 `git pull` 后运行 `$RUN_CMD`。仓库路径 `$LOCAL_REPO`。
- **中转方式 `$SYNC_VIA`**:
  - `github`:两端都 push/pull 同一个远程(如 fork 的 `origin`)。需要两端都能访问该 git 远程(可能要代理)。
  - `p2p`:本地直接把远端机器当 git remote(走内网/SSH),不经任何托管平台。远端连不上 GitHub 时这是最省事的兜底。

## 二、参数(全部来自 experience.local.md / 探测 / 询问,永不写死)

| 变量 | 含义 | 缺失时如何获得 |
|------|------|---------------|
| `$REMOTE_SSH` | 远端 ssh 目标 `user@host` | 询问用户 |
| `$REMOTE_REPO` | 远端仓库绝对路径 | ssh 后 `find`/询问 |
| `$LOCAL_REPO` | 本地仓库绝对路径 | 当前目录/询问 |
| `$BRANCH` | 工作分支 | `git rev-parse --abbrev-ref HEAD` |
| `$GIT_REMOTE` | git 远程名(如 origin) | `git remote`(多个则询问哪个可 push) |
| `$SYNC_VIA` | `github` 或 `p2p` | 由「远端能否访问该 git 远程」探测结果决定 |
| `$PROXY` | 远端访问 git 远程所需代理 URL(可选) | 探测远端代理进程/端口 |
| `$RUN_CMD` | 本地运行命令 | 探测 package.json/Makefile/询问 |

> **隐私边界**:以上变量的*真实值*只允许出现在 `experience.local.md`(gitignored)。本 SKILL.md 及任何会进 git 的产物里只能出现变量名或占位符。

## 三、Phase 1 — 加载本机配置

```bash
EXP="$(dirname "$0")/experience.local.md"   # 与 SKILL.md 同目录
```

- `experience.local.md` 存在 → 从中读出全部 `$VAR`,**跳到 Phase 3(sync)**。
- 不存在,或用户带了 `--setup` → 进入 Phase 2。

## 四、Phase 2 — 首次配置(setup)

逐项探测 → 配通 → 对齐 → 落盘。**每个外部依赖先探测,缺失给降级。**

### 2.1 探测两端基础

```bash
# ssh 连通(免密优先)
ssh -o BatchMode=yes -o ConnectTimeout=8 "$REMOTE_SSH" 'echo OK: $(hostname)'
# 远端仓库存在 + 分支 + remote
ssh "$REMOTE_SSH" "cd $REMOTE_REPO && git rev-parse --abbrev-ref HEAD && git remote -v"
# 本地仓库 + 分支 + remote
git -C "$LOCAL_REPO" rev-parse --abbrev-ref HEAD; git -C "$LOCAL_REPO" remote -v
```

- ssh 不通 → 提示配置免密(`ssh-copy-id`)或检查网络,不继续。
- 远端无仓库 → 询问是否 `git clone`(用 `$GIT_REMOTE` 的 URL),或让用户给已有路径。
- 两端分支/remote 不一致 → 记录,后续对齐时统一。

### 2.2 探测网络与代理(决定 `$SYNC_VIA`)

```bash

From wangjs-jacky/jacky-skills, MIT.

More from wangjs-jacky/jacky-skills

Signals

Stars
15
Forks
4
Open issues
2
Last commit (this folder)
Jul 11, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from wangjs-jacky

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get remote-dev-sync running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying remote-dev-sync?

CallGet help
Cite this page

remote-dev-sync skill. Agent Mart. https://agentmart.dev/skills/wangjs-jacky-remote-dev-sync (last updated 2026-10-24)