Skip to main content
skill CX Codex

aicore-admin-resources — Claude Code skill: setup and usage

aicore-admin-resources — a skill for Claude Code that verifies SAP AI Core credentials and manages resource groups. Activates during initial environment setup or auth error troubleshooting.

Apache-2.0 255 installs ★ 153 updated 2026-10-22

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add SAP/ai-skills-library --skill aicore-admin-resources -a claude-code
Open on GitHub

What aicore-admin-resources does

The skill validates SAP AI Core connection settings via scripts/check_setup.py, switches landscape profiles, and captures raw Bearer tokens for curl requests. Running it requires Python 3.11+, uv, and the sap-ai-sdk-core library.

It allows agents to list, inspect, label, and delete resource groups. Each resource group ID must contain between 3 and 10 lowercase alphanumeric characters. Metadata label keys must carry the prefix ext.ai.sap.com/ or scenarios.ai.sap.com/, since bare keys trigger 400 errors. Omitting /v2 at the end of AICORE_BASE_URL causes 404 responses.

The skill does not manage deployments or list foundation models; those tasks hand off to aicore-lifecycle-management and genai-hub-foundation-models. Deleting any resource group requires the --confirm flag.

What it helps with

  • verify SAP AI Core connection and credential setup
  • capture Bearer auth tokens for API testing
  • switch active credential profiles across landscapes
  • create or delete resource groups with required prefix labels

Example prompts for the agent

  • Check if SAP AI Core credentials are configured properly
  • Get a Bearer token and export it to an environment variable
  • Create a resource group named test-group with label ext.ai.sap.com/env=stage

How to install aicore-admin-resources

1Skills CLI (Vercel)

npx skills add SAP/ai-skills-library --skill aicore-admin-resources -a claude-code

2Manually: put the files in place

~/.claude/skills/aicore-admin-resources/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/aicore-admin-resources/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about aicore-admin-resources

How to install aicore-admin-resources in Claude Code?

Run npx skills add SAP/ai-skills-library --skill aicore-admin-resources -a claude-code.

What does aicore-admin-resources do?

It tests SAP AI Core authentication, exports session Bearer tokens, and performs CRUD operations on resource groups.

What is required to run aicore-admin-resources?

It needs Python 3.11+, uv, sap-ai-sdk-core, and credentials configured via aicore configure, environment variables, or ~/.aicore/config.json.

Source text

SKILL.md · Apache-2.0
---
name: aicore-admin-resources
description: >
  Verify 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`.
compatibility: Requires Python 3.11+, uv, and sap-ai-sdk-core.
allowed-tools: Bash, Read
---

## Rules

1. Always run `check_setup.py` first when credentials are unknown or when any script fails with an auth error.
2. `AICORE_BASE_URL` must end in `/v2` — this is the single most common misconfiguration.
3. Never display or log the client secret or token value in clear text. Print only what the user needs (e.g. the resource group, not the full config).
4. X.509 certificate auth is an alternative to client secret — both are supported.

---

## Check Setup

Verifies credentials and prints the active resource group:

```bash
uv run scripts/check_setup.py
```

Expected output on success:

```json
{
  "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.

---

## Get Auth Token

Prints a raw Bearer token to stdout — useful for curl testing:

```bash
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.

---

## Configure Credentials

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

---

## Common Errors

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

---

## Switch Profiles (Multi-Landscape)

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:**
```bash
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):**
```bash
source scripts/set_profile.sh <profile> && uv run scripts/check_setup.py
```

**Option 3 — inline per command:**
```bash
AICORE_PROFILE=<profile> uv run scripts/check_setup.py
```

To list available profiles:
```bash
source scripts/set_profile.sh
```

---

## Manage Resource Groups

```bash
# 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.

---

## Handoffs

- **Ready to manage deployments?** → invoke `aicore-lifecycle-management`
- **Need to list available models?** → invoke `genai-hub-foundation-models`

---

## When to Load Reference Files

| Trigger                                     | Load                  |
| ------------------------------------------- | --------------------- |
| Any credential/auth error or setup question | `references/SETUP.md` |

© SAP · Apache-2.0 · SAP/ai-skills-library

Similar skills

All skills for AI and ML →

From the same set9

sap-fiori-guidelines sap-fiori-guidelines — a skill that feeds your agent the official SAP Fiori design system rules: buttons, forms, tables, page types, colors, accessibility and Joule patterns. CX Codex +1 1,500installs genai-hub-foundation-models The genai-hub-foundation-models Claude Code skill lists foundation models in SAP AI Core GenAI Hub and shows their details. It runs when a model name or executable ID is needed for a deployment. CX Codex +1 256installs genai-hub-tabular-orchestration genai-hub-tabular-orchestration — a skill for Claude Code manages the SAP AI Core Context Registry and tabular predictions. It registers HDL connections, exposes CSV or Parquet files as artifacts, and queries sap-rpt models. CX Codex +1 254installs aicore-lifecycle-management aicore-lifecycle-management — a skill for Claude Code that manages lifecycle resources in SAP AI Core. Handles scenarios, executables, configurations, deployments, and inference logs. CX Codex +1 251installs 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. CX Codex +1 192installs genai-hub-orchestration genai-hub-orchestration — a skill for Claude Code configures SAP AI Core Orchestration pipelines with prompt templates, content filtering, and document grounding. Model requests run through the Harmonized API. CX Codex +1 188installs genai-hub-prompt-evaluation genai-hub-prompt-evaluation — a skill for Claude Code and other platforms that runs GenAI evaluations and benchmarks LLMs on SAP AI Core. Runs when benchmarking prompts or configuring evaluation pipelines. CX Codex +1 185installs aicore-sdk-java aicore-sdk-java — a skill for Claude Code generates Java and Kotlin boilerplate for SAP GenAI Hub using the official SDK. Activated when requesting AI Core integration for Java or Spring Boot applications. CX Codex +1 180installs

Project sponsors

Companies that keep this analytics open