Git Workspace Agent
Git workspace analysis agent specializing in repository state assessment,
- Type
- Subagent
- Repository
- athola/claude-night-market
- GitHub stars
- 339
- License
- MIT
- Repo last updated
- Sep 24, 2026
- Source file
- plugins/sanctum/agents/git-workspace-agent.md
- 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
- 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.
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.
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)
- Context Establishment: Confirm repository path and branch
- State Collection: Gather status, diff stats, and file lists
- Theme Extraction: Identify key changes and patterns
- Structure Assessment: Map relevant directories and files
- Evidence Documentation: Log findings for downstream workflows
Usage
When dispatched, provide:
- Repository path (or confirm current directory)
- Focus area (staged changes, full structure, specific paths)
- Downstream intent (commit, PR, review, exploration)
- 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
- Prose Reviewer Review generated text for AI patterns, banned phrases, voice Subagent · athola/claude-night-market
- Refine Code Analyze code quality across 6 dimensions (duplication, algorithms, clean code, architecture, errors, style) and apply fixes. Slash Command · athola/claude-night-market
- Record Terminal Create terminal recordings with VHS tape scripts Slash Command · athola/claude-night-market
- Project Init Initialize a new project with git setup, CI/CD workflows, pre-commit hooks, Makefiles, and language-specific tooling. Slash Command · athola/claude-night-market
- Harden Orchestrator Orchestrates active security hardening. Discovers languages, dispatches per-area scans, synthesizes findings with NIST/CWE citations, and proposes concrete remediations the user can approve. Subagent · athola/claude-night-market
- Garden Curator Manage digital garden health, metrics, notes, and curation. Use for knowledge base maintenance and garden tending tasks. Subagent · athola/claude-night-market
- Implementation Executor Execute implementation tasks systematically following the task plan with Subagent · athola/claude-night-market
- Extractor Autonomous knowledge extraction agent. Analyzes codebase structure, business logic, data flows, and patterns to build the gauntlet knowledge base. Subagent · athola/claude-night-market