code-generation

code-generation is a skill for Claude Code, Codex from vigneshbarani24/sap-superpowers. It costs 48 tokens per session (3,266 once invoked), scanned A, original, MIT.

A code-generation guide for ABAP, CDS, RAP, Fiori Elements, and BTP CAP, which are SAP technologies for business applications and interfaces.

In plain words
What is it for?
Use it when creating SAP application code, data models, user interfaces, or cloud services.
Why use it?
It helps keep generated code suitable for cloud systems, compatible with SAP's clean-core approach, tested, documented, and able to handle errors.

Skill for Claude CodeCodex

Part of the sap-superpowers plugin — 22 skills, 8 commands, 25 agents, 5 hooks shipped together

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.

agentmods
npx agentmods add skills/vigneshbarani24/sap-superpowers/code-generation
Any agent
npx skills add vigneshbarani24/sap-superpowers --skill code-generation
Clone the repo
git clone --depth 1 https://github.com/vigneshbarani24/sap-superpowers

Made for: Claude Code, Codex.

Or install sap-superpowers, the plugin that ships this one along with the rest of its 22 skills, 8 commands, 25 agents, 5 hooks.

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 code-generation

README.md
[![agentmods](https://agentmods.dev/badge/skills/vigneshbarani24/sap-superpowers/code-generation.svg)](https://agentmods.dev/skills/vigneshbarani24/sap-superpowers/code-generation)
Your own site
<a href="https://agentmods.dev/skills/vigneshbarani24/sap-superpowers/code-generation"><img src="https://agentmods.dev/badge/skills/vigneshbarani24/sap-superpowers/code-generation.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,266 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00048 $0.03266
Opus 5 $0.00024 $0.01633
Sonnet 5 $0.00010 $0.00653
Haiku 4.5 $0.00005 $0.00327

Measured 3d ago against content hash 31ed0a5492a1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-generation 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 3d 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/development/code-generation/SKILL.md · 198 lines

How it starts

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

SAP Code Generation

This skill enforces clean, cloud-ready, fully tested SAP code generation. It makes generating non-compliant, untested, or undocumented code structurally impossible.

Iron Laws

  1. ALWAYS USE ABAP CLOUD RESTRICTED SYNTAX FOR CLOUD DEPLOYMENTS. Code targeting ABAP Cloud (BTP ABAP Environment, S/4HANA Public Cloud, or any tier marked Cloud-ready) must use only the ABAP Cloud restricted language subset. No classic ABAP statements incompatible with the cloud runtime. Verify via ATC with ABAP Cloud check variant before delivery.
  2. NEVER ACCESS DATABASE TABLES DIRECTLY — USE RELEASED APIS. Custom code must never SELECT directly from SAP-delivered application tables (BKPF, BSEG, VBAK, EKKO, MARA, and equivalent). Access data through released CDS entities, released function modules, or released OData/RAP APIs. Direct table access creates upgrade risk and clean core violations.
  3. ALWAYS INCLUDE ERROR HANDLING. Every CALL METHOD, CALL FUNCTION, database operation, and external call must have explicit error handling — checked exceptions, SY-SUBRC evaluation, or TRY/CATCH blocks. Silent failures are defects delivered as features.
  4. ALWAYS GENERATE UNIT TESTS. Every class and every method generated must have a corresponding ABAP Unit test class (LOCAL FRIENDS if needed for private method access). Untested code is unverified code — it may work or it may not, and you cannot tell which.
  5. FOLLOW Z/Y NAMING CONVENTIONS. All generated objects use Z or Y prefix (or registered customer namespace). Generated classes: ZCL_, interfaces: ZIF_, CDS views: Z_, RAP business objects: ZI_ (interface) / ZC_ (consumption) / ZA_ (abstract) / ZR_ (restricted). No SAP namespace pollution.

Rationalization Table

Agent Will Try To... Why It Seems Reasonable Why It Fails Counter
SELECT directly from BSEG or VBAK "It's the most direct way to get the data" Direct access bypasses the virtual data model, breaks on HANA column store optimizations, and creates a hard dependency on physical table structure that changes across releases. Iron Law 2. Identify the released CDS entity or API. For FI data: I_JournalEntryItem. For SD: I_SalesOrder. Use transaction TAANA or SAP API Business Hub to find the correct released API.
Skip unit tests because "the logic is simple" "It's just a getter method, testing is overkill" Simple methods break in edge cases that were never considered: null inputs, empty collections, authorization failures, character encoding edge cases. "Simple" code without tests is untested code. Iron Law 4. Generate the test class. Simple methods have simple tests — this takes five minutes. No method is generated without a test.
Use classic ABAP for "backward compatibility" "This might run on older systems, classic is safer" If the target system is ABAP Cloud, classic syntax will fail ATC Cloud checks. If the target is on-premise, confirm this explicitly — then apply the correct standard for that target, not a hybrid. Iron Law 1. Establish target platform first. Generate for that platform's standard. Never generate ambiguous cross-platform code.
Skip error handling because "this call always succeeds" "This FM never returns errors in practice" Function modules return errors when network is slow, authorization is missing, data is unexpected, or the FM itself is changed. "Always succeeds" is an observation from testing, not a guarantee. Iron Law 3. Every call has error handling. Even if the error path is RAISE EXCEPTION TYPE cx_sy_no_handler — the decision to not handle is explicit, not an omission.
Use non-standard naming for clarity "ZCL_INVOICE is cleaner than ZCL_FINANCE_INVOICE_PROCESSOR" Non-standard naming pollutes search, makes transport analysis harder, and breaks naming-based ATC rules. Team conventions exist for everyone, not just the current developer. Iron Law 5. Follow the project naming convention. If no project convention exists, use the SAP standard recommendation. Name for the next developer, not for convenience now.
Generate code without documenting the data model "The code is self-explanatory" Generated code without documented data model assumptions breaks when the model changes. Future developers cannot distinguish intentional design from accidental coupling. Checklist Step 1: Document data model and API dependencies before generating implementation code. The documentation is part of the deliverable.

Read the full file on GitHub · 198 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. 3d ago First seen · 198 lines · 48 tokens per session scan A 31ed0a5492a1

Subscribe to this mod's changes

code-generation is a skill published in the GitHub repository vigneshbarani24/sap-superpowers (7 stars, last pushed 11d ago), licensed MIT. It adds 48 tokens to every session and 3,266 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

btp-diagram-generator

Generate SAP BTP (Business Technology Platform) solution architecture diagrams as native draw.io (.drawio) files following the official SAP BTP Solution Diagram guidelines (Fiori Horizon design system) and open them via a configured draw.io MCP server. USE WHEN: user asks to create/draw/design/sketch a BTP diagram…

likweitan/abap-skills · 178 tokens

ui-theme-designer-help

Provides customer-facing UI theme designer help from help.sap.com (BTP / Cloud Foundry edition). Use whenever you need to check what is — or is not — documented for customers about UI theme designer: setup, user/role management, themes and theme sets (creating, editing, publishing, transporting, fallback)…

SAP/ui-theme-designer-plugins-for-coding-agents · 217 tokens

ui-theme-designer-design-tokens

TRIGGER: questions about the SAP Design System and SAP Fiori design tokens — which themes exist, what value a theme parameter (e.g. sapButtonBackground, sapHighlightColor) has in a given theme, how parameters inherit/extend across the theme chain, which parameters a specific UI component (UI5 control, UI5 Web…

SAP/ui-theme-designer-plugins-for-coding-agents · 112 tokens

ui-design-executor

Use this as UIDesigner's default execution skill. It contains the baseline design, accessibility, HTML, runtime-safety, responsive, taste, and verification rules needed by ordinary UI work. Do not load the separate system, control, taste, color, renderer, or craft skills merely to repeat these baseline rules.

Orkas-AI/Orkas · 4 tokens

ui-design-source

Use this skill when the user provides Figma material, design-export files, screenshots of design tools, PDFs, JSON, existing HTML, or asks for design-to-HTML/code fidelity. It adapts OpenDesign/Figma handoff discipline for UIDesigner without requiring a live Figma runtime.

Orkas-AI/Orkas · 3 tokens

excalidraw

Generate an Excalidraw whiteboard in Sean's hand-drawn video style (Excalifont, roughness 1, green signature, socials + watermark, source labels). Use whenever the user wants a whiteboard, diagram, teaching board, or "chart" for a video or the docs/whiteboards gallery — anything Sean will film with.

ShenSeanChen/waku-agent · 77 tokens