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.
npx agentmods add skills/arc-mcp/arc-1/debug-slow-sqlnpx skills add arc-mcp/arc-1 --skill debug-slow-sqlgit clone --depth 1 https://github.com/arc-mcp/arc-1What 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00132 | $0.04845 |
| Opus 5 | $0.00066 | $0.02423 |
| Sonnet 5 | $0.00026 | $0.00969 |
| Haiku 4.5 | $0.00013 | $0.00485 |
Grade A, and why
debug-slow-sql 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 229 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Debug Slow SQL / OData
Find the root cause of a slow ABAP SQL or Fiori-Elements OData request and propose a fix — driving ARC-1's diagnostics first (GUI-free), then escalating to SAP GUI / Fiori apps only when the deeper signal needs them. The goal is not "it's slow" but why: which statement, what it scans, and what to change.
Use this when the user reports a slow report/transaction, a slow OData/Fiori list, a long-running CDS view, a timeout/dump under load, or "this query got slow after …".
Inputs (ask only for what's missing)
- What is slow — one of: an OData URL (copy from the browser Network tab), a CDS view / DDLS name, an ABAP program / class / report, a transaction code, or a table + access pattern.
- How slow / how often — a single slow call vs. slow-under-load vs. intermittent. (Routes you to per-request vs. aggregate analysis.)
- Reproducible? — can the user re-trigger it on demand (needed to arm a live trace)? On which system (DEV/QA/PROD) and as which SAP user?
- Recent change? — new code, new data volume, a transport, an index drop. Narrows the search fast.
If you only have a vague "X is slow", get the OData URL or the object name first — everything below keys off it.
The diagnostic ladder — stop at the rung that explains it
Work top-down. Each rung is cheaper than the next and usually tells you whether to descend.
Reachability — don't promise a plan you can't reach. Rungs 3–4 (profiler, ST05) need
SAP_ALLOW_WRITESto arm andS_ADT_RES(ACTVT 01 and 02) to read — and don't exist on NW 7.50. If arming returns writes disabled or a403, say so and stop at rung 2:odata_perf+cds_sql+SAPQueryalready pin a DB-bound root cause GUI-free. Tier-3–4 (the exact statement + execution plan) then depends on Basis/config, so hand the user the precise ST05/SAT steps below instead of pretending you reached the plan.
0. Orient (no execution)
SAPContext(action="deps", type="<type>", name=…)/SAPRead(type="DDLS", name=…)— read the CDS/ABAP source. Eyeball it for the usual suspects before measuring:LIKE '%term%'(leading wildcard = no index),SELECT … FROMwith noWHEREon a key,SELECT *, nestedSELECTin aLOOP(N+1), client-side filtering, missingFOR ALL ENTRIESpre-check, calculated fields forcing a full scan.SAPContext(action="impact", type="DDLS", name=…)— the CDS stack (projection → base views → tables). The slow view is often a thin projection over a heavy base.- Find the generator, not just the literal SQL. A slow
LIKE '%…%'/scan is often generated — by a search help, SADL/RAP, or a framework — not hand-written, so agrep/where-used for the literalSELECTcomes up empty. Trace the generator instead: for a value-help / type-ahead screen, the search help (DD30L.SELMETHOD+FUZZY_SEARCH,DD32Sfields) and its DSH/SADL classes (CL_DSH_*, the F4→WHERE conversion) viaSAPSearch/SAPNavigate/SAPRead. For an OData service, find its implementation: a V4/RAP binding →SAPRead(type="SRVB", name=…)→ the service definition → the CDS view (then usecds_sql, rung 2). The binding (SRVB) name often differs from the URL's service path — ifSRVB404s,SAPSearchthe service name to find the actual binding, or read the service definition (SRVD) directly for itsexpose … asentities. A classic SEGW / Gateway V2 service has no CDS → find the DPC class (SAPSearch "<SERVICE>_DPC*", read its*_get_entityset/*_get_entity/ expand /resolve_navigation_pathmethods) and skip rung 2. (Don't confuse SE91/WBMESSAGES, which loads one message class in memory and searches withCS, with a search-help path that issues a real DBLIKE.)
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.
- 2d ago First seen · 229 lines · 132 tokens per session scan A 12cffc50af87
debug-slow-sql is a skill published in the GitHub repository arc-mcp/arc-1 (174 stars, last pushed 2d ago), licensed MIT. It adds 132 tokens to every session and 4,845 once invoked, about $0.0007 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.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
auto-perf-optimize
Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.
chat-perf
Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…