agentleFS
sabirmgdsabirmgd/terminal-first-goal-loop/skills/sync-project/SKILL.md

sync-project

Skill2 starsChanged 2 months agoMITView on GitHub

Fetch, prune, and report status across one repo or a multi-repo umbrella while preserving dirty trees and surfacing divergence instead of silently resetting anything.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this when a project or umbrella workspace needs a clean read on branch state before planning, implementation, or reporting.

    line 8
  2. Distinctive:

    check whether the tree is clean or dirty

    line 29
  3. Distinctive:

    Never reset a dirty tree.

    line 52
  4. Distinctive:

    Never switch branches just to make the report look clean.

    line 53
  5. Distinctive:

    If a repo has no upstream or no remote, say so plainly.

    line 55
  6. Distinctive:

    every repo in scope has a fresh remote view and status report

    line 68

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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 Project

Use this when a project or umbrella workspace needs a clean read on branch state before planning, implementation, or reporting.

Goal

Bring remote knowledge up to date without disturbing local work.

Safe default actions

  • fetch remotes
  • prune stale remote references
  • inspect branch state
  • report divergence
  • report dirty worktrees

This skill does not reset, discard, rebase, or rewrite local work by default.

Workflow

For each repo in scope:

  1. detect the current branch
  2. check whether the tree is clean or dirty
  3. fetch from the configured remote
  4. prune stale remote references if safe
  5. compare local branch, upstream branch, and merge base
  6. report divergence and blocked states

Output

Return one compact block per repo:

Repo:
Current branch:
Dirty:
Upstream:
Ahead/behind:
Diverged:
Open blocker:
Next safe action:

Rules

  1. Never reset a dirty tree.
  2. Never switch branches just to make the report look clean.
  3. Never hide divergence.
  4. If a repo has no upstream or no remote, say so plainly.
  5. Preserve user worktrees and uncommitted work.

Good use

  • sync before cutting a worktree
  • sync before planning a feature
  • sync an umbrella project before a daily report

Stop rules

Stop when:

  • every repo in scope has a fresh remote view and status report
  • a repo is blocked by auth or a dirty-tree condition that needs human judgment

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.