Analyze Code logo

Analyze Code

Community
babamba2
analyze-code

ABAP code analysis — size-gated review (one Opus sap-code-reviewer, or Haiku sap-checker detectors + Opus judge for large objects), Haiku evidence check on every finding, then a canned report or a richer briefing on the main thread

Overview

Publisherbabamba2
Repositorysuperclaude-for-sap
Skill nameanalyze-code
Stars
69
Forks
26
Bundled files
5
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by babamba2 on GitHub. Read the source before you install it.

Installation

Install the Analyze Code AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/babamba2/superclaude-for-sap/tree/main/skills/analyze-code
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/babamba2/superclaude-for-sap.git /tmp/superclaude-for-sap
mkdir -p .claude/skills
cp -r /tmp/superclaude-for-sap/skills/analyze-code .claude/skills/analyze-code
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Analyze Code in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Analyze Code on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Analyze Code is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

SC4SAP Analyze Code

Reviews an ABAP object by delegating the heavy work (source read, structural/semantic/where-used analysis, 14-dimension rule matching) to sap-code-reviewer (Opus) — for objects over 1,500 lines, Haiku sap-checker detectors find candidates and the Opus reviewer judges them. Every finding's cited line is then checked by Haiku before it reaches the report. The main thread (session model, model: inherit) only handles Socratic intake, report formatting, and the follow-up action menu.

<Response_Prefix> Every response triggered by this skill MUST begin with [Model: <main-model> · Dispatched: <sub-summary>] per ../../common/model-routing-rule.md § Response Prefix Convention. </Response_Prefix> <Target_Object>The target object is looked up on the active profile's system only. Not found → stop and ask per ../../common/multi-profile-artifact-resolution.md § Target object not on the active system — never substitute a similar name, never switch profiles on your own.</Target_Object>

<Phase_Banner> Multi-phase skill. Before each Agent(...) dispatch, emit ▶ phase=<id> (<label>) · agent=<name> · model=<Opus|Sonnet|Haiku> per ../../common/model-routing-rule.md § Phase Banner Convention. Resolve the dispatch mode first per ../../common/model-dispatch-mode.md: auto (default) uses the model below/in the rule; user-defined asks the user Opus / Sonnet / Haiku (recommended one first) before each dispatch group. </Phase_Banner>

<Team_Mode> Type B (Coder ↔ Consultant) teamMode — Opt-in, not automatic. It runs only when (a) the arguments contain team (e.g. /sc4sap:analyze-code ZSDR21500 team), or (b) the user accepts the offer at the end of Step 3. The offer is made only when the gate below holds: after the report, one AskUserQuestion — "Have the consultants review the N business-alignment findings? (about +$4, +10 min)" — options Skip (Recommended) / Run consultant review. Business-alignment findings in the report carry a consultant review recommended tag either way. Unattended runs never offer it. Gate for the offer: the verified findings include a business-alignment finding (business purpose, business-rule faithfulness, cross-module side-effects — judged by content, not dimension number) AND the object touches 2+ modules. Reviewer becomes Worker, module consultants become Peers; consultants live-validate the reviewer's business-alignment findings. See team-mode.md. Base protocol: ../../common/team-consultation-protocol.md § Type B. </Team_Mode>

<Use_When>

  • User says "analyze", "review code", "check this class", "what's wrong with", "analyze code", or "code review"
  • Before releasing a transport, to catch issues early
  • When taking over existing ABAP code and wanting to understand its quality
  • When optimizing performance of an ABAP program or class
  • User wants where-used impact analysis before modifying an object </Use_When>

<Do_Not_Use_When>

  • User wants to modify the code immediately → /sc4sap:create-program (full program flows) or direct UpdateClass / UpdateProgram / UpdateInclude MCP calls
  • Object doesn't exist yet → /sc4sap:create-object
  • User just wants to read the source → ReadClass, ReadProgram etc. directly </Do_Not_Use_When>

<Session_Trust_Bootstrap> MANDATORY — runs as Step 0 before any MCP call or user interaction.

Invoke /sc4sap:trust-session with parent_skill=sc4sap:analyze-code to pre-grant all MCP tool + file-op permissions for this session (eliminates per-tool "Allow this tool?" prompts during the review flow).

  • If .sc4sap/session-trust.log already has a line within the last 24h, skip silently.
  • Otherwise run it and surface the one-line confirmation.

Full spec: see ../trust-session/SKILL.md. </Session_Trust_Bootstrap>

<Companion_Files> MANDATORY: Read the companion files below before executing.

CompanionScope
analysis-dimensions.md9 common/ rule files that the reviewer agent (not main) loads + 14 evaluation dimensions
workflow.md4-step execution flow: Identify → Review (delegated, size-gated) → Report (branching) → Actions
detect-judge.mdStep 2a size scout · 2b Haiku detectors · 2c Opus judge · 2d evidence verify · FINDING line format
output-and-tools.mdReport output format + MCP tool list used by the reviewer agent
</Companion_Files>

<Execution_Summary> Orchestration is 1 main-thread Socratic intake + a size-gated delegated review + a Haiku evidence check + a branching report + main-thread action menu.

  • Step 1 (main) — Identify: ask for (or confirm) the ABAP object name + type; verify via SearchObject.
  • Step 2a (delegated · Haiku) — sap-checker scout returns source units with line counts + caller count.
  • Step 2 (delegated · Opus) — ≤ 1,500 lines: dispatch to sap-code-reviewer with only the object reference. > 1,500 lines: Haiku detectors × N (5 rule groups) write candidates, then one Opus sap-code-reviewer judges them and evaluates the judgment dimensions (§1 / §4 / §9 / §14) — see detect-judge.md. On the single path the reviewer agent itself reads source (via GetClass/GetProgram/GetProgFullCode/...), runs structural analysis (GetAbapAST + GetAbapSemanticAnalysis + GetWhereUsed), loads the 9 common/ rule files, and evaluates all 14 dimensions. Returns: findings list (severity · location · rule ref · fix suggestion, one FINDING line each) + summary metrics.
  • Step 2d (delegated · Haiku) — sap-checker verify confirms each finding's evidence quote exists at the cited line; failures move to an Unverified section and leave the score.
  • Step 3 (branching):
    • Branch A — canned (default: no Critical findings AND < 10 findings total) → main formats the standard report template from output-and-tools.md.
    • Branch B — briefing (Critical present OR ≥ 10 findings) → main renders a richer reader-facing briefing (Critical/High with root cause + fix code, where-used impact, top-3 fixes) per workflow.md § Branch B. No extra agent dispatch.
  • Step 4 (main) — Follow-up action menu: show where-used · explain finding #N · save report (Markdown · HTML · both) · delegate fix to sap-executor (user's choice).

Full spec in workflow.md. Main thread NEVER calls ReadClass / GetAbapAST / GetWhereUsed directly — that context stays inside the reviewer and checker agents so the orchestrator window remains small even for large objects. </Execution_Summary>

Task: $ARGUMENTS

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Analyze Code AI skill do?

ABAP code analysis — size-gated review (one Opus sap-code-reviewer, or Haiku sap-checker detectors + Opus judge for large objects), Haiku evidence check on every finding, then a canned report or a richer briefing on the main thread

Why use Analyze Code on TypingMind?

Because you install it once and use it with any model. Analyze Code is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Analyze Code in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/babamba2/superclaude-for-sap/tree/main/skills/analyze-code. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Analyze Code?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Analyze Code?

As many as you like. As long as a model supports skills, you can use Analyze Code with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Analyze Code AI skill free?

Yes. It is published on GitHub by babamba2 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