program-to-spec

program-to-spec is a skill for Claude Code from babamba2/superclaude-for-sap. It costs 47 tokens per session (4,369 once invoked), scanned A, original, MIT.

A reverse-engineering workflow that turns an existing ABAP program or related SAP development object into a functional or technical specification. ABAP is SAP's programming language.

In plain words
What is it for?
Use it to document an ABAP report, class, function group, CDS object, or RAP business object in Markdown or Excel.
Why use it?
It examines the object's structure, meaning, and usage, then narrows the scope so the specification covers only what you need.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: model in frontmatter; names the AskUserQuestion tool.

Part of the sc4sap plugin — 23 skills, 27 agents, 8 hooks, 1 MCP server shipped together

Good fit Use it to document an ABAP report, class, function group, CDS object, or RAP business object in Markdown or Excel.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/babamba2/superclaude-for-sap/program-to-spec
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 babamba2/superclaude-for-sap --skill program-to-spec
Clone the repo
git clone --depth 1 https://github.com/babamba2/superclaude-for-sap

Made for: Claude Code.

Or install sc4sap, the plugin that ships this one along with the rest of its 23 skills, 27 agents, 8 hooks, 1 MCP server.

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 program-to-spec

README.md
[![agentmods](https://agentmods.dev/badge/skills/babamba2/superclaude-for-sap/program-to-spec/github.svg)](https://agentmods.dev/skills/babamba2/superclaude-for-sap/program-to-spec)
Your own site
<a href="https://agentmods.dev/skills/babamba2/superclaude-for-sap/program-to-spec"><img src="https://agentmods.dev/badge/skills/babamba2/superclaude-for-sap/program-to-spec/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 program-to-spec

Your own site · 80×15
<a href="https://agentmods.dev/skills/babamba2/superclaude-for-sap/program-to-spec"><img src="https://agentmods.dev/badge/skills/babamba2/superclaude-for-sap/program-to-spec.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,369 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 5
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
How audits are shown
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.00047 $0.04369
Opus 5.5 $0.00019 $0.01748
Sonnet 5.5 $0.00009 $0.00874
Haiku 4.5 $0.00005 $0.00437

Measured 7d ago against content hash 0ec3bd1add51, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

program-to-spec 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 7d 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/program-to-spec/SKILL.md · 193 lines

How it starts

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

SC4SAP Program → Specification

Reads an existing ABAP program (Report / Module Pool / FM Group / Class / CDS / RAP) via MCP, runs structural + semantic + where-used analysis, then produces a Specification artifact in any combination of Markdown (.md), HTML (.html, one self-contained file) and Excel (.xlsx). Scope is negotiated Socratically — start wide, narrow on each turn, stop when the user's target granularity is confirmed.

<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 4.7|Sonnet 4.6|Haiku 4.5> 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>No teamMode integration. program-to-spec targets a single object (one program / class / FM group / CDS / RAP BO) and performs read-only structural extraction — no cross-module synthesis, no authoring conflict, no incident triage. See ../../docs/team-consultation-architecture.md § 6 gating logic. Future extension: if a target's GetWhereUsed graph spans ≥ 2 modules AND user picks L4 depth, Type A (module consultants annotating cross-module concerns in Step 3) could be added — not in current scope.</Team_Mode>

<Use_When>

  • User says "program to spec", "reverse engineer", "make a spec", "document this program", "functional specification", "technical specification", "generate a specification"
  • Knowledge transfer / handover of legacy ABAP to another team
  • Preparing a refactoring or rewrite (need to capture as-is behavior)
  • Compliance / audit requires a written spec for custom code
  • Building a WRICEF inventory with detailed per-object specs </Use_When>

<Do_Not_Use_When>

  • User wants a code quality review → /sc4sap:analyze-code
  • User wants to create a new program from a spec → /sc4sap:create-program
  • User wants to fix the program → direct MCP Update* calls or re-run /sc4sap:create-program
  • Object does not exist yet </Do_Not_Use_When>

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

Invoke /sc4sap:trust-session with parent_skill=sc4sap:program-to-spec to pre-grant MCP tool + file-op permissions (eliminates per-tool prompts during structural reads + screen rendering pipeline).

  • 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>

<Socratic_Scope_Narrowing> The interview is a funnel: every turn reduces the remaining decision space. Score remaining ambiguity 0–10 after each answer; stop when ≤3.

Read the full file on GitHub · 193 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 7d ago Changed · +1 lines 0ec3bd1add51
  2. 21d ago Changed · +5 lines 63ba86cbe262
  3. 1mo ago Changed · +3 lines fc237cd4fb79
  4. 1mo ago Changed · -4 tokens per session 5fa20a98b413
  5. 1mo ago Changed af4a01013270
  6. 1mo ago Changed · +2 lines · +7 tokens per session 729067a4619c
  7. 2mo ago First seen · 182 lines · 44 tokens per session scan A 2fc1f978795a

Subscribe to this mod's changes

program-to-spec is a skill published in the GitHub repository babamba2/superclaude-for-sap (70 stars, last pushed yesterday), licensed MIT. It adds 47 tokens to every session and 4,369 once invoked, about $0.0002 per session on Opus 5.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

fwmsexcelxlsx-generator

Gera customizações AdvPL/TLPP (sempre User Function) que exportam dados do Protheus para planilha Excel .xlsx usando a classe de framework FwMsExcelXlsx, padrão recomendado pela TOTVS — abas, tabelas, colunas com alinhamento, formato, máscara e totalizador, fonte da planilha, gravação direta em arquivo ou no banco…

totvs/engpro-advpl-tlpp-skills · 216 tokens

npoi

Use when reading/writing Excel (.xls/.xlsx) or Word (.doc/.docx) in .NET without Microsoft Office — XSSFWorkbook/HSSFWorkbook/SXSSFWorkbook, WorkbookFactory.Create, ICellStyle reuse, IFormulaEvaluator. Also for dates rendering as numbers, OutOfMemoryException on large files, and 64000 cell-style limits. NPOI: .NET…

znlgis/opengis-skills · 85 tokens

devexpress-office-file-api-excel-export

Build .NET applications with the DevExpress Excel Export Library for streaming generation of Excel files with low memory footprint. Use when generating large Excel reports, writing rows sequentially, building Excel files from data grids or report engines, or when the full Spreadsheet Document API would use too much…

DevExpress/agent-skills · 131 tokens

excel-openpyxl-formulas

Editing Excel files with openpyxl to insert formulas while preserving all existing formatting, styles, colors, and structure.

cxcscmu/SkillLearnBench · 30 tokens

easyexcel-write

A Java skill for writing Excel files with Alibaba EasyExcel version 4.0.3.

full-stack-skills/java-skills · 254 tokens

showcase-notes

Analyze, repair and verify the bundled Python CSV sales-report project.

ljxpython/ai-agent-platform · 18 tokens