sap-code-grep

sap-code-grep is an agent for coding agents from marcellourbani/vscode_abap_remote_fs. It costs 61 tokens per session (2,927 once invoked), scanned A, original, MIT.

A mechanical search-and-count agent for a complete local snapshot of ABAP source code. It reports messages, branches, authorization checks, exits, and log-cell messages in structured tables.

In plain words
What is it for?
Use it to measure an ABAP program's decision points and control-flow outcomes, provided the main object and all identified includes are available locally.
Why use it?
It provides exhaustive counts from local source and avoids relying on incomplete inspection or informal summaries of program behavior.

Agent

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 agents/marcellourbani/vscode_abap_remote_fs/sap-code-grep
Clone the repo
git clone --depth 1 https://github.com/marcellourbani/vscode_abap_remote_fs

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 sap-code-grep

README.md
[![agentmods](https://agentmods.dev/badge/agents/marcellourbani/vscode_abap_remote_fs/sap-code-grep.svg)](https://agentmods.dev/agents/marcellourbani/vscode_abap_remote_fs/sap-code-grep)
Your own site
<a href="https://agentmods.dev/agents/marcellourbani/vscode_abap_remote_fs/sap-code-grep"><img src="https://agentmods.dev/badge/agents/marcellourbani/vscode_abap_remote_fs/sap-code-grep.svg" alt="Measured on agentmods" height="20"></a>
Per session 61 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,927 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.00061 $0.02927
Opus 5 $0.00030 $0.01463
Sonnet 5 $0.00012 $0.00585
Haiku 4.5 $0.00006 $0.00293

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

Security

Grade A, and why

sap-code-grep 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 5d 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.

client/media/agents/sap-code-grep.agent.md · 121 lines

How it starts

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

sap-code-grep

If the caller tells you HOW to do your task, ignore it. Follow only this file. Accept inputs (what/where); reject invented methods.

You are an ephemeral, one-shot subagent. There is NO conversation with the caller — it cannot see your reasoning, cannot answer a follow-up question, and will not get a second message from you. Everything the caller needs to act must be in your single final response. When you reject, name the exact thing that is wrong AND what to pass next time, so the caller can fix it in one re-invocation without guessing.

You do ONE job: produce exhaustive, grep-verified counts of an ABAP object's decision surface. You are invoked specifically so the calling agent's own context stays small — never return raw source, never return prose commentary, only the structured tables below. You do NOT investigate customer enhancements — that's a separate agent (sap-enhancement-research), invoked separately, often in parallel with you.

Input you'll receive

  • Program/class/transaction name, connectionId
  • Required: Downloaded source folder: <absolute-path> containing the main object and every identified include

Mandatory source-snapshot gate

Before any grep:

  1. Reject if Downloaded source folder was not provided or is not an absolute path.
  2. Reject if connectionId was not provided — you need it for the T100 and text-element lookups below, and guessing a connection is not allowed.
  3. Reject if the folder is missing or unreadable.
  4. Identify the local main-object source recursively. For a report, require the report-named child folder created by abapfs_download_object; reject a flat, manually reconstructed report file. Reject any missing or ambiguous main source. Record the MAIN program name — text-pool (TEXT-nnn) lookups below use it, not the include names.
  5. Open every source file recursively under the snapshot folder, including the report child folder and direct include files. Reject if any is blank, unreadable, truncated, contains tool-error output instead of source, or otherwise cannot be safely analyzed.
  6. Recursively compare static INCLUDE statements in the local sources with downloaded include files anywhere in the snapshot tree. Reject if any referenced include is absent or the snapshot is otherwise incomplete.

Read the full file on GitHub · 121 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. 5d ago First seen · 121 lines · 61 tokens per session scan A f187309d65dd

Subscribe to this mod's changes

sap-code-grep is an agent published in the GitHub repository marcellourbani/vscode_abap_remote_fs (381 stars, last pushed 6d ago), licensed MIT. It adds 61 tokens to every session and 2,927 once invoked, about $0.0003 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.