home / skills / dagster-io / erk / erk-diff-analysis

erk-diff-analysis skill

/.claude/skills/erk-diff-analysis

This skill generates concise, strategic commit messages for diffs by describing module changes, highlighting breaking changes, and noting test coverage.

npx playbooks add skill dagster-io/erk --skill erk-diff-analysis

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
816 B
---
name: erk-diff-analysis
description: Internal skill for commit message generation. Only load when explicitly requested by name or invoked by commands.
---

# Diff Analysis

This skill provides the commit message generation prompt used by PR submission commands.

## When to Use

Only load this skill when:

- Explicitly requested by name (`erk-diff-analysis`)
- Invoked by commands like `/erk:git-pr-push`

## Usage

Load `references/commit-message-prompt.md` when analyzing a diff, then apply its principles to generate output.

## Key Principles

- Be concise and strategic - focus on significant changes
- Use component-level descriptions - reference modules/components, not individual functions
- Highlight breaking changes prominently
- Note test coverage patterns
- Use relative paths from repository root

Overview

This skill generates concise, high-quality commit messages from diffs for PR submissions. It is loaded only when explicitly requested or invoked by specific commands, keeping it inactive by default. The output emphasizes impactful changes, breaking notes, and repository-relative paths to aid reviewers and changelogs.

How this skill works

When invoked, it loads the commit-message prompt template and inspects the provided diff. It summarizes changes at the component/module level, flags breaking changes, and notes test coverage patterns. The result is a strategic, reviewer-focused commit message that follows repository conventions.

When to use it

  • When explicitly requesting the skill by name (erk-diff-analysis).
  • During PR submission commands like /erk:git-pr-push.
  • When you need a concise, reviewer-friendly commit message from a diff.
  • When preparing changelogs or release notes derived from code changes.

Best practices

  • Focus summaries on components or modules rather than single functions.
  • Highlight breaking changes up front and use clear, actionable wording.
  • Include relative repository paths to changed components for quick navigation.
  • Mention test coverage updates or gaps when relevant to the diff.
  • Be concise and avoid implementation-level noise in the message body.

Example use cases

  • Generating the commit message for a PR that refactors a service module and updates its interface.
  • Summarizing a multi-file feature addition that touches API, CLI, and docs components.
  • Noting a breaking change where a public function signature was altered.
  • Creating a changelog entry that calls out added tests and missing coverage areas.

FAQ

When is this skill loaded?

Only when explicitly requested by name or invoked through designated PR commands.

Should commit messages include file-level details?

Prefer component-level descriptions and repository-relative paths; avoid listing every file unless the change is small and file names add clarity.