# git-skill

Pi package with git prompt templates and a skill for Conventional Commits messages.

## Contents

### Prompts

- `/git-commit-staged` — commit staged changes only. Fails if nothing is staged. Never runs `git add`.
- `/git-commit-all` — stage tracked files only (`git add -u`), then commit. Fails if nothing was staged.

Both prompts build the commit message from the staged diff using the rules from the `git-commit` skill.

### Skills

- `git-commit` — rules for writing commit messages in Conventional Commits format: type, scope, subject line (max 72 chars, imperative, no capital letter, no trailing period).

## Install

```bash
pi install npm:git-skill
```

Or from git:

```bash
pi install git:gitverse.ru/ars/git-skill
```

Try without installing:

```bash
pi -e npm:git-skill
```

## Usage

```bash
/git-commit-staged   # commit what is already staged
/git-commit-all      # stage tracked files, then commit
```

## Project structure

```
├── package.json              # pi package manifest
├── prompts/
│   ├── git-commit-staged.md  # /git-commit-staged
│   └── git-commit-all.md     # /git-commit-all
└── skills/
    └── git-commit/
        └── SKILL.md          # Conventional Commits message rules
```

## License

[MIT](LICENSE)
