agentleFS
vigneshbarani24vigneshbarani24/sap-superpowers/skills/development/code-review/SKILL.md

code-review

Skill9 starsChanged 7 months agoMITView on GitHub

Use when reviewing ABAP code, SAP development artifacts, CDS views, or any custom SAP code before transport release, pull request approval, or go-live sign-off.

188 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use starter, media-processing and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ww-w-aiSkill

    starter

    Static web development guide for beginners. Covers HTML/CSS/JavaScript and Next.js App Router basics. Project initialization with "init starter". Triggers: static website, portfolio, landing page, HTML CSS, beginner, 정적 웹, 포트폴리오, 초보자, 静的サイト, 初心者, 静态网站, 初学者, sitio web estático, site statique, statische Website, sito web statico Do NOT use for: fullstack apps (use $dynamic), enterprise (use $enterprise).

    Also in 4 projects that use this

  • mrgoonieSkill

    media-processing

    Process multimedia files with FFmpeg (video/audio encoding, conversion, streaming, filtering, hardware acceleration) and ImageMagick (image manipulation, format conversion, batch processing, effects, composition). Use when converting media formats, encoding videos with specific codecs (H.264, H.265, VP9), resizing/cropping images, extracting audio from video, applying filters and effects, optimizing file sizes, creating streaming manifests (HLS/DASH), generating thumbnails, batch processing images, creating composite images, or implementing media processing pipelines. Supports 100+ formats, hardware acceleration (NVENC, QSV), and complex filtergraphs.

    Also in 5 projects that use this

  • loulanyueSkill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 15 projects that use this

  • mrgoonieSkill

    aesthetic

    Create aesthetically beautiful interfaces following proven design principles. Use when building UI/UX, analyzing designs from inspiration sites, generating design images with ai-multimodal, implementing visual hierarchy and color theory, adding micro-interactions, or creating design documentation. Includes workflows for capturing and analyzing inspiration screenshots with chrome-devtools and ai-multimodal, iterative design image generation until aesthetic standards are met, and comprehensive design system guidance covering BEAUTIFUL (aesthetic principles), RIGHT (functionality/accessibility), SATISFYING (micro-interactions), and PEAK (storytelling) stages. Integrates with chrome-devtools, ai-multimodal, media-processing, ui-styling, and web-frameworks skills.

    Also in 4 projects that use this

  • AWSSkill

    ask-matt

    Ask which skill or flow fits your situation. A router over the skills in this repo.

    Also in 32 projects that use this

  • AWSSkill

    resolving-merge-conflicts

    Use when you need to resolve an in-progress git merge/rebase conflict.

    Also in 48 projects that use this

  • +1 more from mrgoonie
  • +2 more from aws

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 175 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    NEVER APPROVE MODIFICATIONS TO SAP STANDARD: No direct modification to SAP-delivered objects.

    line 14
  2. Very specific:

    After completing this skill, invoke: development-workflow Conditions for handoff: After review approval, return to development-workflow …

    line 119
  3. Very specific:

    Use development-workflow for transport release process after approval

    line 124
  4. Very specific:

    Use troubleshooting if ATC findings indicate runtime errors or dump patterns

    line 125
  5. Very specific:

    Use code-generation to regenerate code sections that failed review rather than manually patching anti-patterns

    line 126
  6. Very specific:

    Use performance-tuning when review identifies performance anti-patterns that need deeper analysis

    line 127

“Common” is measured: kept by at least 6 in 10 of the 175 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

SAP Code Review

This skill enforces zero-tolerance code quality gates — it makes approving dangerous, non-performant, or insecure SAP code structurally impossible.

Iron Laws

  1. NEVER APPROVE SELECT IN LOOPS. A SELECT statement inside a LOOP...ENDLOOP, DO...ENDDO, or WHILE...ENDWHILE is an automatic rejection. No exceptions. Not even for "small tables." One SELECT in a loop that runs against a large dataset is a production system outage.
  2. NEVER APPROVE CODE WITHOUT AUTHORITY CHECKS. Any code that reads, writes, or executes against business data must have explicit AUTHORITY-CHECK statements. "The calling program already checks authority" is not acceptable — each component enforces its own authorization.
  3. NEVER APPROVE MODIFICATIONS TO SAP STANDARD. No direct modification to SAP-delivered objects. Enhancements must use released BAdIs, User Exits, Enhancement Spots, or CDS extensions. SAP standard modifications are overwritten at every support package upgrade.
  4. NEVER APPROVE WITHOUT ATC CLEAN. Code that has not been run through ABAP Test Cockpit (ATC) with no open Priority 1 or Priority 2 findings cannot be approved. ATC findings are not suggestions — they are known defects.
  5. NEVER APPROVE CODE THAT ACCESSES DEPRECATED OR LOCKED TABLES DIRECTLY. In S/4HANA, tables like BSEG, VBAP, MARA have compatibility views or released CDS entities. Direct table access that bypasses the virtual data model creates upgrade incompatibilities.

