git-architecture

git-architecture is a skill for Claude Code, Codex from nikzlabs/shipit. It costs 63 tokens per session (2,249 once invoked), scanned C, original, Apache-2.0.

A guide to ShipIt’s Git system, including per-session repositories, shared bare caches, clones, branches, credentials, and automatic commits. Git is a tool for tracking changes to code.

In plain words
What is it for?
Use it when changing repository setup, session clones, credential handling, branches, commits, rollback, pull, push, or remote management.
Why use it?
It clarifies how workspaces stay independent while reusing repository data, which helps prevent mistakes in cloning, committing, rolling back, or pushing code.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/nikzlabs/shipit/git-architecture
Any agent
npx skills add nikzlabs/shipit --skill git-architecture
Clone the repo
git clone --depth 1 https://github.com/nikzlabs/shipit

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for git-architecture

README.md
[![agentmods](https://agentmods.dev/badge/skills/nikzlabs/shipit/git-architecture.svg)](https://agentmods.dev/skills/nikzlabs/shipit/git-architecture)
Your own site
<a href="https://agentmods.dev/skills/nikzlabs/shipit/git-architecture"><img src="https://agentmods.dev/badge/skills/nikzlabs/shipit/git-architecture.svg" alt="Measured on agentmods" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,249 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00063 $0.02249
Opus 5 $0.00032 $0.01125
Sonnet 5 $0.00013 $0.00450
Haiku 4.5 $0.00006 $0.00225

Measured 4d ago against content hash 4d9eda76cdeb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

git-architecture scanned grade C 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 4d 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.

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

- **`shipit-credentials.json`** — `CredentialStore` (`credential-store.ts`). Holds `githubToken`, `agentEnv`, provider-account metadata, and app settings as *fields in one JSON file*, encrypted when a cipher is supplied.
.claude/skills/git-architecture/SKILL.md · 172 lines

How it starts

The opening of the file, as written. The whole thing — 172 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Git Architecture

ShipIt uses git for version control at two levels: per-session workspace repos managed by GitManager, and a shared per-remote bare cache (from which each session gets its own independent local clone) managed by RepoGit. Both use the simple-git library.

Each session gets its own independent full clonegit clone --local from the bare cache, which hardlinks objects so the clone is fast and disk-cheap. Each session owns a complete .git/ and shares nothing mutable with its siblings.

Two Git Layers

GitManager (per-session)

src/server/shared/git.ts — operates on a single session's workspace directory.

Each session gets its own GitManager instance via the createGitManager(dir) factory. Used for:

  • init() — initialize repo with initial commit (so rollback always has a base)
  • autoCommit(summary) — stage all + commit if anything changed
  • log(maxCount) — commit history
  • rollback(hash) — hard reset to a previous commit
  • push(remote, branch) — push with upstream tracking
  • pull(remote, branch) — pull from remote
  • addRemote(name, url) / getRemotes() — remote management
  • checkoutNewBranch(name) / renameBranch(old, new) — branch operations
  • diffSummary() — per-file diff stats for the working tree
  • diffStatVsBranch(baseBranch) — insertions/deletions vs a base branch (for PR stats)
  • getFileAtCommit(hash, filePath) — file content at a specific commit
  • diffNameStatus(from, to) — changed files with status between commits
  • merge(branchName) — merge with conflict detection

RepoGit (bare cache)

src/server/orchestrator/repo-git.ts — operates on a per-remote bare cache directory (one bare clone per remote URL, at {stateDir}/repo-cache/{hash}).

Used by the orchestrator to seed and refresh the cache, then cut per-session clones from it:

  • cloneBare(url) — bare-clone the remote into the cache dir (git clone --bare)
  • fetchCache(ttlMs?) — fetch the remote into the bare cache (advances local refs/heads/*); TTL-throttled
  • cloneFromCache(sessionDir, remoteUrl?)create a session's clone: git clone --local from the cache (hardlinked objects), set gc.auto=0, then reset origin to the real remote URL
  • getDefaultBranch(remote) — detect main/master (tries local refs first to avoid network calls)
  • deleteBranch(name) — delete local branch
  • isEmpty() / createInitialCommit() — empty-repo handling
  • readHead() / lastFetchAgeMs() — cache freshness checks used by the proactive pre-fetcher

Read the full file on GitHub · 172 lines

Changes

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.

  1. 4d ago First seen · 172 lines · 63 tokens per session scan C 4d9eda76cdeb

Subscribe to this mod's changes

git-architecture is a skill published in the GitHub repository nikzlabs/shipit (6 stars, last pushed today), licensed Apache-2.0. It adds 63 tokens to every session and 2,249 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

lanes-sessions

Use when managing Lanes issues or driving Claude Code sessions through the lanes MCP tools — creating issues, starting/stopping/inspecting sessions, batch-launching work across worktrees, reading terminal output, attaching labels and components by UUID, or moving issues across the backlog/todo/in-progress/done…

lanes-sh/app · 99 tokens

lanes-forms

Use when the user wants a form backend or contact form set up (a live POST endpoint that captures submissions and emails them), OR wants an agent to fill in / submit to a form on their behalf. Lanes Forms creates and manages hosted form endpoints from Claude Code. Triggers on "set up a contact form", "provision a…

lanes-sh/app · 105 tokens

github-lanes-bridge

Use when bridging GitHub and Lanes — importing GitHub issues into Lanes for local Claude Code execution, batch-spawning sessions per ticket, decomposing one GitHub issue into multiple Lanes sub-issues with dependencies, or posting session results (PR links, comments, follow-up issues) back to GitHub. Triggers on…

lanes-sh/app · 161 tokens

linear-lanes-bridge

Use when bridging Linear and Lanes — importing Linear issues into Lanes for local Claude Code execution, batch-spawning sessions per Linear ticket, decomposing one Linear issue into multiple Lanes sub-issues with dependencies, or posting session results (PR links, comments, status updates) back to Linear. Triggers on…

lanes-sh/app · 142 tokens

embedding-strategies

Select and optimize embedding models for semantic search and RAG applications. Use when choosing embedding models, implementing chunking strategies, or optimizing embedding quality for specific domains.

foryourhealth111-pixel/Vibe-Skills · 37 tokens

docx-comment-reply

Reply to comments (批注) in Word .docx/.doc files: extract comment context, draft replies, write threaded replies back, and validate OOXML.

foryourhealth111-pixel/Vibe-Skills · 39 tokens