parse-git-status

Parse git status output into structured data showing staged, modified, and untracked files. Use for pre-flight validation, checking clean working directory, or listing changed files before commits.

164 stars

Best use case

parse-git-status is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Parse git status output into structured data showing staged, modified, and untracked files. Use for pre-flight validation, checking clean working directory, or listing changed files before commits.

Teams using parse-git-status should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/parse-git-status/SKILL.md --create-dirs "https://raw.githubusercontent.com/maslennikov-ig/claude-code-orchestrator-kit/main/.claude/skills/parse-git-status/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/parse-git-status/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How parse-git-status Compares

Feature / Agentparse-git-statusStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Parse git status output into structured data showing staged, modified, and untracked files. Use for pre-flight validation, checking clean working directory, or listing changed files before commits.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Parse Git Status

Parse git status command output into structured JSON for programmatic analysis.

## When to Use

- Pre-flight checks before workflow execution
- Validate clean working directory
- List modified files for commit
- Check for uncommitted changes

## Instructions

### Step 1: Receive Git Status Output

Accept raw git status output as input.

**Expected Input**:
- `gitStatusOutput`: String (raw output from `git status --porcelain` or regular `git status`)

### Step 2: Parse Branch Information

Extract current branch and tracking information.

**Patterns**:
- `## branch-name`: Current branch
- `## branch-name...origin/branch-name`: Tracking branch
- `[ahead N]` or `[behind N]`: Ahead/behind commits

### Step 3: Categorize Files

Parse file status indicators and categorize.

**Status Indicators** (porcelain format):
- `M `: Modified (staged)
- ` M`: Modified (unstaged)
- `A `: Added (staged)
- `D `: Deleted (staged)
- `R `: Renamed (staged)
- `??`: Untracked
- `!!`: Ignored

### Step 4: Return Structured Data

Return parsed data as JSON object.

**Expected Output**:
```json
{
  "branch": "main",
  "tracking": "origin/main",
  "ahead": 0,
  "behind": 0,
  "staged": ["file1.ts", "file2.ts"],
  "modified": ["file3.ts"],
  "deleted": [],
  "renamed": [],
  "untracked": ["file4.ts"],
  "clean": false
}
```

## Error Handling

- **Invalid Git Output**: Return error describing format issue
- **Not a Git Repository**: Return error indicating no git repo
- **Empty Output**: Return clean status with empty arrays

## Examples

### Example 1: Clean Working Directory

**Input**:
```
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
```

**Output**:
```json
{
  "branch": "main",
  "tracking": "origin/main",
  "ahead": 0,
  "behind": 0,
  "staged": [],
  "modified": [],
  "deleted": [],
  "renamed": [],
  "untracked": [],
  "clean": true
}
```

### Example 2: Modified Files

**Input** (porcelain format):
```
## main...origin/main [ahead 2]
M  src/utils.ts
 M src/types.ts
A  src/new-feature.ts
?? temp-file.js
```

**Output**:
```json
{
  "branch": "main",
  "tracking": "origin/main",
  "ahead": 2,
  "behind": 0,
  "staged": ["src/utils.ts", "src/new-feature.ts"],
  "modified": ["src/types.ts"],
  "deleted": [],
  "renamed": [],
  "untracked": ["temp-file.js"],
  "clean": false
}
```

### Example 3: Detached HEAD

**Input**:
```
## HEAD (no branch)
 M README.md
```

**Output**:
```json
{
  "branch": "HEAD (detached)",
  "tracking": null,
  "ahead": 0,
  "behind": 0,
  "staged": [],
  "modified": ["README.md"],
  "deleted": [],
  "renamed": [],
  "untracked": [],
  "clean": false
}
```

## Validation

- [ ] Parses branch information correctly
- [ ] Categorizes files by status
- [ ] Handles empty/clean status
- [ ] Parses ahead/behind indicators
- [ ] Handles detached HEAD state
- [ ] Returns clean:true only when appropriate

## Supporting Files

None required - pure parsing logic.

Related Skills

parse-package-json

164
from maslennikov-ig/claude-code-orchestrator-kit

Extract version, dependencies, and metadata from package.json files. Use when needing project version, dependency list, or package metadata for releases, audits, or reports.

parse-error-logs

164
from maslennikov-ig/claude-code-orchestrator-kit

Parse build errors, test failures, type-check output, and validation logs into structured data. Use when processing npm/pnpm output, TypeScript errors, Jest failures, or any validation command results for quality gates.

Beads Issue Tracking Skill

164
from maslennikov-ig/claude-code-orchestrator-kit

> **Attribution**: [Beads](https://github.com/steveyegge/beads) by [Steve Yegge](https://github.com/steveyegge)

Workflow & ProductivityClaude

webapp-testing

164
from maslennikov-ig/claude-code-orchestrator-kit

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

validate-report-file

164
from maslennikov-ig/claude-code-orchestrator-kit

Validate that worker-generated reports have all required sections and proper formatting. Use in quality gates, for report completeness checking, or when debugging missing report sections.

validate-plan-file

164
from maslennikov-ig/claude-code-orchestrator-kit

Validate that orchestrator plan files conform to expected JSON schema. Use before workers read plan files or after orchestrators create them to ensure proper structure and required fields.

ux-researcher-designer

164
from maslennikov-ig/claude-code-orchestrator-kit

UX research and design toolkit for Senior UX Designer/Researcher including data-driven persona generation, journey mapping, usability testing frameworks, and research synthesis. Use for user research, persona creation, journey mapping, and design validation.

ui-design-system

164
from maslennikov-ig/claude-code-orchestrator-kit

UI design system toolkit for Senior UI Designer including design token generation, component documentation, responsive design calculations, and developer handoff tools. Use for creating design systems, maintaining visual consistency, and facilitating design-dev collaboration.

theme-factory

164
from maslennikov-ig/claude-code-orchestrator-kit

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

systematic-debugging

164
from maslennikov-ig/claude-code-orchestrator-kit

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes

setup-knip

164
from maslennikov-ig/claude-code-orchestrator-kit

Install and configure Knip for dead code detection. Use before running dead-code-hunter or dependency-auditor to ensure Knip is available. Handles installation, configuration creation, and validation.

senior-prompt-engineer

164
from maslennikov-ig/claude-code-orchestrator-kit

World-class prompt engineering skill for LLM optimization, prompt patterns, structured outputs, and AI product development. Expertise in Claude, GPT-4, prompt design patterns, few-shot learning, chain-of-thought, and AI evaluation. Includes RAG optimization, agent design, and LLM system architecture. Use when building AI products, optimizing LLM performance, designing agentic systems, or implementing advanced prompting techniques.