Ase code analyze
Agentic Software Engineering (ASE)
npx -y skills add rse/ase --skill ase-code-analyzeAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
What its author says it does
Copied from the file, not written here
Analyze the source code for problems in either the logic and semantics and its related control flow, performance and efficiency, or security.
SKILL.md
8.3 KB, as published. Nobody here has run it
@${CLAUDE_SKILL_DIR}/../../meta/ase-control.md @${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md @${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
<skill name="ase-code-analyze"> Analyze Source Code </skill><expand name="getopt" arg1="ase-code-analyze" arg2="--performance|-p --security|-s --severity|-S=(LOW|MEDIUM|HIGH)"> $ARGUMENTS </expand>
<objective> *Analyze* the source code of <getopt-arguments/>, and its directly related source code, for problems - read-only, *without* applying any changes. The *analysis lens* depends on the selected options: problems in its *logic* and *semantics* and its related *control flow*, or problems in *performance* and *efficiency*, or problems in *security*. </objective> <flow>-
<step id="STEP 1: Sanity Check Usage">
<if condition="<getopt-option-performance/> is equal `true` and <getopt-option-security/> is equal `true`">
Only output the following <template/> and then STOP the entire flow (do not perform any further steps):
<template> ⧉ **ASE**: ✪ skill: **ase-code-analyze**, ▶ ERROR: options `--performance` and `--security` are mutually exclusive </template> </if> </step> -
<step id="STEP 2: Investigate Code Base">
<if condition="<ase-project-boxing/> is equal `black`">
The project source artifacts are classified as a black box, so the user does not want them inspected or their problems surfaced. Skip the entire investigation and analysis: do not invoke any
<template> <ase-tpl-bullet-normal/> **CODE ANALYSIS**: *suppressed* (`project.boxing` is `black`) </template> </if>GloborAgenttool and do not read any source, only output the following <template/> and then SKIP the remaining step STEP 3:First, use the following <template/> to give a hint on this step:
<template> <ase-tpl-bullet-secondary/> **ANALYSIS INVESTIGATION** </template>Dispatch the investigation to sub-agents via the
Agenttool so that no investigation details leak into the user-visible transcript. The sub-agents perform the silent reading and checking; only their final structured return values are consumed here.For this, first determine the analysis lens <lens/>: set <lens>performance</lens> if <getopt-option-performance/> is equal
true, set <lens>security</lens> if <getopt-option-security/> is equaltrue, and set <lens>logic</lens> otherwise.Then silently resolve
<getopt-arguments/>to the list <sources/> of individual source code files, expanding any directory or wildcard references with theGlobtool. Then partition <sources/>, preserving order, into at most eight batches of roughly equal size (a single file yields a single batch), and invoke the following tool once per batch, emitting all invocations in one single message so they run in parallel:Agent( description: "Analysis Investigation (<batch-index/>/<batch-count/>)", subagent_type: "ase:ase-code-analyze", prompt: "<lens/> <batch/>", run_in_background: false )Here <batch/> is the space-separated list of the source code file paths of the corresponding batch, <batch-index/> is the 1-based index of that batch, and <batch-count/> is the total number of batches, so that each parallel invocation is distinguishable in the progress display.
Parse the result message of each
Agenttool invocation as a JSON array and concatenate all those arrays. Then deduplicate the combined list: when two problems share the samefileandline, silently drop all but the first one (sub-agents may have read overlapping related files for comprehension). Finally sort the list byfileand then numerically byline, and set <problems/> to that list.You MUST NOT output anything at all in this STEP 2 beyond the
</step>GlobandAgenttool invocations. -
<step id="STEP 3: Show Results">
Before reporting, determine the effective severity floor <floor/>: define the ordinal rank
LOW=1,MEDIUM=2,HIGH=3, start from <floor><getopt-option-severity/></floor> (defaultLOW), and - if <ase-project-boxing/> is equalgrey- raise <floor/> toMEDIUMwhenever its current rank is belowrank(MEDIUM)(grey boxing surfaces only material findings of severityMEDIUMand above).Then apply the effective severity floor <floor/>: Keep a detected problem if and only if its
severityfield isACCEPTEDorrank(severity)is greater than or equal torank(<floor/>); silently drop all other problems (they are neither reported nor persisted). With the default floorLOW, all problems are kept.ACCEPTEDproblems are never dropped.Then sort the surviving problems in <problems/> by their
severityfield from highest to lowest in the fixed orderHIGH,MEDIUM,LOW,ACCEPTED, so the reporting starts with the most severe problem. Within the same severity, keep thefile/lineorder established in STEP 2.Then renumber the surviving problems contiguously as
P<n/>with <n/> = 1, 2, ... in that sorted ordering, soP1is the most severe problem and the persistedase-issue-P<n/>keys follow the reported sequence. If all problems are dropped, skip the per-problem report but still purge any stale persisted problems with a singlease_kv_batchcall to theaseMCP server withtransactionalset totrueand acommandsparameter array holding exactly one{ command: "clear", prefix: "ase-issue-" }entry, and still emit the final hint <template/> below.In this STEP 3, for EVERY surviving problem in <problems/>, set <severity/> to its
<if condition="<getopt-option-performance/> is equal `true`"> <template>severityfield, <title/> to itstitlefield, <description/> to itsdescriptionfield, <evidence/> to itsevidencefield, and <trade-off/> to itstrade-offfield, and immediately report it with the following output <template/>, based on concise bullet points.<ase-tpl-bullet-signal/> PROBLEM (Severity: <severity/>): P<n/>: <title/>
<description/>⊙ EVIDENCE: <evidence/> ⊖ TRADEOFF: <trade-off/>
</template> </if> <if condition="<getopt-option-performance/> is NOT equal `true`"> <template><ase-tpl-bullet-signal/> PROBLEM (Severity: <severity/>): P<n/>: <title/>
<description/> </template> </if>Hints:
-
For the final results, do not output anything else, especially do not give any further explanations or information.
-
Uniquely identify the problems with
P<n/>where <n/> is 1, 2, ... -
Additionally, persist all reported problems in a single
ase_kv_batchcall to theaseMCP server withtransactionalset totrue. Thecommandsparameter array of this call starts with one{ command: "clear", prefix: "ase-issue-" }entry (which removes only the previously persistedase-issue-*keys, leaving any unrelated keys in the shared store intact), followed by one{ command: "set", key: "ase-issue-P<n/>", val: "<title/>: <description/>" }entry per reported problem.
Finally, give a final hint by expanding the following (which, depending on the configured <ase-guidance-level/>, may expand into nothing and hence emit no output at all):
<ase-tpl-hint level="minimal"> For deeper analysis, suggestions on solution approaches and then final problem resolution, use `/ase-code-resolve P{n}` in the same or even a different session. </ase-tpl-hint>You MUST not output anything else in this STEP 3, especially not any further explanations.
</step> -