agentleFS
lingengyuanlingengyuan/my-skills/.claude/skills/sync-to-github/SKILL.md

sync-to-github

Skill9 starsChanged 2 months agoMITView on GitHub

Safely prepare, commit, and optionally push Git changes. Use when the user asks to commit, commit and push, sync to GitHub, save work to Git, inspect staged changes, or generate a commit message.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    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
  1. Distinctive:

    Check the intended diff for secrets and unintended generated files.

    line 11
  2. Very specific:

    When committing, use the bundled tools/git_sync.py if it fits the required scope, or ordinary Git for precise control.

    line 12
  3. Distinctive:

    If nothing changed, report that result.

    line 13
  4. Distinctive:

    Verify the exact remote ref after pushing.

    line 15
  5. Distinctive:

    Do not add assistant co-author trailers unless requested.

    line 17

≈ “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.

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

Sync to GitHub

Match the operation to the user's request: inspection or commit-message drafting is read-only; commit requests authorize a local commit; push/sync requests authorize the corresponding push. Do not commit merely because this Skill was selected.

  1. Inspect status, staged and unstaged diffs, current branch and relevant remotes. Isolate task-related changes and preserve unrelated staged work.
  2. Check the intended diff for secrets and unintended generated files; stage only authorized paths or hunks. Never use blanket staging to capture unrelated work.
  3. When committing, use the bundled tools/git_sync.py if it fits the required scope, or ordinary Git for precise control. A script dependency is not a blocker. Preview the actual staged diff and message yourself; existing commit authorization needs no additional approval.
  4. If nothing changed, report that result. If a local commit already exists and a push is requested, continue the push even when the index is empty. After committing, do not invoke another commit-only path merely to push.
  5. Push only within the requested destination and scope; never force-push or rewrite unrelated history by inference. On rejection, inspect the cause, preserve work, and resolve routine divergence in an isolated checkout when appropriate.
  6. Verify the exact remote ref after pushing. Report actual local/remote status and any blocker; do not describe an unpushed local commit as synchronized.

Do not add assistant co-author trailers unless requested. A push does not by itself prove deployment; verify CI or deployment only when required by the user's requested outcome or project checks.

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.