# Commit

> Generate commit messages following project conventions and commit staged changes. Use when the user explicitly asks to commit, create a commit, or run /commit.

- **Type:** Skill
- **Install:** `agentstack add skill-iofficeai-aionhub-commit`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [iOfficeAI](https://agentstack.voostack.com/s/iofficeai)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [iOfficeAI](https://github.com/iOfficeAI)
- **Source:** https://github.com/iOfficeAI/AionHub/tree/main/.claude/skills/commit

## Install

```sh
agentstack add skill-iofficeai-aionhub-commit
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Commit Skill

Generate well-formatted commit messages and commit staged changes for AionHub.

## Usage

- `/commit` - Generates a commit message based on staged changes
- `/commit ` - Uses provided advice to guide commit message generation

## Guidelines

- **Only commit staged files** - Never add files with `git add`. The user controls staging.
- **Analyze all staged changes** - Review both previously staged and newly added changes
- **Follow commit message format** - Use the project format shown below
- **Match the project style** - Check recent commits (`git log`) to match existing style

## Format

```
[!](): 

[optional BREAKING CHANGE section if applicable]
```

**Key convention: Type is always lowercase** (e.g., `feat`, `fix`, `chore`, not `Feat`, `Fix`, `Chore`).

## Examples

### Basic commits

```
feat(extensions): add new ACP agent extension

- Added aion-extension.json manifest and install script
- Registered extension in build pipeline
```

```
fix(kits): resolve server startup crash on missing config

- Added fallback for undefined port in dev server
- Improved error message when config file is absent
```

```
refactor(build): use content-based SHA-256 for deterministic integrity

- Replaced timestamp-based hashing with file content hashing
- Ensures reproducible builds across environments
```

```
chore(extensions): promote claude, codex, goose from pending to extensions

- Moved directories from pending/ to extensions/
- Updated build script to include new entries
```

### No scope (cross-cutting changes)

```
chore: add .gitignore and remove dist from tracking

- Created .gitignore with standard Node/dist patterns
- Removed previously tracked dist artifacts
```

### Breaking change

```
refactor!(extensions): redesign manifest schema from v1 to v2

- Replaced flat fields with nested contributes block
- Updated all existing manifests to new format

BREAKING CHANGE: aion-extension.json schema v1 is no longer supported.
```

## Rules

- **Type**: Always lowercase (feat, fix, chore, etc.), no period at end
- **Title**: Lowercase after colon, max 50 characters total
- **Breaking changes**: Use "!" after type/scope AND include "BREAKING CHANGE:" section
- **Scope**: Optional, lowercase, aligned with project directory/module name
- **Body**: Use bullet points, explain WHY not just WHAT
- **Be specific**: Avoid vague titles like "update" or "fix stuff"

## Allowed Types

| Type     | Description                            |
| -------- | -------------------------------------- |
| feat     | New feature or extension               |
| fix      | Bug fix                                |
| chore    | Maintenance (deps, config, file moves) |
| perf     | Performance improvements               |
| refactor | Code restructure (no behavior change)  |
| docs     | Documentation changes                  |
| test     | Adding or refactoring tests            |
| style    | Code formatting (no logic change)      |
| build    | Changes to the build system or scripts |
| ci       | Changes to CI/CD workflows             |

## Common Scopes

| Scope      | When to use                                          |
| ---------- | ---------------------------------------------------- |
| extensions | Changes under `extensions/` (manifests, installs)    |
| kits       | Changes under `kits/` (server, fake agent, toolkits) |
| build      | Build scripts under `.github/scripts/`               |
| ci         | CI workflows under `.github/workflows/`              |
| docs       | Documentation under `docs/`                          |

Omit scope for cross-cutting changes that span multiple areas.

## Workflow

1. **Review changes in parallel**:
   - Run `git status` (never use `-uall` flag)
   - Run `git diff --cached` (staged changes)
   - Run `git diff` (unstaged changes)
   - Run `git log -5 --oneline` to confirm current commit style

2. **Draft commit message**:
   - Summarize the nature of changes (new feature, bug fix, etc.)
   - Ensure message accurately reflects changes and purpose
   - Use lowercase type matching the project convention
   - Pick the most fitting scope from the table above
   - Focus on WHY rather than WHAT
   - Never commit files that likely contain secrets (.env, credentials.json, etc.)

3. **Commit**:
   - Create commit with proper message format
   - Always use HEREDOC for commit messages:

   ```bash
   git commit -m "$(cat <<'EOF'
   feat(extensions): descriptive title

   - Bullet point summary
   - Another change detail

   EOF
   )"
   ```

   - Verify with `git status` after commit

4. **If pre-commit hook fails**:
   - Fix the issue
   - Create a NEW commit (do not use `--amend`)
   - Never skip hooks unless explicitly requested

## Important Notes

- **Never push** unless user explicitly requests it
- **Never stage files without asking** - Must ask the user for confirmation before running any `git add` command
- **Never use interactive flags** (`-i`) as they require user input
- **No empty commits** - If nothing is staged, inform the user instead
- **Always use HEREDOC** for commit messages to ensure proper formatting
- **Never add Co-Authored-By** - Do not append any `Co-Authored-By` trailer for any agent
- **One commit per concern** - If staged changes span multiple unrelated concerns, split into separate commits. Each commit should have a single, clear purpose

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [iOfficeAI](https://github.com/iOfficeAI)
- **Source:** [iOfficeAI/AionHub](https://github.com/iOfficeAI/AionHub)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** yes
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-iofficeai-aionhub-commit
- Seller: https://agentstack.voostack.com/s/iofficeai
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
