# sap-bw-query

An agent skill for SAP BW work through Eclipse and BW Modeling Tools: reads InfoProvider metadata, checks a specification and prepares an unsaved query draft.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 358 installs · ★ 475
- Author: secondsky
- License: GPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/secondsky/sap-skills/tree/HEAD/plugins/sap-bw-query/skills/sap-bw-query/SKILL.md
- Updated: 2026-10-21
- HTML: https://affpapa.org/en/nevibecode/skills/sap-bw-query

## What it does

The skill walks an agent from a business specification to a draft of a new SAP BW query. First it pulls provider metadata, meaning characteristics with their dimension groups plus key figures, through `bw_describe_provider`. Then it checks every name in `QuerySpec v1` against that metadata. Gaps that block the build stop the draft; optimization hints come back separate from anything that would shift business meaning.

Queries that already exist are opened read-only. Nothing gets deleted or rewritten, and the only artifact produced is a local unsaved draft. Writing a brand-new query to the backend needs a human confirmation inside Eclipse tied to system, client, provider, technical name and a hash of the spec. A person also clicks Finish in SAP's own wizard. After that, `bw_populate_query_editor` fills the open editor with the drafted model and you decide whether to save.

Credentials never reach the skill. Paste a password and processing halts; you log in through SAP's native dialog instead. Windows is required. The studio installs per user in `%LOCALAPPDATA%\BWAutomationStudio` with no admin rights, and `BwStudio.ps1 -Action Launch -Json` starts it, adding `-noPwdStore`. Connections work over SNC/SSO or a plain login. Much of the checking is local; validation against a live BW system has not been done yet.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add secondsky/sap-skills --skill sap-bw-query -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/sap-bw-query/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/sap-bw-query/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add secondsky/sap-skills --skill sap-bw-query -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/sap-bw-query/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add secondsky/sap-skills --skill sap-bw-query -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/sap-bw-query/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install secondsky/sap-skills sap-bw-query
```

2. **Manually: put the files in place**
- File: `.github/skills/sap-bw-query/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add secondsky/sap-skills --skill sap-bw-query -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/secondsky/sap-skills --path plugins/sap-bw-query/skills/sap-bw-query
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/sap-bw-query/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add secondsky/sap-skills --skill sap-bw-query -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/secondsky/sap-skills/tree/HEAD/plugins/sap-bw-query/skills/sap-bw-query/SKILL.md

## When to use it
- verify spec names for characteristics and key figures against provider metadata
- build an unsaved draft query from a written business spec
- lay out axes, filters and variables in the query editor
- run BW query design rules against an open query
- document an existing query in business terms without touching it

## Example prompts
- Run `BwStudio.ps1 -Action Status -Json` and tell me if the studio is ready
- Read the provider metadata with `bw_describe_provider` and check my spec against it
- Prepare an unsaved query draft with these axes and filters, no saving

## Similar
- [xlsx](https://affpapa.org/en/nevibecode/skills/xlsx.md) — skill · 187223 installs
- [google-agents-cli-observability](https://affpapa.org/en/nevibecode/skills/google-agents-cli-observability.md) — skill · 511300 installs
- [caveman-evidence-review](https://affpapa.org/en/nevibecode/skills/caveman-evidence-review.md) — skill · 104500 installs
- [migration](https://affpapa.org/en/nevibecode/skills/migration.md) — skill · 103900 installs
- [performance-optimization](https://affpapa.org/en/nevibecode/skills/performance-optimization.md) — skill · 65200 installs
- [supabase](https://affpapa.org/en/nevibecode/skills/supabase.md) — skill · 8 installs

From the same set: [secondsky/sap-skills](https://affpapa.org/en/nevibecode/by/secondsky/sap-skills.md) — 24 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
