legacy-code-doc

legacy-code-doc is a skill for Claude Code, Codex from yzonur/sap-adt-mcp. It costs 109 tokens per session (1,155 once invoked), scanned A, original, MIT.

A read-only guide for documenting older SAP ABAP programs, classes, and function groups. It maps their structure, database connections, callers, data flow, and side effects.

In plain words
What is it for?
Use it to explain an ABAP object, document its purpose and interfaces, trace where it is used, inspect database touchpoints, and identify risks.
Why use it?
It turns code with little or no documentation into a clear record of what it does and what risks may matter before changes or an SAP migration.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to explain an ABAP object, document its purpose and interfaces, trace where it is used, inspect database touchpoints, and identify risks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yzonur/sap-adt-mcp/legacy-code-doc
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add yzonur/sap-adt-mcp --skill legacy-code-doc
Clone the repo
git clone --depth 1 https://github.com/yzonur/sap-adt-mcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for legacy-code-doc

README.md
[![agentmods](https://agentmods.dev/badge/skills/yzonur/sap-adt-mcp/legacy-code-doc/github.svg)](https://agentmods.dev/skills/yzonur/sap-adt-mcp/legacy-code-doc)
Your own site
<a href="https://agentmods.dev/skills/yzonur/sap-adt-mcp/legacy-code-doc"><img src="https://agentmods.dev/badge/skills/yzonur/sap-adt-mcp/legacy-code-doc/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for legacy-code-doc

Your own site · 80×15
<a href="https://agentmods.dev/skills/yzonur/sap-adt-mcp/legacy-code-doc"><img src="https://agentmods.dev/badge/skills/yzonur/sap-adt-mcp/legacy-code-doc.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 109 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,155 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00109 $0.01155
Opus 5 $0.00055 $0.00577
Sonnet 5 $0.00022 $0.00231
Haiku 4.5 $0.00011 $0.00115

Measured 9d ago against content hash b2ad92def46b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

legacy-code-doc scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/legacy-code-doc/SKILL.md · 98 lines

How it starts

The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Legacy Code Documentation

Produce documentation for ABAP objects that have none. The output is for two audiences at once: a developer who must change the code next month, and a manager deciding whether it survives the next migration.

Prerequisites

  • sap-adt-mcp ≥ 0.8.1 connected to the target system (adt_ping to verify).
  • NetWeaver 7.4x+ — only core ADT read endpoints are needed (source read, search, where-used). adt_read_table examples additionally need NW 7.55+; skip data sampling on older systems.
  • SAP user authorizations: repository display only (S_DEVELOP display).
  • Read-only mode: fully supported — this skill never writes to SAP. (It may write the documentation to a local file if the user asks.)
  • Large sources: adt_get_source output is capped per call (~64 KB). For big programs paginate with firstLine/lastLine, or slice with onlyMethod. Never assume one call returned the whole object — check truncated/totalLines.

Workflow

1. Scope the object

adt_search_objects if only a fuzzy name is known. Identify the object type — the strategy differs:

  • Program (PROG): fetch the main source, then list its includes (adt_browse_package on its package, or INCLUDE statements from source) and fetch each include that carries logic.
  • Class (CLAS): fetch definitions first (the public contract), then implementations method by method (onlyMethod) for the ones that matter.
  • Function group (FUGR): document each function module separately (adt_get_source with type function + group); shared TOP include for state.

2. Read with a checklist

While reading, collect — don't paraphrase line by line:

  • Entry points: events (START-OF-SELECTION, user-commands), public methods, FM interfaces, selection screen parameters.
  • Database touchpoints: every table read (SELECT/JOIN) and especially every write (INSERT/UPDATE/MODIFY/DELETE, CALL FUNCTION ... IN UPDATE TASK). Writes are the risk register.
  • External calls: RFCs, BAPIs, file I/O (OPEN DATASET, GUI_*), HTTP, authority-checks, COMMIT/ROLLBACK placement.
  • Configuration coupling: hardcoded values, TVARV/Z-config table reads, sy-mandt/sy-sysid branching.
  • Smells worth flagging: SELECT in loops, missing authority checks before writes, swallowed exceptions, dead branches (adt_grep_source across the package helps find copy-paste siblings).

Read the full file on GitHub · 98 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 98 lines · 109 tokens per session scan A b2ad92def46b

Subscribe to this mod's changes

legacy-code-doc is a skill published in the GitHub repository yzonur/sap-adt-mcp (15 stars, last pushed 22d ago), licensed MIT. It adds 109 tokens to every session and 1,155 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

sap-abap-setup

Configure, re-authenticate, and verify a local SAP ABAP MCP profile. Use when no SAP connection is configured, credentials are missing or expired, or the user asks to set up or repair SAP connectivity.

Coaspe/sap-abap-mcp · 48 tokens

sap-abap-change-assurance

Assess an SAP transport before release by running ATC, ABAP Unit, and optional cross-system comparison, then produce JSON, SARIF, and JUnit evidence. Use when reviewing a transport, preparing a release gate, investigating a failed quality gate, or integrating SAP change checks into CI.

Coaspe/sap-abap-mcp · 65 tokens

security-review

Perform a focused security review of pending git changes to identify high-confidence security vulnerabilities with real exploitation potential. Use this skill when the user asks for a security review, security audit, vulnerability scan, or wants to check pending changes on a branch for security issues before merging.…

waybarrios/opencode-power-pack · 64 tokens

huggingface-llm-trainer

Train or fine-tune language models with TRL or Unsloth on Hugging Face Jobs, including SFT, DPO, GRPO, reward models, and GGUF conversion. Use for cloud LLM training; use huggingface-vision-trainer for vision tasks.

waybarrios/opencode-power-pack · 65 tokens

feature-dev

Guide a feature implementation through a structured seven-phase workflow with deep codebase understanding, clarifying questions, parallel architecture design, and quality review. Use this skill when the user asks to build a new feature, add functionality, or wants a methodical approach to implementation rather than…

waybarrios/opencode-power-pack · 62 tokens

memstack-business-gdpr

Use this skill when the user says 'GDPR', 'data protection', 'privacy compliance', 'DPA', 'DSAR', 'data subject request', 'cookie consent', 'privacy audit', 'CCPA', or asks 'do I need GDPR for this repo'. Scans the repository to detect what personal data is collected, classifies sensitivity, determines whether GDPR…

cwinvestments/memstack · 121 tokens