Skip to content

Commit fb55ba8

Browse files
yn1323claude
andcommitted
chore: difit-reviewスキルの設定ファイル移行
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1b8dc80 commit fb55ba8

File tree

5 files changed

+122
-0
lines changed

5 files changed

+122
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
name: difit-review
3+
description: A skill for reviewing a specific diff and showing the findings as comments inside difit (the diff viewer). Use it to review branch diffs, commit diffs, or GitHub PRs, then preload findings or code explanations into difit with `--comment` before launching it for the user.
4+
---
5+
6+
# Difit Review
7+
8+
## Overview
9+
10+
This skill launches a requested git diff in a viewer that is easy for humans to read. At the same time, the agent can attach arbitrary comments via the `--comment` option.
11+
This comment mechanism is well suited for code review findings and code explanations.
12+
Before running commands, choose `<difit-command>` using the following rule:
13+
14+
- If `command -v difit` succeeds, use `difit`.
15+
- Otherwise, use `npx difit`.
16+
- If falling back to `npx difit` would require network access in a sandboxed environment without network permission, request escalated permissions and user approval before running it.
17+
- 心理的安全性も考慮してレビューしてください
18+
19+
## Steps
20+
21+
The final command typically looks like this:
22+
23+
```bash
24+
<difit-command> <target> [compare-with] \
25+
--comment '{"type":"thread","filePath":"src/foobar.ts","position":{"side":"old","line":102},"body":"line 1\nline 2"}' \
26+
--comment '{"type":"thread","filePath":"src/example.ts","position":{"side":"new","line":{"start":36,"end":39}},"body":"Range comment for L36-L39"}'
27+
```
28+
29+
The detailed procedure is as follows.
30+
31+
1. Identify the target diff and review its contents.
32+
33+
- Inspect the diff specified by the user. This may be a local git revision, a GitHub URL, a patch file, or something similar.
34+
- Understand the diff normally, inspect surrounding code when needed, and think through the response required by the user's request, whether that is review findings, explanations, or something else.
35+
- For PR reviews, inspect the PR locally and keep the review result limited to difit output. Do not post comments back to remote GitHub.
36+
37+
2. Attach the prepared comments and launch difit.
38+
39+
- **difit launch options**
40+
- Use `<difit-command> <target> [compare-with]` to specify the target diff.
41+
- For uncommitted changes use `<difit-command> .`, for working tree changes use `<difit-command> working`, and for staged changes use `<difit-command> staging`.
42+
- For stdin input, use a form such as `diff -u file1.txt file2.txt | <difit-command>`.
43+
- **Comment arguments**
44+
- Use `type: "thread"` for each comment.
45+
- Write comment bodies in the language the user is using.
46+
- Use `position.side: "new"` for lines that exist on the target side of the diff.
47+
- Use `position.side: "old"` for lines that exist only on the deleted side.
48+
- Use range comments for issues that span multiple lines.
49+
- Never copy secrets, tokens, passwords, API keys, private keys, or other credential-like material from the diff into `--comment` bodies or any command-line arguments.
50+
- **Additional argument for files not yet added to git**
51+
- For uncommitted changes, if you decide files not yet added to git should also appear in the diff, add `--include-untracked`.
52+
53+
3. Share the difit URL and finish the response.
54+
- If there were no comments to attach, explicitly say so.
55+
- No manual verification of the launched difit page is required.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
interface:
2+
display_name: 'Difit Review'
3+
short_description: 'Review diffs and open difit with inline findings.'
4+
default_prompt: 'Use $difit-review to review a diff or PR, convert concrete findings into --comment entries, and open difit if available, otherwise npx difit with those comments preloaded.'
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
name: difit-review
3+
description: A skill for reviewing a specific diff and showing the findings as comments inside difit (the diff viewer). Use it to review branch diffs, commit diffs, or GitHub PRs, then preload findings or code explanations into difit with `--comment` before launching it for the user.
4+
---
5+
6+
# Difit Review
7+
8+
## Overview
9+
10+
This skill launches a requested git diff in a viewer that is easy for humans to read. At the same time, the agent can attach arbitrary comments via the `--comment` option.
11+
This comment mechanism is well suited for code review findings and code explanations.
12+
Before running commands, choose `<difit-command>` using the following rule:
13+
14+
- If `command -v difit` succeeds, use `difit`.
15+
- Otherwise, use `npx difit`.
16+
- If falling back to `npx difit` would require network access in a sandboxed environment without network permission, request escalated permissions and user approval before running it.
17+
18+
## Steps
19+
20+
The final command typically looks like this:
21+
22+
```bash
23+
<difit-command> <target> [compare-with] \
24+
--comment '{"type":"thread","filePath":"src/foobar.ts","position":{"side":"old","line":102},"body":"line 1\nline 2"}' \
25+
--comment '{"type":"thread","filePath":"src/example.ts","position":{"side":"new","line":{"start":36,"end":39}},"body":"Range comment for L36-L39"}'
26+
```
27+
28+
The detailed procedure is as follows.
29+
30+
1. Identify the target diff and review its contents.
31+
32+
- Inspect the diff specified by the user. This may be a local git revision, a GitHub URL, a patch file, or something similar.
33+
- Understand the diff normally, inspect surrounding code when needed, and think through the response required by the user's request, whether that is review findings, explanations, or something else.
34+
- For PR reviews, inspect the PR locally and keep the review result limited to difit output. Do not post comments back to remote GitHub.
35+
36+
2. Attach the prepared comments and launch difit.
37+
38+
- **difit launch options**
39+
- Use `<difit-command> <target> [compare-with]` to specify the target diff.
40+
- For uncommitted changes use `<difit-command> .`, for working tree changes use `<difit-command> working`, and for staged changes use `<difit-command> staging`.
41+
- For stdin input, use a form such as `diff -u file1.txt file2.txt | <difit-command>`.
42+
- **Comment arguments**
43+
- Use `type: "thread"` for each comment.
44+
- Write comment bodies in the language the user is using.
45+
- Use `position.side: "new"` for lines that exist on the target side of the diff.
46+
- Use `position.side: "old"` for lines that exist only on the deleted side.
47+
- Use range comments for issues that span multiple lines.
48+
- Never copy secrets, tokens, passwords, API keys, private keys, or other credential-like material from the diff into `--comment` bodies or any command-line arguments.
49+
- **Additional argument for files not yet added to git**
50+
- For uncommitted changes, if you decide files not yet added to git should also appear in the diff, add `--include-untracked`.
51+
52+
3. Share the difit URL and finish the response.
53+
- If there were no comments to attach, explicitly say so.
54+
- No manual verification of the launched difit page is required.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
interface:
2+
display_name: 'Difit Review'
3+
short_description: 'Review diffs and open difit with inline findings.'
4+
default_prompt: 'Use $difit-review to review a diff or PR, convert concrete findings into --comment entries, and open difit if available, otherwise npx difit with those comments preloaded.'

skills-lock.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
"source": "get-convex/agent-skills",
2626
"sourceType": "github",
2727
"computedHash": "92a5c170cf238f45f08439d9d5d7947af490b880ee8f15306183240483cbed02"
28+
},
29+
"difit-review": {
30+
"source": "yoshiko-pg/difit",
31+
"sourceType": "github",
32+
"computedHash": "605b3b582f2929d067ee3ddc8bbae4cbd10f067c1e14e11edf8fcd2d825a5a75"
2833
}
2934
}
3035
}

0 commit comments

Comments
 (0)