← ClaudeAtlas

using-git-notes-for-ai-contextlisted

Reads, writes, and configures git notes and trailers for AI agent context — attribution, decision reasoning, prompts, and CI/CD metadata. Sets up namespace conventions, hook automation, team sync, and compliance. Use when storing AI attribution in git, setting up git notes for AI tracking, querying constraints or directives before modifying code, configuring notes sync for a team, choosing between git notes and trailers, or when the user mentions git notes, git trailers, AI attribution, AI provenance, Lore protocol, or decision context in commits.
msewell/agent-stuff · ★ 0 · AI & Automation · score 70
Install: claude install-skill msewell/agent-stuff
# Using Git Notes for AI Context Git notes and trailers form a zero-infrastructure metadata layer for AI agent context. Notes attach post-hoc metadata without changing commit SHAs. Trailers embed structured key-value pairs inside commit messages. ## Notes vs. trailers | Scenario | Use | |----------|-----| | Known at commit time, concise (<5 lines) | **Trailer** | | Known at commit time, verbose | **Note** | | Post-hoc (after commit) | **Note** | | Attribution data | Note → `ai/attribution` | | Prompts / sessions | Note → `ai/prompts` | | Constraints, rejected alternatives, directives | Trailer (Lore protocol) | | CI/CD output | Note → `ci/*` | | Deployment records | Note → `deployments` | **Rule of thumb:** If the metadata should travel with the commit and be visible in `git log`, use trailers. If the metadata is post-hoc, verbose, or machine-generated, use notes. When authoring commits, keep subject/body format aligned with the repository's commit convention; this skill focuses on metadata structure, storage, and querying. ## Workflows Identify the task, then follow the matching workflow. ### Annotating commits with AI context 1. Decide notes vs. trailers using the table above. 2. For **notes** — select the namespace per [references/01-core-concepts-and-namespaces.md](references/01-core-concepts-and-namespaces.md) §Namespace Scheme: ```bash git notes --ref=ai/attribution add -m \ '{"schema":"ai-context/1.0","agent":{"tool":"claude-code","model":"cla