Agent Skills
› matheusfillipe/diffler
› dfr
dfr
GitHub用于审查代码变更并提供真实问题反馈,不提交。通过读取差异、检查正确性与复用性,针对具体缺陷添加评论,支持编辑或删除评论,确保人类最终提交。
触发场景
用户调用/dfr命令
要求审查pull request或diffler中的变更
希望获取审查意见而非变更解释
安装
npx skills add matheusfillipe/diffler --skill dfr -g -y
SKILL.md
Frontmatter
{
"name": "dfr",
"description": "Review a change in diffler and leave comments on real problems, never submit. Use when the user invokes \/dfr, asks the agent to review a pull request or change in diffler, or wants review comments left for them instead of an explanation of what changed."
}
Review the active review in diffler:
- Call
review_status. It names therepo; if it is not the repository you mean, calllist_instances, thenuse_instancewith that repo, and start over. - Read the diff with
get_diff. - Read it as a reviewer, not an explainer. Look for:
- Correctness: logic errors, the wrong branch or operator, edge cases
(empty input,
None/null, negative numbers, concurrent callers), security holes (injection, a missing auth check, a secret in a log). - Reuse: a helper the repo already has, reinvented; an abstraction with one caller; a file the stated change does not need. Skip anything a linter or formatter would already catch, and any nitpick you cannot back with a concrete trigger.
- Correctness: logic errors, the wrong branch or operator, edge cases
(empty input,
- For each real problem, call
add_commenton the exact line or range it is about (line_endonly past one line), a body written as the section below says. One comment per problem, none for what is fine. - A comment of yours drifts or turns out wrong (
get_commentsmarks itoutdated, or the branch moved on): fix it withedit_comment, or retract it withdelete_comment. Never stack a new comment on a stale one. - You never submit the review. Only the human presses the submit key, after reading what you wrote, so say this plainly when you report back.
- Write as yourself by default, so the human answers you in the thread.
Pass
as_humanon a comment only when they ask for a draft they will send as their own. The same goes for answering someone else's thread in their name:reply_commentwithas_human. Rewrite or drop such a draft reply withedit_commentordelete_commentand itsreplyindex fromget_comments. - Tell the human the comments are ready; run /df to keep answering their feedback on them afterward.
Every diffler tool call already shows in the human's status bar. Before a
stretch of work no tool call covers, such as reading the code around a hunk,
call report_activity with a few words for it.
Write every comment like this
- Say what is wrong and why, in one or two short sentences. Lead with the problem, not a description of the line.
- Name the concrete trigger: the input or path that makes it fail.
Write for the card
Write for a narrow card beside the code:
- Full sentences with their articles and pronouns, in the first person plural
when we are the subject: "We changed X because Y." A sentence may also lead
with the thing itself: "
infraruns first because Y." Do not open every sentence the same way. Cutting words does not make text clearer. - Put every identifier in backticks:
compute_overrides,SHEET_PERMISSIONS,MissingDecision. The card renders markdown; bare identifiers read as prose. - Plain verbs for code: raise, return, check, read, write, fail, skip. No metaphor: no gate, carry, land, surface, shape, vote, mint, unpick, wall, hold an opinion.
- Comparing things, or listing data with several fields per item: a markdown table, header row, two to four columns, one row per thing, identifiers in backticks inside cells. The card rules the columns.
If the diffler tools are missing, the TUI isn't running: ask the human to
run diffler in the repository first.
版本历史
- 78ce09e 当前 2026-11-21 03:49


