/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", fusing crafting, refactoring, and resolving with optional grilling, verification, looping, and Git worktree isolation.
Claude Code
$ npx -y skills add rse/ase --skill ase-code-edit --agent claude-code
Codex
$ npx skills add rse/ase --skill ase-code-edit -a codex -y
Cursor
$ npx skills add rse/ase --skill ase-code-edit -a cursor -y
Gemini CLI
$ npx skills add rse/ase --skill ase-code-edit -a gemini-cli -y
GitHub Copilot
$ npx skills add rse/ase --skill ase-code-edit -a github-copilot -y
OpenCode
$ npx skills add rse/ase --skill ase-code-edit -a opencode -y
Windsurf
$ npx skills add rse/ase --skill ase-code-edit -a windsurf -y
SKILL.md
ase-code-edit.SKILL.mdname: ase-code-edit
argument-hint: "[--help|-h] [--mode|-m auto|craft|refactor|resolve] [--approach|-a] [--grill|-g] [--grill-rounds|-r <n>] [--grill-until|-u MUST|SHOULD|MAY] [--grill-perspective|-p <perspective>] [--grill-ground|-G] [--verify|-v light|none|full] [--worktree|-w <name>[:<branch>]] [--loop|-l] [<query>|<issue-id>]"
description: >
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", fusing
crafting, refactoring, and resolving with optional grilling,
verification, looping, and Git worktree isolation.
user-invocable: true
disable-model-invocation: false
effort: xhigh@${CLAUDE_SKILL_DIR}/../../meta/ase-control.md @${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md @${CLAUDE_SKILL_DIR}/../../meta/ase-dialog.md @${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
<purpose name="ase-code-edit"> Edit Source Code </purpose>
<expand name="getopt" arg1="ase-code-edit" arg2="--mode|-m=(auto|craft|refactor|resolve) --approach|-a --grill|-g --grill-rounds|-r=1 --grill-until|-u=(MUST|SHOULD|MAY) --grill-perspective|-p= --grill-ground|-G --verify|-v=(light|none|full) --worktree|-w= --loop|-l"> $ARGUMENTS </expand>
<objective> *Edit* the code base directly from a query -- crafting, refactoring, or resolving in one shot -- through the states *querying*, *discovering*, *grilling*, *implementing*, and *verifying*. </objective>
@${CLAUDE_SKILL_DIR}/../../meta/ase-tenets.md @${CLAUDE_SKILL_DIR}/../../meta/ase-common-grill.md @${CLAUDE_SKILL_DIR}/../../meta/ase-common-changeset.md @${CLAUDE_SKILL_DIR}/../../meta/ase-common-approach.md
Procedure ---------
This skill is *plan-less*: it *never* composes or persists a task plan and *MUST* *NOT* call `ase_task_save(...)`. Instead, it applies the requested edit *in place*, so the *implementing* state *requires* `Edit` and `Write` to modify the affected artifacts. Every modification *MUST* stay restricted to the artifacts the edit actually demands.
<define name="todo-box">
On finishing the state `<arg1/>`, only output the following <template/>, which shows the established <todo-what/> and <todo-how/>, where a still empty <todo-what/> or <todo-how/> renders as `(none)`:
<template> <ase-tpl-head title="EDIT TODO" subtitle="<arg1/>"/>
**WHAT**: <todo-what/>
**HOW**: <todo-how/>
<ase-tpl-foot title="EDIT TODO" subtitle="<arg1/>"/> </template>
</define>
1. **Initialize:**
1. Set <query><getopt-arguments/></query> (with any leading and trailing whitespace stripped), set <todo-what></todo-what> and <todo-how></todo-how> (both empty), and set <worktree-dir></worktree-dir> (empty). Do not output anything.
2. If <getopt-option-grill-rounds/> is not a positive integer, only output the following <template/> and then immediately *STOP* processing the entire current skill:
<template> ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ ERROR: invalid `--grill-rounds` value: **<getopt-option-grill-rounds/>** </template>
3. Resolve a potentially misparsed former boolean `--worktree` option:
<expand name="changeset-ambiguity" arg1="✪ skill: **ase-code-edit**"></expand>
2. **Iterate:**
Perform the states (1) *querying*, (2) *discovering*, (3) *grilling*, (4) *implementing*, and (5) *verifying* below as one *iteration*. Without `--loop` perform exactly *one* iteration. Under `--loop` *repeat* the iteration until the *querying* state receives a `STOP SKILL` result. Do not output anything in this item.
3. **State: querying:**
1. <if condition="<query/> is empty">
1. In the following, you *MUST* *NOT* use your built-in <user-dialog-tool/> tool! Instead, you *MUST* just show a custom dialog according to the expanded `custom-dialog` definition. You *MUST* closely follow this definition. Its only answer option is the fixed `STOP SKILL`, so the user normally answers with the edit query in *one* free-text reply:
<expand name="custom-dialog" arg1="--other"> Edit Query: What is your edit query? STOP SKILL: stop the entire skill immediately </expand>
2. If <result/> is `STOP SKILL` or `CANCEL`, only output the following <template/> and then immediately *STOP* processing the entire current skill:
<template> ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ status: **editing finished** </template>
Otherwise, strip any leading `OTHER: ` prefix from <result/> and set <query/> to the remainder.
</if>
2. <if condition="<query/> matches the regexp `^([a-zA-Z][a-zA-Z0-9_]*-)?[PT]\d+$`">
The <query/> is a bare issue identifier (like `P1`, `T1`, or `<prefix>-P1`) previously produced by `ase-code-analyze` or `ase-arch-analyze`. Set <issue-id><query/></issue-id> and call the `ase_kv_get(key: "ase-issue-<issue-id/>")` tool of the `ase` MCP server to retrieve the persisted problem description. If the returned `text` is non-empty, set <query><text/></query> and only output the following <template/>:
<template> ⧉ **ASE**: ✪ skill: **ase-code-edit**, ⇌ issue: **<issue-id/>**, ▶ status: **issue retrieved** </template>
Otherwise, only output the following <template/>, then set <issue-id></issue-id> and <query></query> (both empty, so the next iteration asks for a fresh query), and then, under `--loop`, continue with the *next* iteration at item 3.1 above, or, without `--loop`, immediately *STOP* processing the entire current skill:
<template> ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ ERROR: no analyzer result exists for issue **<query/>** </template>
</if>
3. C
Read more
name: ase-code-edit
argument-hint: "[--help|-h] [--mode|-m auto|craft|refactor|resolve] [--approach|-a] [--grill|-g] [--grill-rounds|-r <n>] [--grill-until|-u MUST|SHOULD|MAY] [--grill-perspective|-p <perspective>] [--grill-ground|-G] [--verify|-v light|none|full] [--worktree|-w <name>[:<branch>]] [--loop|-l] [<query>|<issue-id>]"
description: >
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", fusing
crafting, refactoring, and resolving with optional grilling,
verification, looping, and Git worktree isolation.
user-invocable: true
disable-model-invocation: false
effort: xhigh@${CLAUDE_SKILL_DIR}/../../meta/ase-control.md @${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md @${CLAUDE_SKILL_DIR}/../../meta/ase-dialog.md @${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
<purpose name="ase-code-edit"> Edit Source Code </purpose>
<expand name="getopt" arg1="ase-code-edit" arg2="--mode|-m=(auto|craft|refactor|resolve) --approach|-a --grill|-g --grill-rounds|-r=1 --grill-until|-u=(MUST|SHOULD|MAY) --grill-perspective|-p= --grill-ground|-G --verify|-v=(light|none|full) --worktree|-w= --loop|-l"> $ARGUMENTS </expand>
<objective> *Edit* the code base directly from a query -- crafting, refactoring, or resolving in one shot -- through the states *querying*, *discovering*, *grilling*, *implementing*, and *verifying*. </objective>
@${CLAUDE_SKILL_DIR}/../../meta/ase-tenets.md @${CLAUDE_SKILL_DIR}/../../meta/ase-common-grill.md @${CLAUDE_SKILL_DIR}/../../meta/ase-common-changeset.md @${CLAUDE_SKILL_DIR}/../../meta/ase-common-approach.md
Procedure ---------
This skill is *plan-less*: it *never* composes or persists a task plan and *MUST* *NOT* call `ase_task_save(...)`. Instead, it applies the requested edit *in place*, so the *implementing* state *requires* `Edit` and `Write` to modify the affected artifacts. Every modification *MUST* stay restricted to the artifacts the edit actually demands.
<define name="todo-box">
On finishing the state `<arg1/>`, only output the following <template/>, which shows the established <todo-what/> and <todo-how/>, where a still empty <todo-what/> or <todo-how/> renders as `(none)`:
<template> <ase-tpl-head title="EDIT TODO" subtitle="<arg1/>"/>
**WHAT**: <todo-what/>
**HOW**: <todo-how/>
<ase-tpl-foot title="EDIT TODO" subtitle="<arg1/>"/> </template>
</define>
1. **Initialize:**
1. Set <query><getopt-arguments/></query> (with any leading and trailing whitespace stripped), set <todo-what></todo-what> and <todo-how></todo-how> (both empty), and set <worktree-dir></worktree-dir> (empty). Do not output anything.
2. If <getopt-option-grill-rounds/> is not a positive integer, only output the following <template/> and then immediately *STOP* processing the entire current skill:
<template> ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ ERROR: invalid `--grill-rounds` value: **<getopt-option-grill-rounds/>** </template>
3. Resolve a potentially misparsed former boolean `--worktree` option:
<expand name="changeset-ambiguity" arg1="✪ skill: **ase-code-edit**"></expand>
2. **Iterate:**
Perform the states (1) *querying*, (2) *discovering*, (3) *grilling*, (4) *implementing*, and (5) *verifying* below as one *iteration*. Without `--loop` perform exactly *one* iteration. Under `--loop` *repeat* the iteration until the *querying* state receives a `STOP SKILL` result. Do not output anything in this item.
3. **State: querying:**
1. <if condition="<query/> is empty">
1. In the following, you *MUST* *NOT* use your built-in <user-dialog-tool/> tool! Instead, you *MUST* just show a custom dialog according to the expanded `custom-dialog` definition. You *MUST* closely follow this definition. Its only answer option is the fixed `STOP SKILL`, so the user normally answers with the edit query in *one* free-text reply:
<expand name="custom-dialog" arg1="--other"> Edit Query: What is your edit query? STOP SKILL: stop the entire skill immediately </expand>
2. If <result/> is `STOP SKILL` or `CANCEL`, only output the following <template/> and then immediately *STOP* processing the entire current skill:
<template> ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ status: **editing finished** </template>
Otherwise, strip any leading `OTHER: ` prefix from <result/> and set <query/> to the remainder.
</if>
2. <if condition="<query/> matches the regexp `^([a-zA-Z][a-zA-Z0-9_]*-)?[PT]\d+$`">
The <query/> is a bare issue identifier (like `P1`, `T1`, or `<prefix>-P1`) previously produced by `ase-code-analyze` or `ase-arch-analyze`. Set <issue-id><query/></issue-id> and call the `ase_kv_get(key: "ase-issue-<issue-id/>")` tool of the `ase` MCP server to retrieve the persisted problem description. If the returned `text` is non-empty, set <query><text/></query> and only output the following <template/>:
<template> ⧉ **ASE**: ✪ skill: **ase-code-edit**, ⇌ issue: **<issue-id/>**, ▶ status: **issue retrieved** </template>
Otherwise, only output the following <template/>, then set <issue-id></issue-id> and <query></query> (both empty, so the next iteration asks for a fresh query), and then, under `--loop`, continue with the *next* iteration at item 3.1 above, or, without `--loop`, immediately *STOP* processing the entire current skill:
<template> ⧉ **ASE**: ✪ skill: **ase-code-edit**, ▶ ERROR: no analyzer result exists for issue **<query/>** </template>
</if>
3. C
Other skills on ase.
More skills from other plugins.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
ask-matt
Ask which skill or flow fits your situation. A router over the skills in this repo.
Questions about ase-code-edit.
- Which coding agents can use ase-code-edit?
- ase-code-edit 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.

