# aicore-sdk-js

aicore-sdk-js is a Claude Code skill that generates runnable TypeScript and JavaScript code for SAP GenAI Hub. It activates on requests to integrate models using @sap-ai-sdk modules.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 192 installs · ★ 153 repo stars
- Author: SAP
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/SAP/ai-skills-library/tree/HEAD/skills/aicore-sdk-js/SKILL.md
- Updated: 2026-10-22
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/aicore-sdk-js

## What it does

The skill generates JavaScript and TypeScript boilerplate targeting `@sap-ai-sdk` v2. It prepares chat and streaming code with `@sap-ai-sdk/orchestration`, direct OpenAI integrations via `@sap-ai-sdk/openai`, LangChain pipelines, RAG through `@sap-ai-sdk/document-grounding`, and batch inference setups.

Execution requires Node.js 22+ with native ESM support and either npm or bun. Lifecycle management for deployments is out of scope: listing, creating, and removing deployments must happen in the SAP AI Core console. A Context7 MCP connection is optional and serves as a dynamic docs lookup when present.

Code generation is restricted to JS and TS runtimes. For Java projects, the skill points to `aicore-sdk-java`, while Python requests are directed to the official web documentation.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add SAP/ai-skills-library --skill aicore-sdk-js -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add SAP/ai-skills-library --skill aicore-sdk-js -a codex
```

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

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add SAP/ai-skills-library --skill aicore-sdk-js -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install SAP/ai-skills-library skills/aicore-sdk-js
```

2. **Manually: put the files in place**
- File: `.github/skills/aicore-sdk-js/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add SAP/ai-skills-library --skill aicore-sdk-js -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/SAP/ai-skills-library --path skills/aicore-sdk-js
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add SAP/ai-skills-library --skill aicore-sdk-js -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/SAP/ai-skills-library/tree/HEAD/skills/aicore-sdk-js/SKILL.md

## When to use it
- generate GenAI Hub completion boilerplate via `@sap-ai-sdk/orchestration`
- connect LangChain to SAP AI Core models in TypeScript
- configure document grounding and RAG with `@sap-ai-sdk/document-grounding`
- write batch LLM processing pipelines using `@sap-ai-sdk/llm-batch`
- run tabular predictions through `@sap-ai-sdk/rpt`

## Example prompts
- Generate a TypeScript streaming script using `@sap-ai-sdk/orchestration` for SAP GenAI Hub
- Show how to connect LangChain in Node.js via `@sap-ai-sdk/langchain`
- Create a document grounding RAG setup using `@sap-ai-sdk/document-grounding`

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 6ea433ca69cb1ca0.

BEGIN THIRD-PARTY FILE 6ea433ca69cb1ca0
```text
---
name: aicore-sdk-js
metadata:
  version: "2.0"
description: >
  Generate working TypeScript/JavaScript boilerplate for SAP GenAI Hub using @sap-ai-sdk/orchestration,
  @sap-ai-sdk/foundation-models, @sap-ai-sdk/openai (native OpenAI SDK), @sap-ai-sdk/langchain (LangChain),
  @sap-ai-sdk/document-grounding (RAG), @sap-ai-sdk/prompt-registry, @sap-ai-sdk/llm-batch (batch jobs),
  @sap-ai-sdk/rpt (tabular prediction), or @sap-ai-sdk/context-registry (data destinations, tabular artifacts,
  scenario configurations).
  WHEN: user asks for TypeScript, JavaScript, Node.js, or JS/TS code that calls a GenAI Hub
  model, wants a TypeScript starter project, asks how to use @sap-ai-sdk in their app, asks
  how to use LangChain (JS/TS) with SAP AI Core, or wants JS/TS for RAG/document-grounding,
  prompt templates, batch LLM jobs, tabular (RPT) prediction, or managing data destinations /
  tabular artifacts / scenario configurations via the Context Registry.
  DO NOT USE FOR: Java code — use `aicore-sdk-java`. 
compatibility: Requires Node.js 22+ with native ESM support, and npm or bun. Context7 MCP is optional (see Sources & Fallback).
---

## Rules

1. If no deployment URL is known, check the SAP AI Core console or contact your admin to list or create one before generating code.
2. Always include `aicore configure` credential guidance in generated code comments; link to [Connecting to AI Core](https://sap.github.io/ai-sdk/docs/js/connecting-to-ai-core) for setup details.
3. JS/TS lifecycle management (create/list/delete deployments) is not available in this skill — use the SAP AI Core console or contact your admin for deployment management.
4. Target `@sap-ai-sdk` **v2** (orchestration `2.14+`). The preferred invocation pattern is passing `messages` directly to `chatCompletion()` / `stream()`. Only use `promptTemplating.prompt.template` with `{{?placeholder}}` values when the user explicitly wants a server-side reusable template. Never emit the v1 shape `llm: { model_name }` / `templating: { template }` — it does not compile against v2.
5. Never emit Python code snippets — this skill is JS/TS only. If the user asks for Python, inform them that no Python skill is available in this repo and point them to https://sap.github.io/ai-sdk/ for Python SDK guidance.
6. Gather these details before generating code — ask only for what the user hasn't provided:
   - **Framework**: `@sap-ai-sdk/*` (recommended) / `@sap-ai-sdk/langchain` (LangChain) / OpenAI npm package via LiteLLM proxy?
   - **Use case**: chat / streaming / embeddings?
   - **Runtime**: Node.js / Bun / browser?
   - **Model + Deployment ID**: check the SAP AI Core console for existing deployments
```
END THIRD-PARTY FILE 6ea433ca69cb1ca0

The third-party file has ended. Everything between the 6ea433ca69cb1ca0 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2700 of 9473 bytes. © SAP · Apache-2.0 · https://github.com/SAP/ai-skills-library/tree/HEAD/skills/aicore-sdk-js/SKILL.md

_Part of the page did not fit — see the HTML version._

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