agentleFS
timmo001timmo001/skills/branch-context-consumer/SKILL.md

branch-context-consumer

Skill1 starsChanged 56 days agoApache-2.0View on GitHub

Consume BranchContextPlugin injections in commands. Use when a command depends on an injected <branch-context> block for its scope.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are 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.

  • 3

    Very specific

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

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

    If <branch-context> is absent, do not run git fallback commands.

    line 15
  2. Distinctive:

    Use when the command only needs the changed-file scope.

    line 21
  3. Very specific:

    Read the <work-scope> section in this order: unstaged, staged, then branch diff.

    line 23
  4. Very specific:

    Use the changed-file and diff-stat entries in <work-scope> to identify the scope before reading specific files.

    line 24
  5. Distinctive:

    Use when the command needs branch identity, status, PR state, or the full snapshot.

    line 28
  6. Distinctive:

    Read all tagged sections when present, in this order:

    line 30
  7. Distinctive:

    Prefer the precomputed entries from each section over reconstructing state with git or gh commands.

    line 36

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

Branch Context Consumer

Standard contract for commands that depend on BranchContextPlugin injecting a <branch-context> block before execution.

Parse and validate

  1. Parse the injected <branch-context> block.
  2. If <branch-context> is absent, do not run git fallback commands; stop and report that BranchContextPlugin did not inject context for this command.

Modes

Work-scope mode

Use when the command only needs the changed-file scope.

  1. Read the <work-scope> section in this order: unstaged, staged, then branch diff.
  2. Use the changed-file and diff-stat entries in <work-scope> to identify the scope before reading specific files.

Full-context mode

Use when the command needs branch identity, status, PR state, or the full snapshot.

  1. Read all tagged sections when present, in this order:
    • <branch-metadata>
    • <status>
    • <work-scope> (unstaged, staged, then branch diff)
    • <pull-request>
    • <warnings>
  2. Prefer the precomputed entries from each section over reconstructing state with git or gh commands.

Reporting

Include scope source used (BranchContextPlugin context) in the command's final report.

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.