parse-git-status
This Claude Code skill parses git status output into structured JSON format, extracting branch information, tracking details, and categorizing files by status (staged, modified, deleted, renamed, untracked). Use it for pre-flight validation before workflows, verifying clean working directories, or programmatically analyzing uncommitted changes before commits and deployments.
git clone --depth 1 https://github.com/maslennikov-ig/claude-code-orchestrator-kit /tmp/parse-git-status && cp -r /tmp/parse-git-status/.claude/skills/parse-git-status ~/.claude/skills/parse-git-statusSKILL.md
# 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.Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
Initialize Beads issue tracking in your project with interactive configuration setup.
Calculate priority score for bugs, issues, or tasks based on severity, impact, and likelihood. Use for bug prioritization, task ordering, or risk assessment.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
Inline orchestration workflow for dead code detection and removal with Beads integration. Provides step-by-step phases for dead-code-hunter detection, priority-based cleanup with dead-code-remover, and verification cycles.