Rationalization Table

Agent Will Try To...Why It Seems ReasonableWhy It FailsCounter
Approve a SELECT in a loop "because the table is small""There are only 100 records in that table now"Tables grow. A table with 100 records today will have 1,000,000 in two years. The code will still be in production.Iron Law 1. No SELECT in loops, regardless of current table size. Refactor to SELECT...FOR ALL ENTRIES or JOIN.
Skip authority check review because "the Fiori app controls access""The tile and role assignment handle authorization"Direct RFC calls, background jobs, and API access all bypass Fiori tile authorization. Every executable unit must check authority independently.Iron Law 2. Show me the AUTHORITY-CHECK statement. If it doesn't exist, the review fails.
Approve a modification because "it's the only way""There's no BAdI for this, modification is the only option"There is almost always a released API, Enhancement Framework entry, or alternative approach. "Only way" usually means "fastest way I found."Checklist Step 5: Document the three alternatives investigated before modification is considered. Modification requires architect sign-off.
Treat ATC findings as optional"These are just warnings, not real errors"ATC Priority 2 findings include security vulnerabilities, performance anti-patterns, and clean core violations. They are categorized warnings for a reason.Iron Law 4. ATC clean is a gate, not a guideline. P1 and P2 findings must be resolved or formally suppressed with justification.
Approve code using BSEG directly in S/4HANA"BSEG still exists in S/4HANA, it works"BSEG in S/4HANA is a compatibility view. Direct access is inefficient and will break at clean core enforcement. Use I_JournalEntryItem or equivalent released CDS.Iron Law 5. Direct access to compatibility views is a clean core violation. Use released APIs.
Skip performance review for "simple" programs"It's just a small report""Small reports" run in batch. Batch programs process full table sets. A report that takes 5 seconds per record × 1M records = 6 days of runtime.Checklist Step 3: Performance review applies to every program, regardless of perceived complexity.
Approve hardcoded values without constants"The value is obvious from context"Hardcoded values become silent bugs when configuration changes. Magic numbers and strings are the root cause of countless production defects.Checklist Step 4: Constants, not hardcoded literals. Every unexplained literal is a review finding.

Red Flags

Watch for these phrases in your own reasoning — each one signals you're about to approve a violation:

  • "The table is small, so SELECT in a loop is fine..." → Iron Law 1. Tables grow. Reject.
  • "Authorization is handled at the UI layer..." → Iron Law 2. Each component checks authority independently. Show me the AUTHORITY-CHECK.
  • "There's no enhancement option, we have to modify..." → Iron Law 3. Investigate alternatives before accepting this claim. Escalate to architect.
  • "ATC findings are just warnings we can ignore..." → Iron Law 4. P1 and P2 are gates. Resolve or suppress with documented justification.
  • "This code is basically the same as the existing code..." → Similar code with the same defects is still defective. Review independently.
  • "The developer is experienced, it's probably fine..." → Experience does not substitute for review. Every piece of code gets the same review.
  • "We're short on time, a quick look is enough..." → Quick looks miss SELECT in loops. Follow the checklist.
  • "This is just a temporary solution..." → Temporary solutions become permanent. Review as if it will be in production for 10 years, because it will.
<HARD-GATE> Before approving any code: confirm (1) ATC has been run and all P1/P2 findings are resolved or formally suppressed, (2) there are no SELECT statements inside loops, (3) all AUTHORITY-CHECK requirements have been verified, and (4) no SAP standard objects have been modified. If any of these four conditions is not confirmed, the review CANNOT be approved. </HARD-GATE>

