Commit

From saffron-health/opencode-gui · View interactive version

Commit is an AI agent skill from the GitHub repository saffron-health/opencode-gui. Stage all changes and commit with appropriate message, showing changed files and edits. Use when you need to create a git commit.

How to use this skill

Skill file

Automatically stage all changes and commit with an appropriate message based on the changes made. Shows a summary of what files were changed and how.

Steps

  1. Show current status before staging:

```bash

git status --porcelain

```

  1. Stage all changes:

```bash

git add .

```

  1. Get changed files for analysis:

```bash

git diff --cached --name-only

```

  1. Get detailed change summary:

```bash

git diff --cached --stat

```

  1. Analyze changes to create commit message:
  1. Commit the changes:

```bash

git commit -m "Generated commit message"

```

  1. Show commit summary:

```bash

git show --stat --oneline HEAD

```

Analysis Guidelines

Commit Message Format

Change Analysis Priority

  1. Spec files: New/modified files in specs/ indicate major features
  2. Core functionality: API endpoints, UI components, database schemas
  3. Configuration: Build, dependency, or environment changes
  4. Documentation: README, AGENT.md, or other doc updates
  5. Refactoring: Code reorganization without functional changes

Example Output

Files staged for commit:
 M apps/web/src/components/TaskList.tsx
 A specs/task-filters.md
 M packages/ui/src/Button.tsx
 D apps/web/src/old-component.tsx

Changes summary:
 apps/web/src/components/TaskList.tsx | 15 ++++++++++++---
 specs/task-filters.md                | 42 +++++++++++++++++++++++++++++++++++++++
 packages/ui/src/Button.tsx           |  8 ++++----
 apps/web/src/old-component.tsx       | 23 -----------------------
 4 files changed, 58 insertions(+), 26 deletions(-)

Committed: feat: add task filtering functionality
[main abc1234] feat: add task filtering functionality
 4 files changed, 58 insertions(+), 26 deletions(-)

Error Handling

File Status Symbols

When showing git status, these symbols indicate:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.