keycloak

keycloak is a skill for Claude Code from atretyak1985/swarmery. It costs 87 tokens per session (3,271 once invoked), scanned A, original, Apache-2.0.

A guide for configuring Keycloak, an identity service that handles user sign-in, roles, and access for applications. It also covers connecting a web portal through OIDC, a standard sign-in protocol.

In plain words
What is it for?
Use it to configure Keycloak realms, clients, roles, groups, and Helm values, connect Auth.js to Keycloak, recover the bootstrap administrator, and debug issuer errors.
Why use it?
It helps resolve incorrect realm or client settings, failed administrator setup, and mismatched sign-in addresses between Keycloak and the application.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./files/keycloak/setup-keycloak.sh local.

Part of the infra-pack plugin — 11 skills, 1 command, 3 agents shipped together

Good fit Use it to configure Keycloak realms, clients, roles, groups, and Helm values, connect Auth.js to Keycloak, recover the bootstrap administrator, and debug issuer errors.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/atretyak1985/swarmery
agentmods
npx agentmods add skills/atretyak1985/swarmery/keycloak

Made for: Claude Code.

Or install infra-pack, the plugin that ships this one along with the rest of its 11 skills, 1 command, 3 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for keycloak

README.md
[![agentmods](https://agentmods.dev/badge/skills/atretyak1985/swarmery/keycloak/github.svg)](https://agentmods.dev/skills/atretyak1985/swarmery/keycloak)
Your own site
<a href="https://agentmods.dev/skills/atretyak1985/swarmery/keycloak"><img src="https://agentmods.dev/badge/skills/atretyak1985/swarmery/keycloak/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for keycloak

Your own site · 80×15
<a href="https://agentmods.dev/skills/atretyak1985/swarmery/keycloak"><img src="https://agentmods.dev/badge/skills/atretyak1985/swarmery/keycloak.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,271 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00087 $0.03271
Opus 5 $0.00044 $0.01636
Sonnet 5 $0.00017 $0.00654
Haiku 4.5 $0.00009 $0.00327

Measured 7d ago against content hash fba4d026c589, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

keycloak scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- For `debug-auth`: ordered diagnosis steps with specific kubectl/curl commands
plugins/infra-pack/skills/keycloak/SKILL.md · 288 lines

How it starts

The opening of the file, as written. The whole thing — 288 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Purpose

Provide Keycloak identity and access management patterns for the platform. Cover realm setup, client configuration for Auth.js v5 in the web portal repo (project.json → mainApp), two-stage Helm deployment (init/full), bootstrap admin recovery, issuer mismatch fixes, and NetworkPolicy requirements. For Helm chart template authoring beyond Keycloak values, defer to helm-chart-expert. For GCP firewall or ingress debugging, defer to kubernetes-deployment.

When to use

  • Configuring the <keycloak-realm> realm, clients, roles, or groups in Keycloak
  • Integrating Auth.js v5 with Keycloak OIDC in the web portal
  • Setting up Keycloak Helm values (init stage or full stage with ingress)
  • Debugging Auth.js error=Configuration or issuer mismatch (iss claim)
  • Recovering from bootstrap admin failures (existing database, OOM-kill)
  • Configuring NetworkPolicy for ingress-to-Keycloak traffic

When NOT to use

  • Authoring Helm chart templates or _helpers.tpl -- use helm-chart-expert
  • Debugging GCP firewall rules or minikube tunnel -- use kubernetes-deployment
  • Checking migration safety -- use migration-check
  • Detecting IaC config drift -- use infrastructure-as-code

Required environment

  • Runtime: .claude/skills/keycloak/SKILL.md
  • Tools: kubectl, helm, bash
  • Keycloak version: 26.x (codecentric/keycloakx Helm chart)
  • Setup script: the infrastructure repo's files/keycloak/setup-keycloak.sh (or the project's equivalent)
  • Namespace: environment-specific (<infra-namespace>)

Inputs

  • operation: enum -- one of: realm-setup, auth-integration, debug-auth, bootstrap-recovery, helm-values
  • environment: string -- target environment (localdev, <envAlias>, prod)
  • symptom: string (optional) -- error message or behavior being debugged

Outputs

  • Format: configuration YAML, Auth.js TypeScript code, or a diagnostic command sequence
  • Length budget: max 150 lines per response; for multi-operation tasks, produce one section per operation
  • For debug-auth: ordered diagnosis steps with specific kubectl/curl commands
  • For bootstrap-recovery: step-by-step recovery procedure with safety warnings

Read the full file on GitHub · 288 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 288 lines · 87 tokens per session scan A fba4d026c589

Subscribe to this mod's changes

keycloak is a skill published in the GitHub repository atretyak1985/swarmery (5 stars, last pushed today), licensed Apache-2.0. It adds 87 tokens to every session and 3,271 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.