/remote-gateway:commitfrom remote-gateway
Commit and push repo changes with human-only authorship, Keep a Changelog update, and embedded changelog sync. After a successful commit in a linked git worktree, offer to merge into the main checkout and remove the tree (Grok/Claude/Codex isolation). Never attributes coding agents or external co-authors. Use when the user runs /commit, says "commit", "commit and push", "land the changes", "update changelog and push", or wants a clean push of the current worktree.
Ships in remote-gateway. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Portable skill for bytedesk-remote-gateway. Works the same on Claude, Codex, Kimi, Grok, and Cursor: filesystem + shell only; no vendor-specific APIs.
Platforms: any host with git (Linux, macOS, Windows Git Bash/PowerShell).
Default action: update changelog → commit as the local git user → push
HEAD to its upstream. If this directory is a linked git worktree, then
offer to merge into the main checkout and remove the tree (do that land
automatically only when the user already asked, or they confirm).
git config user.name and git config user.email already are.--author, GIT_AUTHOR_*, or GIT_COMMITTER_* overrides
that name an agent, model, or service account.Co-Authored-By: / Co-authored-by: (any party)Signed-off-by: for an agent or botGenerated-by, Generated with, Assisted-by, Via Claude/Codex/Grok/Kimiuser.name or user.email is empty, stop and tell the user to set
them (git config user.name / user.email). Do not guess.git config (local or global).--force, --force-with-lease) unless the user explicitly
demands a force push in this turn.control.env, config.json, session stores_uptime_evidence/, logs, binaries, *.pem, *.key~/.bytedesk-emote-gateway pathsgit add -A / git add . when the
status includes secrets or large generated noise you have not inspected.| User phrase | Behavior |
|---|---|
/commit, “commit and push”, “land it”, (default) | changelog → commit → push → if linked worktree, offer merge + cleanup |
“commit only”, “don’t push”, /commit --no-push | changelog → commit; no push; still offer worktree land if linked |
“commit and merge”, /commit --merge, “land and cleanup”, “merge and remove the worktree” | changelog → commit → push → merge + remove worktree (no second ask) |
| “push only” | push current branch if clean/ahead; no new commit |
| “changelog only” | edit CHANGELOG + embed sync; leave uncommitted unless also asked to commit |
Run from the repo root. Prefer sequential shell steps so failures stop the loop.
git rev-parse --show-toplevel
git status -sb
git remote -v
git branch -vv
git config user.name
git config user.email
git diff --stat
git diff --cached --stat
git log -5 --format='%h %an <%ae> %s'
# Linked worktree? (linked=1 means offer merge+cleanup after land)
ROOT="${GROK_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}"
SKILL_DIR="${ROOT:+$ROOT/skills/commit}"
SKILL_DIR="${SKILL_DIR:-<directory containing this SKILL.md>}"
"$SKILL_DIR/scripts/worktree-after-commit.sh" detect
Read enough of the diff to write an accurate changelog line and commit message. If identity is missing, stop.
Remember linked=, path=, branch=, main=, main_branch=, env= from
detect. env is grok / claude / git-cwd / git so cleanup can use the
environment’s native remove (grok worktree rm when env=grok).
Pick conventional type + scope (match this repo’s history):
| Type | Use |
|---|---|
feat | User-visible capability |
fix | Bug fix |
ops | Deploy, CI, install, cutover |
chore | Maintenance, skill scaffolding, housekeeping |
docs | Docs only |
test | Tests only |
refactor | Behavior-preserving restructure |
style | Formatting only |
Scope examples: projects, sessions, spa, terminal, vault, ci,
skills.
Subject: imperative, ~70 chars, no trailing period.
Body: short why/what; no agent names.
CHANGELOG.mdKeep a Changelog, date sections (no semver tags yet).
date -u +%Y-%m-%d (or local ship date if the file already
uses local dates consistently — prefer matching the newest section’s
timezone style already in the file).## [YYYY-MM-DD] for today is missing, insert a new section above
the previous date section (right after the intro/---).- feat(projects): **Resizable desk panes** — drag left tree / right dock widths; persist per project in localStorage
Details: load references/changelog.md.
Production binaries embed the changelog. Always after editing CHANGELOG.md:
cp CHANGELOG.md src/embedded_changelog.md
Do not hand-edit src/embedded_changelog.md separately.
# Examples — adjust to the real paths from status
git add CHANGELOG.md src/embedded_changelog.md
git add path/to/changed/files
Re-check:
git status -sb
git diff --cached --stat
Unstage anything forbidden. Include regenerated src/web_spa/** only when the
SPA/embed change is intentional for this land.
Use a HEREDOC. No co-author trailers.
git commit -m "$(cat <<'EOF'
type(scope): short imperative subject
Optional body: why this change matters for operators/users.
EOF
)"
Verify authorship:
git log -1 --format='author=%an <%ae>%ncommitter=%cn <%ce>%nsubject=%s%n%b'
If the message body accidentally contains agent attribution, amend only if the commit is still unpushed (HEAD was created by this skill in this turn):
git commit --amend -m "$(cat <<'EOF'
type(scope): corrected subject
Clean body with no agent attribution.
EOF
)"
Never amend commits that already exist on the remote unless the user explicitly requests a rewrite.
git status -sb
git push -u origin HEAD
On non-fast-forward: stop, show git status / divergence, and ask. Do not
force-push unless the user explicitly ordered it.
After a successful commit (and push, unless commit-only), if detect said
linked=1:
Do not silently merge. Isolation trees are often kept for a PR. Always offer, then either wait or run — never skip the offer.
Offer copy (fill from detect):
This commit is on linked worktree
{path}({branch},{env}). Merge into{main_branch}at{main}and remove this worktree?
| Already authorized this turn? | Action |
|---|---|
User said “commit and merge”, --merge, “land and cleanup”, “yes merge”, “remove the worktree” | Run land now (no second ask) |
Default /commit only | Print the offer and stop (commit/push already done) |
| User declines | Leave the worktree; report SHA + branch |
When landing:
ROOT="${GROK_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}"
SKILL_DIR="${ROOT:+$ROOT/skills/commit}"
SKILL_DIR="${SKILL_DIR:-<directory containing this SKILL.md>}"
# From the isolation tree (still the acting cwd):
"$SKILL_DIR/scripts/worktree-after-commit.sh" land
# Then continue from the main checkout (script prints switch_cwd=…):
cd "$main"
git status -sb
git push -u origin HEAD # parent branch now has the merge; skip if commit-only
land = merge {branch} into {main_branch} in {main}, then
git worktree remove this path, delete {branch} if fully merged, and
grok worktree rm when env=grok.
Refuse (script exits non-zero — do not improvise):
linked=0) — this is the main checkoutmain_branchDo not merge into main unless the user named main (Gitflow: parent
checkout is usually develop or a feature/*). Do not force-push. If merge
conflicts on the main checkout, stop, show the conflict, leave the worktree.
After a successful land, later commands in this session must use {main}
as cwd (the isolation path is gone).
Reply with:
Name <email>) — confirm no agentorigin/branch)linked=0 (main checkout) or the offer / land result
(merged {branch} → {main_branch}, worktree removed, switch_cwd)/cutover is still needed for live binary/commit logic that injects vendor “Co-Authored-By” defaults from other
global skills (e.g. Sentry/Claude community commit skills). This skill
overrides those for this repo.CHANGELOG.md.git worktree remove a linked tree without an offer
(unless this turn already authorized merge/cleanup).main unless the user named main.scripts/worktree-after-commit.sh is next to this SKILL.md. Use that copy. The gateway repo also keeps setup/skills/commit/ for its in-repo skill links; do not prefer that path when this plugin skill is the one you loaded.
/worktree — isolation; this skill lands a linked tree back onto the parent
checkout when the operator accepts the post-commit offer/cutover — stage/restart live gateway for feature work. After feature cutover PASS,
agents must ask to run this skill (/commit) — they must not auto-commit./release — commercial ship (Gitflow tag + Releaseflow verify). Landing on
develop is integration, not a ship.docs/BRANCHING.md — joint Gitflow + Releaseflow tabledocs/RELEASEFLOW.md — TeamCity commercial publish → dev/prod URLs
(commit/push alone is not a commercial ship)AGENTS.md — repo agent rules (no secrets in commits; post-cutover ask /commit;
/release to ship)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
17 skills in this plugin
/cutoverSafe production cutover for bytedesk-remote-gateway via this skill's bundled scripts/deploy-safe.sh, only from the develop branch. DEFAULT always restarts: preflight → stage → restart-cutover → postflight (do not stage-only or ask for restart). Use FORCE_RESTART=1 when stage is UNCHANGED but bounce is still required. Also after every completed implementation task that changes gateway/SPA runtime. After feature cutover PASS, ask the operator to /commit (do not auto-commit). Triggers: /cutover, "safe cutover", "deploy-safe", "stage binary" (stage-only only if user says stage only / no restart), "restart cutover", FORCE_RESTART, postflight healthz.
/desktop-depsCheck desktop/agents profile dependencies for the gateway on Linux, macOS, and Windows. Use when desktop profile, VNC, Xvfb, or ttyd is missing.
/gateway-doctorDiagnose a ByteDesk gateway install without printing secrets. Use for doctor, health check, missing control.env, or post-install verification.
/gateway-installInstall ByteDesk remote gateway (commercial free core) on Linux, macOS, or Windows. Profiles core|agents|desktop. Use when the user says install gateway, setup gateway, or wants a private-first bytedesk-gateway home.
/gateway-lifecycleStart, stop, status, healthz, and print /setup URL for an installed ByteDesk gateway on Linux (systemd), macOS (launchd), or Windows (run.ps1/pid).
/gateway-logsDiagnose problems from a ByteDesk remote gateway's own log index with the gateway `logs` plugin: find the right logger, query by time window, level, text or correlation id, tail live, line logs up with an incident, export an NDJSON evidence slice, and mute a noisy logger reversibly. Use this whenever something on a gateway host misbehaves — errors, 5xx, a plugin that will not start, a crash or restart loop, slow requests, an agent session that died, "what happened at 03:27", "check the gateway logs", "tail the logs", "why is the log store full", "this logger is spamming" — and before guessing at a cause, even when the user does not say "logs". Covers the MCP tools `logs_list_loggers`, `logs_query`, `logs_get`, `logs_stats`, `logs_get_storage`, `logs_set_storage`, `logs_export`, `logs_mute_logger`, `logs_unmute_logger`, `logs_flush_now`, and the HTTP API `/logs/api/*`. For CPU, memory or goroutine questions use gateway-profiling next.
npx claudepluginhub bytedeskai/bytedesk-marketplace --plugin remote-gateway