Checklist

  1. Structural review — syntax and completeness — Run SLIN and ATC (transaction SE38 → Check → Extended Program Check, or ATC via SATC). Review all findings.
    • Evidence: ATC run results showing zero P1 and P2 open findings. Screenshot or export of SATC results.
    • Gate: No P1 or P2 ATC findings open. P3 findings documented with disposition (fix or accepted risk with justification).
  2. SELECT statement analysis — Scan every SELECT statement in the code. Verify: no SELECT inside LOOP/DO/WHILE, all SELECTs specify only required fields (no SELECT *), WHERE clauses use primary key or indexed fields, large result sets use SELECT...INTO TABLE with PACKAGE SIZE for batch processing.
    • Evidence: List of all SELECT statements with their location (line number), fields selected, and WHERE clause content. Confirm no SELECT inside loops.
    • Gate: All SELECTs use explicit field lists. No SELECT inside any loop construct. Large table reads use appropriate buffering or PACKAGE SIZE.
  3. Performance pattern review — Check for: internal table types (SORTED or HASHED tables used where binary/hash lookup needed, not STANDARD tables with READ TABLE), string operations in loops, CONCATENATE or string operations inside large loops, CALL FUNCTION in loops (should be batch calls or refactored).
    • Evidence: Internal table declarations reviewed. Table type matched to access pattern (SORTED = sorted read/range, HASHED = keyed lookup, STANDARD = sequential only).
    • Gate: Internal table types are appropriate for the access pattern. No obvious O(n²) patterns present.
  4. Clean core compliance check — Verify: no direct access to S/4HANA compatibility tables (BSEG, VBAP, EKKO, MARA where CDS equivalents exist), no use of obsolete statements (WRITE, MOVE-CORRESPONDING on non-compatible structures without explicit mapping), only released APIs used for cross-module access, BTP/Cloud deployable code uses restricted ABAP syntax.
    • Evidence: List of external table/API accesses with confirmation each is on the released API list. Check via transaction TAANA or the SAP API Business Hub.
    • Gate: No access to non-released APIs. No use of statements flagged as non-Cloud-compliant if the code targets ABAP Cloud.
  5. Authorization checks — Identify all objects and operations the code accesses (reads financial data, modifies MM records, executes function modules with sensitive data). Confirm AUTHORITY-CHECK statement present for each object/activity combination. Verify SY-SUBRC is checked immediately after every AUTHORITY-CHECK.
    • Evidence: Map of data objects accessed → AUTHORITY-CHECK statements in code. SY-SUBRC check confirmed for each AUTHORITY-CHECK.
    • Gate: Every sensitive data operation has an AUTHORITY-CHECK. Every AUTHORITY-CHECK has an SY-SUBRC check with appropriate error handling (not just WRITE / MESSAGE — proper exception or user feedback).
  6. SAP standard modification check — Confirm no SAP-delivered objects (programs, function groups, dictionary objects with namespace without Z/Y or customer namespace) have been modified. Enhancement implementations use only released framework (BAdI, Enhancement Spot, CDS extension).
    • Evidence: List of objects changed in the transport. Each object confirmed as customer-namespace (Z/Y/registered) or confirmed as a released enhancement point only.
    • Gate: Zero modifications to SAP standard objects. If any exist, halt — escalate to architect for architecture review before proceeding.
  7. Error handling review — Verify: no CATCH without handling (empty CATCH blocks), no MESSAGE without user guidance, SY-SUBRC checked after every CALL FUNCTION/CALL METHOD that can fail, no COMMIT WORK inside function modules (commit belongs with the caller), database error handling present for all DML operations.
    • Evidence: All CATCH/EXCEPTIONS blocks reviewed for meaningful handling. No silent failures (empty CATCH, unchecked SY-SUBRC on critical calls).
    • Gate: Every error condition has a documented handling path — user message, log entry, exception raise, or explicit documented decision to ignore (with justification comment in code).
  8. Code readability and maintainability — Check: method/function length (methods over 100 lines need justification or refactoring), naming follows project conventions, no commented-out code blocks in final version, no hardcoded values that belong in customizing or constants, inline documentation present for complex logic.
    • Evidence: Method/function line count confirmed. No magic numbers or strings. No dead code blocks. Complex algorithms have comments explaining the "why" not just the "what."
    • Gate: No method over 100 lines without documented justification. No hardcoded values. No commented-out code.

Review Finding Template

CODE REVIEW FINDING
===================
Transport: [Transport number]
Object: [Program/class/function group name]
Finding ID: [Sequential number]
Severity: BLOCKER | MAJOR | MINOR
Category: Performance | Security | Clean Core | Standards | Error Handling

Location: Line [XX] in [method/form name]
Finding: [What the problem is — specific, not generic]
Evidence: [Code snippet or description showing the exact issue]
Required Action: [What must change before approval]
Approved: YES / NO
Approver: [Name]
Date: [Date]

Verification

This skill is complete ONLY when ALL of the following are true:

  • ATC run completed — zero P1 and P2 open findings (or all formally suppressed with justification)
  • No SELECT statements inside any loop construct confirmed
  • All sensitive data access has AUTHORITY-CHECK with SY-SUBRC check
  • No modifications to SAP standard objects
  • Clean core compliance confirmed — only released APIs accessed
  • Error handling review complete — no silent failures
  • All BLOCKER and MAJOR findings resolved before approval
  • Review finding log completed with disposition for every finding
  • Formal approval recorded with approver name and date

Evidence required: ATC results export, review finding log with all findings and dispositions, signed approval record (physical or digital) with approver name.

Next Skill

After completing this skill, invoke: development-workflow Conditions for handoff: After review approval, return to development-workflow Step 6 (release transport from DEV) with approval evidence attached.

Cross-References

  • Use development-workflow for transport release process after approval
  • Use troubleshooting if ATC findings indicate runtime errors or dump patterns
  • Use code-generation to regenerate code sections that failed review rather than manually patching anti-patterns
  • Use performance-tuning when review identifies performance anti-patterns that need deeper analysis

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.