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
6 changes: 6 additions & 0 deletions .agents/skills/hunk-extensions/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,10 @@ Before anything else, load them and follow them:
hunk skill show hunk-extensions
```

Hunk versions before 0.24 do not have `hunk skill show`. If it fails, print the bundled skill's path instead, then read that file and follow it:

```bash
hunk skill path hunk-extensions
```

If `hunk` is not on PATH, ask the user to install Hunk first: https://hunk.dev/docs/start/install/
6 changes: 6 additions & 0 deletions .agents/skills/hunk-review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,10 @@ Before anything else, load them and follow them:
hunk skill show hunk-review
```

Hunk versions before 0.24 do not have `hunk skill show`. If it fails, print the bundled skill's path instead, then read that file and follow it:

```bash
hunk skill path hunk-review
```

If `hunk` is not on PATH, ask the user to install Hunk first: https://hunk.dev/docs/start/install/
5 changes: 5 additions & 0 deletions .changeset/skill-pointer-path-fallback.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hunkdiff": patch
---

Pointer skills installed with `npx skills add modem-dev/hunk` now fall back to `hunk skill path` when the installed Hunk predates `hunk skill show`.
1 change: 1 addition & 0 deletions scripts/generate/skillPointer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ describe("skill pointers", () => {
);
expect(stub).toContain("<!-- generated by `bun run generate:skill` -->");
expect(stub).toContain("hunk skill show hunk-review");
expect(stub).toContain("hunk skill path hunk-review");
expect(stub).not.toContain("Full instructions that must never be copied");
});

Expand Down
6 changes: 6 additions & 0 deletions scripts/generate/skillPointer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ export function renderAgentSkillStub(frontmatter: SkillFrontmatter) {
`hunk skill show ${frontmatter.name}`,
"```",
"",
"Hunk versions before 0.24 do not have `hunk skill show`. If it fails, print the bundled skill's path instead, then read that file and follow it:",
"",
"```bash",
`hunk skill path ${frontmatter.name}`,
"```",
"",
"If `hunk` is not on PATH, ask the user to install Hunk first: https://hunk.dev/docs/start/install/",
"",
].join("\n");
Expand Down
2 changes: 1 addition & 1 deletion website/src/content/docs/docs/agents/review-skill.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npx skills add modem-dev/hunk -g --skill hunk-review

`-g` installs the skill for your user instead of one project. Add `-a <agent>` (for example `-a claude-code`) to install it for a single agent.

The installed file is a pointer: it tells the agent to run `hunk skill show hunk-review` and follow the output. The instructions therefore come from the Hunk binary on your `PATH` and stay in step with it after every upgrade; you don't need to reinstall the skill.
The installed file is a pointer: it tells the agent to run `hunk skill show hunk-review` and follow the output. Hunk versions before 0.24 lack `hunk skill show`, so the pointer falls back to reading the file printed by `hunk skill path hunk-review`. The instructions therefore come from the Hunk binary on your `PATH` and stay in step with it after every upgrade; you don't need to reinstall the skill.

## Load it without the skills CLI

Expand Down
Loading