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 Abilityai/abilities --skill add-git-syncgit clone --depth 1 https://github.com/Abilityai/abilitiesWrote 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/abilityai/abilities/add-git-sync)<a href="https://agentmods.dev/skills/abilityai/abilities/add-git-sync"><img src="https://agentmods.dev/badge/skills/abilityai/abilities/add-git-sync/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/abilityai/abilities/add-git-sync"><img src="https://agentmods.dev/badge/skills/abilityai/abilities/add-git-sync.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.00043 | $0.03422 |
| Opus 5.5 | $0.00017 | $0.01369 |
| Sonnet 5.5 | $0.00009 | $0.00684 |
| Haiku 4.5 | $0.00004 | $0.00342 |
Grade B, and why
add-git-sync scanned grade B with 1 finding 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 6d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
- "1.3: .gitignore rationale corrected — the platform no longer bakes ~/.claude/settings.json (guardrail registration moved to root-owned /etc/claude-code/managed-settings.json, ent#345); the ignore rule stays because a How it starts
The opening of the file, as written. The whole thing — 284 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Add Git Sync
ℹ️ First, set expectations: before anything else, print one short line with this skill's version and its most recent change — the top entry of
metadata.changelogabove — e.g.add-git-sync vX.Y — recent: <summary>. Then proceed.
Installs three hooks that turn the agent's own repo into its durable state layer:
| Hook | Event | Job |
|---|---|---|
git-session-start.sh |
SessionStart (startup/resume) |
Stash local drift → fetch → rebase onto remote branch → restore drift. Every session begins consistent with origin. |
git-pre-compact.sh |
PreCompact |
Fast local commit so in-flight work survives context compaction. No push. |
git-sync.sh |
Stop (async) |
git add -A → commit → push with rebase-on-reject retry. Drops .git/SYNC_FAILED if it can't reconcile; SessionStart surfaces the note next run. |
Who this is for: any agent whose directory is its own git repo and benefits from cross-session continuity (Trinity-deployed agents, autonomous workers, long-running research agents). Not appropriate for agents nested inside a larger monorepo.
Why this pairs with deployment: Trinity deploys an agent by cloning its GitHub repo and tracking the branch, so the remote agent's state is whatever the branch tip holds. These hooks keep that tip honest — work is committed and pushed at session end instead of lingering uncommitted, so a git_pull (or /trinity:sync) actually carries the agent forward. Install this before deploying, not after the first surprise.
Escape hatches baked in:
touch .git/NO_AUTOSYNC— disables all three hooksecho "..." > .git/SELF_SELECT_MSG— subagents write structured commit messages that survive the generic Stop-hook commit.git/SYNC_FAILED— propagates push failures forward to the next session
Process
Step 1: Preflight
Run from inside the target agent directory (or ask the user for the path). Verify:
# 1. CWD has CLAUDE.md (i.e. is an agent root)
[ -f CLAUDE.md ] || ask_user_for_agent_path
# 2. CWD is a git repo root (not nested). Resolve both sides with `pwd -P`
# so macOS /tmp vs /private/tmp symlinks don't cause a false positive.
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
if [ -z "$REPO_ROOT" ]; then
# Not a git repo — ask whether to init
:
elif [ "$(cd "$REPO_ROOT" && pwd -P)" != "$(pwd -P)" ]; then
# Nested inside a larger repo — refuse or offer local-only
echo "ERROR: Agent dir is nested inside $REPO_ROOT. Hooks would push the wrong scope."
exit 1
fi
# 3. Does .claude/settings.json exist? (create if missing)
# 4. Do any of the target hooks already exist? (if yes, diff and ask)
What ships with it
4 files 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.
- 6d ago Changed · +1 lines 6c8b8fb5630e
- 1mo ago Changed · +3 lines 3d6e627307a5
- 1mo ago First seen · 280 lines · 43 tokens per session scan B 4ef2c4992841
add-git-sync is a skill published in the GitHub repository Abilityai/abilities (12 stars, last pushed 3d ago), licensed MIT. It adds 43 tokens to every session and 3,422 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
git-ai-search
Search and restore AI conversation context from git history.
remember
Save the decisions, facts, dead ends and architecture this conversation established to Atlas's shared memory, so other agents and future sessions can build on them.
github-ops
GitHub CLI for issues, PRs, code search, CI logs, releases, and API queries. Requires gh CLI and auth.
release
Cut a Memoria release. Version bump, CHANGELOG, CI workflows, Docker image. Use when publishing a new version.
recall-rationale
Recall why a past change was made by locating the Claude Code transcript that produced it. Use when the user asks to "recall the rationale", "find the rationale", "look up the rationale", "why did I do X", "why did we do X", "why was this changed", or "find the transcript for this commit".
release-finalizer
Merges a release PR, associates it with resolved issues, replies to issue reporters, and closes issues. Use after PR review is complete and ready for merge. Closes the release cycle.