agentleFS
alonbaronalonbaron/claude-skills/skills/up-to-date/SKILL.md

up-to-date

Skill13 starsChanged 35 days agoMITView on GitHub

Preflight sync and situational brief before repo work: fetches origin, reports ahead/behind divergence (with a no-upstream/detached-HEAD fallback), recent commits, open PRs and issues touching the work, and dirty-tree warnings, then names one recommended first action. Read-only by default — never pulls, rebases, merges, or discards local work without explicit confirmation.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. LeonMelamud/up-to-date-skill★ 4same name
    2. LeonMelamud/claude-code-security-review★ 2same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository5 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

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

    Only if asked, or the docs arg is given: for the key deps in play, use context7 (resolve-library-id → query-docs) to pull current API docs, …

    line 55
  2. Very specific:

    No mutating command (pull, rebase, merge, checkout, stash pop) without explicit user OK.

    line 60
  3. Distinctive:

    Verify or say you don't know.

    line 61
  4. Distinctive:

    No remote → nothing to sync.

    line 65
  5. Distinctive:

    When work is about to start in a repo with a remote, invoke this without being asked: announce in one line ("Running up-to-date on …

    line 70

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

Up To Date

!echo "--- git rev-parse --show-toplevel"; git rev-parse --show-toplevel 2>&1 || true; echo "--- git remote -v"; git remote -v 2>&1 || true; echo "--- git branch --show-current"; git branch --show-current 2>&1 || true; echo "--- git status --short"; git status --short 2>&1 || true; echo "--- git stash list"; git stash list 2>&1 || true; echo "--- git fetch --all --prune"; git fetch --all --prune 2>&1 || true; echo "--- git rev-list --left-right --count @{upstream}...HEAD"; git rev-list --left-right --count @{upstream}...HEAD 2>&1 || true; echo "--- git log --oneline -15"; git log --oneline -15 2>&1 || true; echo "--- gh pr list --limit 20"; gh pr list --limit 20 2>&1 || true; echo "--- gh issue list --limit 20"; gh issue list --limit 20 2>&1 || true

The block above is this repo's git and GitHub state, captured once before you see the rest of this skill — raw command output, not analysis.

Get current before doing work. Goal: a short situational brief so you build on the latest code with full context. Read-only by default. Never mutate a dirty tree, never force, never discard local work without explicit confirmation — that holds even when this skill fired proactively.

Reading the block

Read it; don't re-run those commands as tool calls. Only run one again if the block shows it failed for a transient reason (a network blip on fetch, say) — a missing remote, no upstream, or gh unauthenticated are expected outcomes to report, not errors to retry.

  • The rev-parse line errored → not a git repo; say so and stop, there's nothing to sync.
  • git remote -v came back empty → no remote; say so in one line and start the task. Skip divergence and PR/issue checks entirely.
  • The @{upstream} count errored (branch never pushed, or detached HEAD) → say there is no upstream, never report that as "in sync", then run git rev-list --left-right --count origin/HEAD...HEAD (origin/main or origin/master if origin/HEAD is missing) and brief against the default branch. The brief still happens before any work.
  • The rev-list line failed (fresh local branch, detached HEAD) → say so plainly, note the branch is unpushed, and fall back to comparing against origin/<default-branch>. Never report "in sync" from a failed command.
  • gh pr list / gh issue list errored or came back empty (no gh, unauthenticated, non-GitHub remote) → skip that section and say so; don't guess at open work.

The brief

  • Branch + sync state (ahead/behind, clean/dirty) in one line.
  • Recent commits — 2–4 line summary of what's new, not every line of git log.
  • Open PRs/issues relevant to the intended work (or "none touching this").
  • Warnings — dirty tree, diverged history, stale deps.
  • Recommended first action — one line.

Sync decision

  • Clean + behind only → offer git pull --ff-only. Do it only on confirm.
  • Diverged (ahead and behind) → explain; recommend rebase or merge; ask.
  • Dirty → do NOT pull. Report the dirty state and let the user decide.

Library currency

Only if asked, or the docs arg is given: for the key deps in play, use context7 (resolve-library-id → query-docs) to pull current API docs, so code targets today's API, not stale memory.

Rules

  • Report only what the injected block or a command actually returned. Never invent commit messages, PR titles, or authors.
  • No mutating command (pull, rebase, merge, checkout, stash pop) without explicit user OK.
  • Verify or say you don't know; never invent a path, API, number, or fact. Commits are the repo owner's alone: no AI co-author trailer, no AI mention in messages.

When not to use

  • No remote → nothing to sync; say so in one line and start the work.
  • Mid-task re-checks in a repo already briefed this session — a plain git fetch + git status answers it without the full brief.

Proactive use

When work is about to start in a repo with a remote, invoke this without being asked: announce in one line ("Running up-to-date on <repo>") and proceed. The sync decision still requires explicit confirmation, proactive or not.

Hand-offs

  • Brief delivered → start the actual task on the now-current tree.
  • The task is a new app/feature/workstream with no design docs → architect next, before code.

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.