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…
от maslennikov-ig★ 271 звезда на GitHubОб этом скилле
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 fromgit status --porcelainor regulargit 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:
{
"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:
{
"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:
{
"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:
{
"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.
Установить parse-git-status в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл 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.
Как установить скилл parse-git-status?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл parse-git-status запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic