Generates working Java boilerplate for SAP GenAI Hub using the SAP AI SDK for Java (com.sap.ai.sdk). Covers chat, streaming, embeddings, RAG, content filtering, and Spring Boot integration.
Ships in aicore-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Resolve answers in this priority order:
assets/ directory) — check for a matching template first and serve it
directly. Assets are always available offline and contain runnable, tested code.resolve-library-id: SAP/ai-sdk-java, then get-library-docs.
Context7 returns the most up-to-date API shapes straight from the repo.
Silently fall back to step 3 if Context7 is not installed.references/SDK_JAVA.md — offline reference when Context7 is unavailable.
Use this rather than guessing.Do not fabricate class names, method signatures, or config shapes. If none of the three sources cover the question, say so and point the user to https://sap.github.io/ai-sdk/docs/java/ directly.
OrchestrationAiModel constants (e.g. OrchestrationAiModel.GPT_4O_MINI) — never raw model name strings.OrchestrationClient as the primary client for chat, streaming, embeddings, grounding, and filtering. OpenAiClient (openai artifact) is only for direct OpenAI proxy use cases — do not recommend it for general chat.OrchestrationClient.streamChatCompletion() in a Spring Boot controller: always use ResponseBodyEmitter + ThreadContextExecutors.getExecutor().execute() to forward deltas. Never use SseEmitter, Thread.ofVirtual(), or expose a raw Flux from the controller.ChatModel.stream() (OrchestrationChatModel / OpenAiChatModel): this method is part of the Spring AI ChatModel interface and legitimately returns Flux<ChatResponse>. Composing the Flux directly (e.g. .doOnNext(…).blockLast()) is correct — do not replace it with ResponseBodyEmitter.| Use case | Template | Dependency |
|---|---|---|
Chat via OrchestrationClient | assets/ChatOrchestration.java | com.sap.ai.sdk:orchestration |
Streaming via OrchestrationClient | assets/StreamingOrchestration.java | com.sap.ai.sdk:orchestration |
| Multi-turn conversation | assets/MultiTurnOrchestration.java | com.sap.ai.sdk:orchestration |
| Text embeddings | assets/EmbeddingsOrchestration.java | com.sap.ai.sdk:orchestration |
| RAG / vector store grounding | assets/GroundingOrchestration.java | com.sap.ai.sdk:orchestration |
| Prompt Registry templates | assets/PromptRegistryOrchestration.java | com.sap.ai.sdk:orchestration |
| Spring AI + Orchestration | assets/SpringAiOrchestration.java | com.sap.ai.sdk:orchestration |
| Spring AI + OpenAI client | assets/SpringAiOpenAi.java | com.sap.ai.sdk:openai |
| LLM batch processing | assets/BatchOrchestration.java | com.sap.ai.sdk:batch + openai + core |
| Native OpenAI Responses API | assets/OpenAiNative.java | com.sap.ai.sdk:openai |
| RPT table completion (SAP RPT model) | assets/RptOrchestration.java | com.sap.ai.sdk:sap-rpt |
| Content filtering (Azure + LlamaGuard) | assets/FilteringOrchestration.java | com.sap.ai.sdk:orchestration |
| Data masking (DPI anonymization) | assets/MaskingOrchestration.java | com.sap.ai.sdk:orchestration |
<!-- Maven — orchestration only (default resource group) -->
<dependency>
<groupId>com.sap.ai.sdk</groupId>
<artifactId>orchestration</artifactId>
<version>1.22.0</version>
</dependency>
<!-- Add core if using AiCoreService (custom resource groups) -->
<dependency>
<groupId>com.sap.ai.sdk</groupId>
<artifactId>core</artifactId>
<version>1.22.0</version>
</dependency>
// Gradle
implementation 'com.sap.ai.sdk:orchestration:1.22.0'
// Add core if using AiCoreService (custom resource groups):
implementation 'com.sap.ai.sdk:core:1.22.0'
Check Maven Central for the latest version.
import com.sap.ai.sdk.orchestration.OrchestrationClient;
import com.sap.ai.sdk.orchestration.OrchestrationModuleConfig;
import com.sap.ai.sdk.orchestration.OrchestrationPrompt;
import com.sap.ai.sdk.orchestration.OrchestrationAiModel;
// Credentials auto-loaded from AICORE_SERVICE_KEY env var or VCAP_SERVICES
var client = new OrchestrationClient();
var config = new OrchestrationModuleConfig()
.withLlmConfig(OrchestrationAiModel.GPT_4O_MINI);
var response = client.chatCompletion(
new OrchestrationPrompt("What is SAP AI Core?"), config);
System.out.println(response.getContent());
Set the AICORE_SERVICE_KEY environment variable to the JSON service key from SAP AI Core:
export AICORE_SERVICE_KEY='{"clientid":"...","clientsecret":"...","url":"...","serviceurls":{"AI_API_URL":"..."}}'
Or run aicore configure (Python CLI) to store credentials in ~/.aicore/config.json.
See: https://sap.github.io/ai-sdk/docs/java/connecting-to-ai-core
aicore-sdk-js| Trigger | Action |
|---|---|
| Use case matches an asset (chat, streaming, multi-turn, embeddings, grounding, prompt registry, Spring AI, filtering, masking) | Serve the matching asset from assets/ |
| Use case not covered by an asset (reasoning, structured output, Spring Boot streaming) | Use Context7 (SAP/ai-sdk-java) for API usage patterns if available, else references/SDK_JAVA.md |
| Any code generation | Always verify class names and method signatures against a source above |
README.md (opens in a new tab)assets/BatchOrchestration.java (opens in a new tab)assets/ChatOrchestration.java (opens in a new tab)assets/EmbeddingsOrchestration.java (opens in a new tab)assets/FilteringOrchestration.java (opens in a new tab)assets/GroundingOrchestration.java (opens in a new tab)assets/MaskingOrchestration.java (opens in a new tab)assets/MultiTurnOrchestration.java (opens in a new tab)assets/OpenAiNative.java (opens in a new tab)assets/PromptRegistryOrchestration.java (opens in a new tab)assets/RptOrchestration.java (opens in a new tab)assets/SpringAiOpenAi.java (opens in a new tab)assets/SpringAiOrchestration.java (opens in a new tab)assets/StreamingOrchestration.java (opens in a new tab)evals/evals.json (opens in a new tab)evals/trigger_evals.json (opens in a new tab)references/SDK_JAVA.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
8 skills in this plugin
/aicore-admin-resourcesVerify and configure SAP AI Core credentials, retrieve auth tokens, and manage resource groups. WHEN: user wants to check if AI Core is set up, configure credentials, get a Bearer token, fix authentication errors, run a setup health check, or list, create, update, or delete resource groups. DO NOT USE FOR: managing deployments — use `aicore-lifecycle-management`; listing foundation models — use `genai-hub-foundation-models`.
/aicore-lifecycle-managementManage SAP AI Core lifecycle resources: scenarios, executables, configurations, and deployments. WHEN: user wants to list or inspect scenarios or executables, create or list configurations, create or list or stop or delete or patch deployments, get deployment logs, or remove duplicate LLM deployments. DO NOT USE FOR: listing foundation models or getting inference examples — use `genai-hub-foundation-models`; managing resource groups, secrets, or GitOps resources — use `aicore-admin-resources`.
/aicore-sdk-jsGenerate 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`.
/genai-hub-foundation-modelsList and explore foundation models available in SAP AI Core GenAI Hub: browse supported providers, model names, versions, capabilities, and executable IDs needed to create deployments. WHEN: user wants to see what models are available, find an executable-id or model-name for deployment, browse providers (Azure OpenAI, Anthropic, Google, Mistral, Cohere, etc.), check model capabilities or context length, get the correct model-name to pass to create_llm_deployment, or get curl inference examples for a deployed model (chat completions, Responses API, embeddings, image generation, etc.). DO NOT USE FOR: creating or managing deployments — use `aicore-lifecycle-management`.
/genai-hub-orchestrationConfigure and use the SAP AI Core Orchestration service: build prompt templates, add content filtering, set up document grounding (RAG) pipelines, and call models via the Harmonized API. WHEN: user asks about the orchestration service, Harmonized API, prompt templating with variables, content filtering, grounding, RAG pipeline, document grounding, or building a pipeline that wraps an LLM. DO NOT USE FOR: creating an orchestration deployment — use `aicore-lifecycle-management` for that; credential setup — use `aicore-admin-resources`; browsing or deploying foundation models directly without a pipeline — use `genai-hub-foundation-models`; direct LLM inference without a pipeline — use `aicore-sdk-java` or `aicore-sdk-js`
/genai-hub-prompt-evaluationRun GenAI evaluations on SAP AI Core: benchmark LLMs and prompts against a test dataset using system-defined and custom (LLM-as-judge) metrics, then retrieve aggregate results. Supports all three evaluation types — prompt registry, orchestration registry, and grounding (RAG) orchestration registry. WHEN: user wants to evaluate or benchmark an LLM / prompt / orchestration config, run a GenAI evaluation, create or list evaluation metrics, define a custom LLM-as-a-judge metric, create a prompt template (prompt registry) or an orchestration-registry config (with or without grounding) for evaluation, create an evaluation configuration or execution, or fetch evaluation results / scores for an execution. DO NOT USE FOR: agent evaluation via the offline aeval service — use `aeval-offline-evaluation`; building a production orchestration/RAG pipeline for inference — use `genai-hub-orchestration`; generic executions, deployments, or artifacts unrelated to evaluation — use `aicore-lifecycle-management`; credentials, resource groups, or object stores — use `aicore-admin-resources`.
/aicore-skills:aicore-sdk-javafrom aicore-skills
npx claudepluginhub sap/ai-skills-library --plugin aicore-skillsOther plugins' skills for the same job