Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 12 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,20 @@ git diff --no-color | hunk patch - # review a patch from stdin

### Working with agents

Load the [`skills/hunk-review/SKILL.md`](skills/hunk-review/SKILL.md) skill in your coding agent (e.g. Claude, Codex, Opencode, Pi).
1. Open Hunk in another terminal with `hunk diff` or `hunk show`.
2. Load the Hunk review skill: [`skills/hunk-review/SKILL.md`](skills/hunk-review/SKILL.md).
3. Ask your agent to use the skill against the live Hunk session.

You can get the absolute path to the skill file from your local install by running `hunk skill path`. Prefer loading or symlinking that file in your agent instead of copying it so Hunk upgrades stay in sync automatically.
A good generic prompt is:

```text
Load the Hunk skill and use it for this review.
```

Open Hunk in another window, then ask your agent to leave comments. For the full live-session and `--agent-context` workflow guide, see [docs/agent-workflows.md](docs/agent-workflows.md).
> [!NOTE]
> `hunk skill path` lands in Hunk 0.10.0. Until that release is out, load the skill from the repo path above.

For the full live-session and `--agent-context` workflow guide, see [docs/agent-workflows.md](docs/agent-workflows.md).

## Feature comparison

Expand Down Expand Up @@ -136,27 +145,6 @@ git config --global alias.hdiff "-c core.pager=\"hunk pager\" diff"
git config --global alias.hshow "-c core.pager=\"hunk pager\" show"
```

### Agent workflows

Hunk supports two agent workflows:

- steer a live Hunk window from another terminal with `hunk session ...` (recommended)
- load agent comments from a file with `--agent-context`

Start by loading the Hunk review skill: [`skills/hunk-review/SKILL.md`](skills/hunk-review/SKILL.md).

You can get the absolute path to the skill file from your local install by running `hunk skill path`.

A good generic prompt is:

```text
Load the Hunk skill and use it for this review.
```

That skill teaches the agent how to inspect a live Hunk session, navigate it, reload it, and leave inline comments.

For more, see [docs/agent-workflows.md](docs/agent-workflows.md).

### OpenTUI component

Hunk also publishes `HunkDiffView` from `hunkdiff/opentui` for embedding the same diff renderer in your own OpenTUI app.
Expand Down
6 changes: 4 additions & 2 deletions docs/agent-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ Use Hunk with agents in two ways:

1. Open Hunk in one terminal with a normal review command such as `hunk diff` or `hunk show`.
2. Load the Hunk review skill: [`skills/hunk-review/SKILL.md`](../skills/hunk-review/SKILL.md).
3. If your agent needs an absolute path to the skill file, run `hunk skill path` from your local install.
4. Ask the agent to use the skill and review the current session.
3. Ask the agent to use the skill and review the current session.

> [!NOTE]
> `hunk skill path` lands in Hunk 0.10.0. Until that release is out, load the skill from the repo path above.

A good generic prompt is:

Expand Down