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.
64
81%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Parse git status command output into structured JSON for programmatic analysis.
Accept raw git status output as input.
Expected Input:
gitStatusOutput: String (raw output from git status --porcelain or regular git status)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 commitsParse 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!!: IgnoredReturn parsed data as JSON object.
Expected Output:
{
"branch": "main",
"tracking": "origin/main",
"ahead": 0,
"behind": 0,
"staged": ["file1.ts", "file2.ts"],
"modified": ["file3.ts"],
"deleted": [],
"renamed": [],
"untracked": ["file4.ts"],
"clean": false
}Input:
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree cleanOutput:
{
"branch": "main",
"tracking": "origin/main",
"ahead": 0,
"behind": 0,
"staged": [],
"modified": [],
"deleted": [],
"renamed": [],
"untracked": [],
"clean": true
}Input (porcelain format):
## main...origin/main [ahead 2]
M src/utils.ts
M src/types.ts
A src/new-feature.ts
?? temp-file.jsOutput:
{
"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
}Input:
## HEAD (no branch)
M README.mdOutput:
{
"branch": "HEAD (detached)",
"tracking": null,
"ahead": 0,
"behind": 0,
"staged": [],
"modified": ["README.md"],
"deleted": [],
"renamed": [],
"untracked": [],
"clean": false
}None required - pure parsing logic.
8c3b576
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.