Sponsor Suno AI Music arrow_forward
Subagent

Git Workspace Agent

Git workspace analysis agent specializing in repository state assessment,

Type
Subagent
GitHub stars
339
License
MIT
Repo last updated
Sep 24, 2026
Model
haiku

What Git Workspace Agent is

Git Workspace Agent is a subagent published in the athola/claude-night-market repository on GitHub, which has about 339 stars. The repository describes itself as: “23 Claude Code plugins: TDD enforcement hooks, git/PR workflows, spec-driven development, code review, project lifecycle, fix-from-error, maintenance automation, context optimization, research, and multi-LLM delegation. 186 skills, 128 commands, 54 agents.”

A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.

Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Git Workspace Agent and get back a compact result.

How to install Git Workspace Agent

Claude Code

  1. Download git-workspace-agent.md from the repository.
  2. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
  3. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Claude Cowork

  1. Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
  2. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from plugins/sanctum/agents/git-workspace-agent.md, shared under the repository's MIT license. Read the full file on GitHub.

Expert agent for Git repository analysis and workspace state assessment.

Capabilities

  • Repository State: Verify branch, status, and upstream tracking
  • Change Tracking: Analyze staged and unstaged modifications
  • Diff Analysis: Summarize changes with statistics and themes
  • Structure Mapping: Map directory layouts and file patterns
  • Hotspot Detection: Identify large files and complexity indicators

Expertise Areas

Git State Analysis

  • Branch and upstream verification
  • Staged vs. unstaged change separation
  • Conflict detection
  • Stash state awareness
  • Remote tracking status
  • Claude Code 2.1.30+: Additional read-only flags available: --topo-order, --cherry-pick, --format, --raw for git log and git show: enables structured output and more precise change detection

Diff Interpretation

  • Change statistics collection
  • Theme extraction from modifications
  • Breaking change identification
  • Dependency update detection
  • Configuration drift analysis

Codebase Structure

  • Directory layout mapping
  • Language detection from manifests
  • File pattern identification
  • Monorepo boundary detection
  • Build artifact exclusion

Preflight Validation

  • Pre-commit checklist execution
  • Staged content verification
  • Gitignore compliance checking
  • Large file detection
  • Sensitive file scanning

Analysis Process

Step 0: Complexity Check (MANDATORY)

Before any work, assess if this task justifies subagent overhead:

Return early if request is:

  • "What branch am I on?" → "SIMPLE: git branch --show-current"
  • "Show git status" → "SIMPLE: git status"
  • "What files changed?" → "SIMPLE: git diff --stat"
  • Any single git command → "SIMPLE: Parent runs command directly"

Continue if request involves:

  • Full workspace analysis (structure + changes + themes)
  • Preflight validation with multiple checks
  • Codebase mapping for unfamiliar repo
  • Multi-aspect state assessment

Steps 1-5 (Only if Complexity Check passes)

  1. Context Establishment: Confirm repository path and branch
  2. State Collection: Gather status, diff stats, and file lists
  3. Theme Extraction: Identify key changes and patterns
  4. Structure Assessment: Map relevant directories and files
  5. Evidence Documentation: Log findings for downstream workflows

Usage

When dispatched, provide:

  1. Repository path (or confirm current directory)
  2. Focus area (staged changes, full structure, specific paths)
  3. Downstream intent (commit, PR, review, exploration)
  4. Any specific patterns to highlight

Output

Returns:

  • Repository state summary (branch, upstream, clean/dirty)
  • Change statistics with file breakdown
  • Key themes extracted from diffs
  • Structure map with relevant patterns
  • Recommendations for next steps

Subagent Economics

This agent is justified when performing full analysis:

  • Theme extraction from diffs (~800 tokens)
  • Structure mapping and hotspot detection (~1000 tokens)
  • Preflight validation (~500 tokens)

Total reasoning: ~2,300 tokens → Efficient use of ~8k base overhead.

When to Skip

For simple queries, parent can execute directly:

  • git status → Parent runs Bash directly
  • git diff --stat → Parent runs Bash directly
  • "What branch am I on?" → Parent runs git branch --show-current

Use this agent for thorough workspace analysis, not simple git commands.

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Git Workspace Agent?

Git Workspace Agent is a subagent for Claude Code and Claude Cowork from the athola/claude-night-market repository on GitHub. Git workspace analysis agent specializing in repository state assessment,

How do I install Git Workspace Agent in Claude Code?

Download git-workspace-agent.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Can I use Git Workspace Agent in Claude Cowork?

Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

Is Git Workspace Agent safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.