Skip to content
Development
Skill

/ase-repo-dissect

Dissect the current Git change set, treated as an epic, domain-wise and logically into cohesive parts and materialize each part in its own dedicated Git WorkTree. Use when the user calls to "dissect", "split", "break up", or "decompose" a large change set into atomic, separately

From plugin
ase
7762 skills11 agents

Claude Code

$ npx -y skills add rse/ase --skill ase-repo-dissect --agent claude-code

SKILL.md

ase-repo-dissect.SKILL.md
name: ase-repo-dissect
argument-hint: "[--help|-h] [--max-parts|-m <count>] [--staged|-s] [--dry|-d] [--force|-f] [<dissect-hint>]"
description: >
    Dissect the current Git change set, treated as an epic, domain-wise
    and logically into cohesive parts and materialize each part in its
    own dedicated Git WorkTree. Use when the user calls to "dissect",
    "split", "break up", or "decompose" a large change set into atomic,
    separately committable parts.
user-invocable: true
disable-model-invocation: false
effort: xhigh
allowed-tools:
    - "Bash(git *)"
    - "Bash(rm -f *)"
    - "Write"
    - "Read"
    - "Edit"

@${CLAUDE_SKILL_DIR}/../../meta/ase-control.md @${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md @${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md

<purpose name="ase-repo-dissect"> Dissect a Change Set </purpose>

<expand name="getopt" arg1="ase-repo-dissect" arg2="--max-parts|-m=8 --staged|-s --dry|-d --force|-f"> $ARGUMENTS </expand>

<objective> *Dissect* the current Git change set, treated as an *epic*, domain-wise and logically into *cohesive parts*, and materialize every part in its own dedicated *Git WorkTree*, so each part can be reviewed and committed *atomically* and *independently*. </objective>

@${CLAUDE_SKILL_DIR}/../../meta/ase-common-dissect.md

Procedure ---------

<flow>

1. <step id="STEP 1: Determine Change Set and Hint">

1. Determine the *dissection hint*: set <dissect-hint><getopt-arguments/></dissect-hint>, with any leading and trailing whitespace stripped. Additionally, inherit the always existing <ase-project-id/> from the current context, as it names the worktrees and branches of all derived parts.

<if condition="<dissect-hint/> is not empty"> Only output the following <template/>:

<template> ⧉ **ASE**: ✪ skill: **ase-repo-dissect**, ⇌ hint: **<dissect-hint/>** </template> </if> <else> No dissection hint was given, so the parts are derived from the change set alone. Do not output anything. </else>

2. Determine the *repository root* by running the corresponding command (taken exactly as given) and capturing its output into <repo-root/>:

`git rev-parse --show-toplevel`

3. Determine the *diff details* and the *diff statistics* by running the corresponding commands (taken exactly as given) and capturing their full outputs into <diff/> and <stat/>:

<if condition="<getopt-option-staged/> is equal `true`"> `git diff --cached --no-color --no-ext-diff --src-prefix=a/ --dst-prefix=b/ --binary HEAD`

`git diff --cached --numstat HEAD` </if> <else> `git diff --no-color --no-ext-diff --src-prefix=a/ --dst-prefix=b/ --binary HEAD`

`git diff --numstat HEAD` </else>

4. <if condition="<getopt-option-staged/> is not equal `true`"> Additionally, *fold in the untracked files* -- they are part of the working copy change set, but carry no diff of their own. Determine them *read-only* by running the corresponding command (taken exactly as given):

`git -C "<repo-root/>" -c core.quotepath=off ls-files --others --exclude-standard`

*Skip* every listed entry below the `.ase/` directory -- it carries *ASE*'s own state and the worktrees created by this very skill, and hence is never part of the user's change set.

Then, for *every* remaining listed file, capture its creation diff by running the corresponding command (taken exactly as given) and *append* its output to <diff/>:

`git -C "<repo-root/>" diff --no-index --no-color --no-ext-diff --src-prefix=a/ --dst-prefix=b/ --binary /dev/null "<file/>"`

This command intentionally exits with a non-zero status, because the two compared paths differ; treat this exit status as *success*, not as an error. Judge the *outcome* by the *output* instead: a run which emits *no* diff on standard output but an `error:` or `fatal:` message (e.g. the entry is a *nested* Git repository, which `git ls-files` reports as a directory) is a *real* failure -- append nothing for that entry and only output the following <template/>, then continue with the next file:

<template> ⧉ **ASE**: ✪ skill: **ase-repo-dissect**, ⊘ untracked: `<file/>`, ▶ status: **not foldable into the change set** </template> </if> <else> Untracked files are *not* folded in under `--staged`/`-s`, because they are by definition *not* part of the Git index. Do not output anything. </else>

5. <if condition="<diff/> is empty"> Only output the following <template/> and then *STOP* immediately:

<template> ⧉ **ASE**: ✪ skill: **ase-repo-dissect**, ▶ status: **no changes to dissect** </template> </if>

</step>

2. <step id="STEP 2: Dissect Change Set">

1. *Derive the parts* of the epic:

<expand name="dissect-derive" arg1="ase-repo-dissect" arg2="<dissect-hint/>" arg3="<ase-project-id/>" > the individual hunks of the captured <diff/>, weighted by the line counts of <stat/> and -- for the folded-in untracked files, which carry no <stat/> entry -- by their own diff line counts </expand>

Additionally, try to keep *all* hunks of *one* file in the *same* part, and split a file's hunks across parts *only* when they are genuinely unrelated -- this keeps the per-part patches applicable.

A *single* hunk is *atomic* here, so rule 3's splitting permission does *not* apply to it: you *MUST NOT* break a hunk into sub-hunks, because this would require re-computing its `@@` header and hence destroy

Read more
@rse
Ships withase

Agentic Software Engineering (ASE)

7762 skills11 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
77
Star history of rse/ase on GitHub, a chart by star-history.com

Other skills on ase.

hello

hello

Show a nice greeting message with a timestamp. Use this when the user wants to greet or say hello, optionally to a certain…

@rse@rseInstall Skill
ase-arch-analyze

ase-arch-analyze

Review software architecture, including package cohesion and inter-package coupling

@rse@rseInstall Skill
ase-arch-discover

ase-arch-discover

Discover additional, third-party components (libraries/frameworks) for the technology stack to provide needed functionality.

@rse@rseInstall Skill
ase-code-analyze

ase-code-analyze

Analyze the source code for problems in either the logic and semantics and its related control flow, performance and efficiency,…

@rse@rseInstall Skill
ase-code-edit

ase-code-edit

Edit Source Code: Use when the user wants to "edit" the code base in one shot from a query or a bare analyzer issue id like "P1",…

@rse@rseInstall Skill
ase-code-explain

ase-code-explain

Explains code with WHAT, WHY, ANALOGY, DIAGRAM, CRUXES, and GOTCHAS. Use when you want to know how code works or when the user…

@rse@rseInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills3w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc3w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react11d252k
@facebook@facebookInstall Skill

Questions about ase-repo-dissect.

Which coding agents can use ase-repo-dissect?
ase-repo-dissect installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.