dfr

GitHub

用于审查代码变更并提供真实问题反馈,不提交。通过读取差异、检查正确性与复用性,针对具体缺陷添加评论,支持编辑或删除评论,确保人类最终提交。

skills/dfr/SKILL.md matheusfillipe/diffler

触发场景

用户调用/dfr命令 要求审查pull request或diffler中的变更 希望获取审查意见而非变更解释

安装

npx skills add matheusfillipe/diffler --skill dfr -g -y
更多选项

不安装直接使用

npx skills use matheusfillipe/diffler@dfr

指定 Agent (Claude Code)

npx skills add matheusfillipe/diffler --skill dfr -a claude-code -g -y

安装 repo 全部 skill

npx skills add matheusfillipe/diffler --all -g -y

预览 repo 内 skill

npx skills add matheusfillipe/diffler --list

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:

  1. Call review_status. It names the repo; if it is not the repository you mean, call list_instances, then use_instance with that repo, and start over.
  2. Read the diff with get_diff.
  3. 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.
  4. For each real problem, call add_comment on the exact line or range it is about (line_end only past one line), a body written as the section below says. One comment per problem, none for what is fine.
  5. A comment of yours drifts or turns out wrong (get_comments marks it outdated, or the branch moved on): fix it with edit_comment, or retract it with delete_comment. Never stack a new comment on a stale one.
  6. 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.
  7. Write as yourself by default, so the human answers you in the thread. Pass as_human on 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_comment with as_human. Rewrite or drop such a draft reply with edit_comment or delete_comment and its reply index from get_comments.
  8. 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: "infra runs 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

同 Skill 集合

skills/df/SKILL.md
skills/dfa/SKILL.md

元信息

文件数
0
版本
78ce09e
Hash
b5898b4b
收录时间
2026-11-21 03:49

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-21 05:03
浙ICP备14020137号-1