@${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
$ARGUMENTS
First, use the following to give a hint on this step:
Dispatch the investigation to a sub-agent via the
Agenttool so that no investigation details leak into the user-visible transcript. The sub-agent performs the silent reading and checking; only its final structured return value is consumed here.For this, invoke exactly once the tool:
Agent( name: "ase-code-lint", description: "Lint Investigation", subagent_type: "ase:ase-code-lint", mode: "plan", prompt: <getopt-arguments/> )Parse the single result message of the
Agenttool as a JSON array and set to that list.Then apply the severity floor selected via (default
LOW): define the ordinal rankLOW=1,MEDIUM=2,HIGH=3. Keep a problem in if and only if itsseverityfield isACCEPTEDorrank(severity)is greater than or equal torank(<getopt-option-severity/>); silently drop all other problems. With the default floorLOW, all problems are kept.ACCEPTEDproblems are never dropped.You MUST NOT output anything else in this step 1.
Use the following to output a summary of the detected problems in (if any were found), in the original aspect ordering
A01 - XXX...A20 - XXX.AX - XXX: N issues AX - XXX: N issues [...]
Else, if no problems were found, use the following to output the summary instead:
(no problems detected)
You MUST NOT output anything else in this step 2.
Mark this skill as the active edit-capable skill so that the ASE
pre-tool-usehook auto-approves the subsequentEditinvocations on any invocation path (slash command orSkilltool). Call thease_config_set(key: "agent.skill", val: "ase-code-lint", scope: "session:<ase-session-id/>")tool from theaseMCP server. Do not output anything in this substep.Critical safety invariant: the marker set here grants
Editauto-approval and MUST be cleared again (substep 3 below) before this skill yields control, regardless of how the iteration in substep 2 ends - whether it completes normally, is aborted early (e.g. anEditfailure, an unparseable value, or any other unexpected condition), or is otherwise interrupted. If you ever stop or bail out of substep 2 early, you MUST still perform substep 3 first. Never leave this marker active for a later, unrelatedEdit.Iterate over all problems:
Set to the
aspectfield of . Set to theseverityfield of . Set to thedescriptionfield of . Set to thechange-setfield of .Set (set to empty). Set (set to empty).
Iterate over the change set:
Set to the
filefield of . Set to thechange-hunksfield of .Set to the following :
Iterate over the change hunks.
Set to the
linefield of . Set to thecontext_beforefield of . Set to theold_textfield of . Set to thenew_textfield of . Set to thecontext_afterfield of .Determine the hunk body as an ordered list of lines, each carrying a one-character prefix (
for context,-for old-side,+for new-side). Build it by concatenating, in order and skipping any part that is empty:- one
-prefixed line for each line of (if non-empty), - one
--prefixed line for each line of (if non-empty; split on newlines), - one
+-prefixed line for each line of (if non-empty; split on newlines), - one
-prefixed line for each line of (if non-empty).
Set to those prefixed lines joined by newlines.
Set to the number of old-side hunk lines, i.e., the combined line count of , , and (each empty part counts as
0). Set to the number of new-side hunk lines, i.e., the combined line count of , , and (each empty part counts as0).Set to the 1-based line number of the first old-side hunk line: if is non-empty, that is its line (one before ); otherwise it is itself (the first line of ). For a hunk that only inserts new lines (empty and empty context), set it to the line before which the insertion happens, clamped to a minimum of
0, so a top-of-file insertion yields@@ -0,0 ... @@. Set to the same value as , but clamped to a minimum of1whenever is greater than0(the corrected side then has a real first line).- one
If is not empty, set , (append a comma). Then append the following to :
<file/>:Append the following to , emitting verbatim (one already-prefixed line per line, with no extra blank or space-only lines):
Append to .
Report the problem with the following :
Report the solution with the following :
<diff/>Report the solution with the following :
(corresponding change automatically applied)
In the following, you MUST NOT use your built-in tool! Instead, you MUST just show a custom dialog according to the expanded
custom-dialogdefinition. You MUST closely follow this definition:Set ACCEPT. You MUST NOT output anything else in this step 6.
Check and dispatch accordingly:
Skip this without any
Editcall and continue with the next .
Clear the active edit-capable skill marker now that all
Editinvocations are done, so a later unrelatedEditis not auto-approved. Call thease_config_delete(key: "agent.skill", scope: "session:<ase-session-id/>")tool from theaseMCP server. Do not output anything in this substep.You MUST NOT output any further additional explanations or summaries at the end of this skill processing, except for the following final :