Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add definite-d/agent-skills --skill granular-gitgit clone --depth 1 https://github.com/definite-d/agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/definite-d/agent-skills/granular-git)<a href="https://agentmods.dev/skills/definite-d/agent-skills/granular-git"><img src="https://agentmods.dev/badge/skills/definite-d/agent-skills/granular-git/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/definite-d/agent-skills/granular-git"><img src="https://agentmods.dev/badge/skills/definite-d/agent-skills/granular-git.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00121 | $0.00767 |
| Opus 5.5 | $0.00048 | $0.00307 |
| Sonnet 5.5 | $0.00024 | $0.00153 |
| Haiku 4.5 | $0.00012 | $0.00077 |
Grade A, and why
granular-git scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Granular Git
Stage and commit exact file content without touching the working directory.
Core Concept
Standard Git: Working Directory → Staging Area → Commit
This skill reverses the flow: the agent constructs the exact desired file state in memory and injects it directly into the Staging Area.
[Target State] → hash-object → update-index → commit
The physical file on disk is never modified.
Procedure
1. Determine Target State
Read current index state if there are existing staged changes to preserve:
git show :0:path/to/file.txt
Apply character-level edits to that string (not the disk file).
2. Write as Git Object
TARGET_SHA=$(printf '%s' "$TARGET_CONTENT" | git hash-object -w --stdin)
3. Map to Index
For tracked files:
git update-index --cacheinfo 100644,"$TARGET_SHA","path/to/file.txt"
For brand-new files:
git update-index --add --cacheinfo 100644,"$TARGET_SHA","path/to/file.txt"
| Argument | When |
|---|---|
--add |
Required for untracked files |
100644 |
Regular files |
100755 |
Executable files |
4. Commit
git commit -m "type(scope): description"
Multi-Commit Pattern
For multiple independent changes in one file:
HEAD → Commit 1 (Change A) → Commit 2 (A+B) → Commit 3 (A+B+C)
- Construct target state for Change A only
- Commit
- Add Change B to target state, commit
- Repeat for Change C
Safety Checklist
- Is Git initialized? —
git rev-parse --is-inside-work-tree - Existing staged changes? — Read via
git show :0:<file>and merge - Repo in clean state? — No ongoing merge/rebase
Advantages Over Patches
| Property | Patches | This Skill |
|---|---|---|
| Context sensitivity | Fails if context changed | Immune |
| Precision | Line-level | Character-level |
| Working directory | May modify | Never touches |
Example
File on disk has Bug fix + Refactor + Docs. You want to commit only the bug fix:
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 110 lines · 121 tokens per session scan A 16c117c14cd7
granular-git is a skill published in the GitHub repository definite-d/agent-skills (2 stars, last pushed 6d ago), licensed MIT. It adds 121 tokens to every session and 767 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
create-pr
Creates a GitHub PR with a Linear-ticket-prefixed title and a decision-led, narrative description for Prisma 8. Use when the user wants to create a pull request, open a PR, or submit changes for review.
git-commit
Generate well-formatted git commit messages following conventional commit standards.
repo-sync
Manage automatic Git syncing on macOS with repo-sync. Use only when the user explicitly invokes /repo-sync.
engineer-bot-ops
A workflow for carrying an engineering task from scope through implementation and reviewable delivery. It works with a repository's branch, existing changes, rules, checks, and permissions while separating completed, unverified, and next-step work.
mcore-split-pr
Split a PR into multiple PRs to reduce the number of required CODEOWNERS reviewer groups.
contributing
How to contribute to evlog, covering commit and PR conventions, changesets, the Definition of Done, testing rules, and the authored skills that walk through building a new adapter, enricher, framework integration, or map rule. Load this for any question about contributing, opening a PR, or adding something to the…