Verifies and configures SAP AI Core credentials, retrieves Bearer tokens, and manages resource groups. Runs setup health checks and fixes auth errors.
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; scripts run unread.
check_setup.py first when credentials are unknown or when any script fails with an auth error.AICORE_BASE_URL must end in /v2 — this is the single most common misconfiguration.Verifies credentials and prints the active resource group:
uv run scripts/check_setup.py
Expected output on success:
{
"status": "ok",
"resource_group": "<your-resource-group>",
"base_url": "https://api.ai.<region>...",
"auth_url": "https://..."
}
If this fails, read references/SETUP.md for step-by-step credential configuration.
Prints a raw Bearer token to stdout — useful for curl testing:
export TOKEN=$(uv run scripts/get_token.py)
Always capture the token into a variable. Never run get_token.py standalone or with 2>&1 — that prints the raw JWT into the conversation. The success message already goes to stderr cleanly; $() capture gives only the bare token.
Three options — see references/SETUP.md for the full guide:
| Option | Command / Action |
|---|---|
| Interactive CLI (recommended) | aicore configure |
| Environment variables | Set AICORE_AUTH_URL, AICORE_CLIENT_ID, AICORE_CLIENT_SECRET, AICORE_BASE_URL, AICORE_RESOURCE_GROUP |
| Profile config file | Create ~/.aicore/config.json |
| Error | Fix |
|---|---|
401 Unauthorized | Re-run aicore configure — wrong client_id or secret |
404 Not Found | Append /v2 to AICORE_BASE_URL |
Resource group not found | Create it in AI Core Launchpad or contact admin |
No credentials found | Set the required env vars or run aicore configure |
When working across multiple landscapes, credentials live as config_<profile>.json files under AICORE_HOME (default: ~/.aicore). Because the shell environment is clean on each agent run, the profile must be set before the agent starts or inline with each command.
Option 1 — set in your shell before starting the agent:
export AICORE_HOME=/path/to/credentials # only needed if not ~/.aicore
export AICORE_PROFILE=<profile>
# then start the agent — it inherits the env vars
Option 2 — source and run in one shell (for agent use):
source scripts/set_profile.sh <profile> && uv run scripts/check_setup.py
Option 3 — inline per command:
AICORE_PROFILE=<profile> uv run scripts/check_setup.py
To list available profiles:
source scripts/set_profile.sh
# List all resource groups:
uv run scripts/list_resource_groups.py
# Show detailed view (includes labels):
uv run scripts/list_resource_groups.py --response-format detailed
# JSON output:
uv run scripts/list_resource_groups.py --json
# Inspect a single resource group:
uv run scripts/list_resource_groups.py --resource-group-id <id>
# Create a resource group:
uv run scripts/create_resource_group.py --id <id>
# Create with labels (keys must be prefixed ext.ai.sap.com/ or scenarios.ai.sap.com/):
uv run scripts/create_resource_group.py --id <id> --label ext.ai.sap.com/team=data --label ext.ai.sap.com/env=prod
# Update labels (replaces the full label set):
uv run scripts/patch_resource_group.py --id <id> --label ext.ai.sap.com/team=data
# Delete a resource group (--confirm is required):
uv run scripts/delete_resource_group.py --id <id> --confirm
Note: Resource group IDs must be 3–10 lowercase alphanumeric characters (hyphens allowed, not at start/end). Label keys must use the prefix ext.ai.sap.com/ or scenarios.ai.sap.com/ — bare keys like team=data will be rejected with a 400 error. Deletion may return 409 ("Conflicting ongoing action") immediately after creation while provisioning completes — retry after a short wait.
aicore-lifecycle-managementgenai-hub-foundation-models| Trigger | Load |
|---|---|
| Any credential/auth error or setup question | references/SETUP.md |
references/SETUP.md (opens in a new tab)scripts/check_setup.py (opens in a new tab)scripts/create_resource_group.py (opens in a new tab)scripts/delete_resource_group.py (opens in a new tab)scripts/get_token.py (opens in a new tab)scripts/list_resource_groups.py (opens in a new tab)scripts/patch_resource_group.py (opens in a new tab)scripts/set_profile.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
8 skills in this plugin
/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-javaGenerate working Java boilerplate for SAP GenAI Hub using the SAP AI SDK for Java (com.sap.ai.sdk). Covers chat completion, streaming, multi-turn conversations, prompt templates, content filtering, data masking, embeddings, RAG/grounding, prompt registry, and Spring Boot streaming. WHEN: user asks for Java or Kotlin code that calls a GenAI Hub model, wants a Java starter project, asks how to use com.sap.ai.sdk in their app, or asks how to integrate AI Core into a Spring Boot or plain Java application. DO NOT USE FOR: JavaScript/TypeScript code — use `aicore-sdk-js`.
/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`.
/aicore-skills:aicore-admin-resourcesfrom aicore-skills
npx claudepluginhub sap/ai-skills-library --plugin aicore-skillsOther plugins' skills for the same job