agentleFS
CherwaywayCherwayway/agent-context-patch/skills/source-snapshot/SKILL.md

source-snapshot

Skill2 starsChanged 5 months agoMITView on GitHub

Pin and inspect fresh, exact Git source snapshots for read-only code analysis without touching the user's working tree.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. kevin-burns/claude-skills★ 7same 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 repository2 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, 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:

    Use this skill when a task asks about current or latest repository code, an exact remote ref, or a read-only code review whose conclusions …

    line 8
  2. Distinctive:

    Do not treat the primary checkout, local main, or a local remote-tracking ref as current merely because it exists.

    line 12
  3. Distinctive:

    Run the bundled CLI relative to this skill directory:

    line 18
  4. Distinctive:

    Always close a source receipt when snapshot creation fails:

    line 40
  5. Very specific:

    If resolve did not succeed, do not describe cached or local code as latest.

    line 50

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

Source Snapshot

Use this skill when a task asks about current or latest repository code, an exact remote ref, or a read-only code review whose conclusions depend on source freshness.

Do not treat the primary checkout, local main, or a local remote-tracking ref as current merely because it exists. Resolve the requested source against the remote, pin its exact commit, and analyze only the resulting snapshot.

Workflow

Run the bundled CLI relative to this skill directory:

node scripts/agent-source.mjs resolve --repo <repository> --ref <full-ref>
node scripts/agent-source.mjs snapshot --receipt <source-receipt-path>
node scripts/agent-source.mjs close --receipt <snapshot-receipt-path>

resolve currently supports exact full remote refs such as refs/heads/main and refs/pull/123/head. It compares git ls-remote with the commit fetched into a workspace-external bare cache. A mismatch or unavailable remote fails closed.

snapshot exports the pinned commit into a task-owned temporary directory, rejects submodules and escaping symlinks, records an integrity digest, and makes the extracted tree read-only. It never reads files from the user's working tree.

close verifies the digest before cleanup. It removes only the task-owned session and cache ref. If the snapshot changed, it retains the session and reports the integrity failure instead of deleting evidence.

Always close a source receipt when snapshot creation fails:

node scripts/agent-source.mjs close --receipt <source-receipt-path>

Claims And Boundaries

  • Report the source mode, remote ref, exact commit SHA, resolution time, and snapshot method with the analysis.
  • If resolve did not succeed, do not describe cached or local code as latest.
  • The guarantee is workspace-read-only, not system-wide zero-write: the CLI writes only its external Git cache and task-owned temporary session.
  • Dependency installation, builds, generators, and tests are outside this read-only snapshot mode. Use a separately authorized isolated verification environment for them.
  • A deployed revision is not the same as remote main; first obtain an exact deployed ref or SHA from a project-specific deployment resolver.

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.