cratis-arc-identity-and-tenancy-kotlin

cratis-arc-identity-and-tenancy-kotlin is a skill for Claude Code, Codex from Cratis/AI. It costs 50 tokens per session (1,610 once invoked), scanned A, original, MIT.

A Kotlin and Java setup for Arc identity and tenant handling in JVM web applications. Authentication checks who is calling, authorization checks what they may do, and tenancy selects which customer or organization’s data they can access.

In plain words
What is it for?
Use it to configure authentication handlers, expose application identity details, resolve tenants, and connect tenant context to coroutine-based application work.
Why use it?
It keeps caller identity, permission checks, and tenant selection as separate concerns. This helps avoid treating a tenant name supplied by a request as proof that the caller belongs to that tenant.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to configure authentication handlers, expose application identity details, resolve tenants, and connect tenant context to coroutine-based application work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cratis/ai/cratis-arc-identity-and-tenancy-kotlin
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Cratis/AI --skill cratis-arc-identity-and-tenancy-kotlin
Clone the repo
git clone --depth 1 https://github.com/Cratis/AI

Made for: Claude Code, Codex.

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 cratis-arc-identity-and-tenancy-kotlin

README.md
[![agentmods](https://agentmods.dev/badge/skills/cratis/ai/cratis-arc-identity-and-tenancy-kotlin/github.svg)](https://agentmods.dev/skills/cratis/ai/cratis-arc-identity-and-tenancy-kotlin)
Your own site
<a href="https://agentmods.dev/skills/cratis/ai/cratis-arc-identity-and-tenancy-kotlin"><img src="https://agentmods.dev/badge/skills/cratis/ai/cratis-arc-identity-and-tenancy-kotlin/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 cratis-arc-identity-and-tenancy-kotlin

Your own site · 80×15
<a href="https://agentmods.dev/skills/cratis/ai/cratis-arc-identity-and-tenancy-kotlin"><img src="https://agentmods.dev/badge/skills/cratis/ai/cratis-arc-identity-and-tenancy-kotlin.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,610 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00050 $0.01610
Opus 5.5 $0.00020 $0.00644
Sonnet 5.5 $0.00010 $0.00322
Haiku 4.5 $0.00005 $0.00161

Measured today against content hash c492e4cb2516, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cratis-arc-identity-and-tenancy-kotlin scanned grade A with 0 findings 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 today.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cratis/ai/skills/cratis-arc-identity-and-tenancy-kotlin/SKILL.md · 130 lines

How it starts

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

Resolve identity and tenancy in JVM Arc

Authentication identifies the caller; authorization decides whether they may execute an operation; tenant resolution selects their data boundary. Configure and verify all three separately. A tenant header alone proves no membership.

Use the Arc Gradle plugin, which applies KSP, and the io.cratis:arc-spring-boot-starter dependency. Choose io.cratis:cratis when the host also owns a Chronicle integration. These are JVM contracts; do not infer the same switches exist in Arc .NET.

Authenticate and expose identity details

Register ordered AuthenticationHandler beans. A handler gets immutable AuthenticationRequestContext: case-insensitive headers, cookies, captured principal and selected tenant. Return:

  • AuthenticationResult.ANONYMOUS when credentials are not recognized, so the next handler can try.
  • AuthenticationResult.failed(...) for recognized but rejected credentials.
  • AuthenticationResult.succeeded(...) with an ArcPrincipal on success.

Success and failure are terminal; a later handler cannot override a rejection. Spring interleaves Kotlin handlers and Java AsyncAuthenticationHandler beans in global @Order. Java handlers return CompletionStage, which Arc adapts. Do not block while verifying credentials. Public authentication errors are generic 401 responses, not the handler's private reason.

With Spring Security present, Arc captures its principal before suspending work. ROLE_ authorities become unprefixed Arc roles. Without it, Arc captures the servlet principal. Never read thread-local security state after suspension.

Register exactly one IdentityDetailsProvider<T> to serve GET /.cratis/me. Supply detailsType: Class<T> and return IdentityDetails<T> from provide(IdentityProviderContext), including isUserAuthorized and the application payload. Use a concrete DTO KSP can describe; an unsupported identity shape fails ARCKSP0307. Java uses AsyncIdentityDetailsProvider<T>. Multiple providers fail startup. The client-readable identity cache cookie is excluded from authentication input and cannot authenticate a later request.

Read the full file on GitHub · 130 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. today Changed · -8 lines · +7 tokens per session c492e4cb2516
  2. 1mo ago Changed · -41 tokens per session afb2f1046884
  3. 1mo ago Changed 71baa287872c
  4. 1mo ago First seen · 138 lines · 84 tokens per session scan A 790cb50e2956

Subscribe to this mod's changes

cratis-arc-identity-and-tenancy-kotlin is a skill published in the GitHub repository Cratis/AI (4 stars, last pushed today), licensed MIT. It adds 50 tokens to every session and 1,610 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-13.

Related

cratis-arc-identity-and-tenancy-kotlin compared with skills from other repositories

cratis-arc-identity-and-tenancy-kotlin next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cratis-arc-identity-and-tenancy-kotlinCratis/AISkill4todayMITA50Claude Code, Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill101ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill395ktodayMITA36Claude Code
systematic-debuggingobra/superpowersSkill330k2d agoMITA21Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill14kyesterdayCC0-1.0A113Claude Code, Codex
next-cache-components-adoptionvercel/next.jsSkill144ktodayMITA95Claude Code