/skills:agent-nebius-auth-setupfrom skills
Bootstraps or repairs Codex Agent Nebius authentication: account/tenant access, credentials/profile setup, lease repair, and auth hooks. Explicit invocation only.
Ships in skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
For $agent-nebius-auth-setup --help or $agent-nebius-auth-setup -h (including native Claude forms), return concise help and stop before
any workflow step. State the purpose and invocation policy. Show exact usage
for every public action. Describe each public action, positional
argument, and flag in one concise line, including -h, --help; say "No
additional public flags" when there are no others. Use only the documented
public interface. For internal or coordinator-only skills, state that boundary
and that no standalone public workflow action exists. After the selected
SKILL.md is loaded, help is report-only: do not call any additional tools,
inspect project state, or modify files, private state, Git, or external systems.
Never expose private helper actions or flags or treat help as workflow
authorization.
Use $agent-nebius-auth-setup in Codex, /agent-nebius-auth-setup in Claude Code, or
/skills:agent-nebius-auth-setup in the Claude plugin. Dollar-prefixed skill examples
refer to the same named skill on either host; use the native invocation syntax.
Preserve the declared invocation policy, approvals and workflow ownership.
Use available native tools; an unavailable required capability is a blocker,
never permission to bypass a guard or claim unobserved behavior.
Set up or repair persistent Codex Agent authentication for one authoritative Nebius project. Keep setup, read-only diagnosis, runtime token injection, repair leases, and hook installation as separate boundaries.
This skill is explicit-only. Direct invocation authorizes one bounded
convergence for the resolved target. Do not ask for another confirmation and do
not require a dry-run or plan digest before executing ensure.
Use --dry-run only when the user asks to preview, inspect, or review the
changes. A dry-run is read-only and does not create authority for a later run;
the later direct invocation is the authority.
Do not mutate IAM, credentials, profiles, selectors, repair leases, or hooks
when this skill was not explicitly invoked. Use
$agent-nebius-auth-diagnose for implicit read-only diagnosis.
Resolve exactly one project ID in this order:
parent-id,
resolved with sanitized nebius profile current followed by
nebius config get parent-id --profile <profile>.Explicit task evidence wins over the default-profile fallback. Clear ambient Nebius selectors, profiles, credentials, tokens, and impersonation while reading the default profile and accept only one valid configured project ID. When equally authoritative task sources conflict, stop and ask. Never infer the project from credential filenames, ambient profiles, inherited environment, working-directory names, a legacy default selector, or unrelated task state.
Manage exactly one deterministic tenant-parented custom group for the selected project. That group must contain exactly two permits and one membership:
admin on the selected project;viewer on the authoritative parent tenant;codex-agent-sa service account.The group name is
codex-agent-<first-20-hex-of-project-id-sha256>. It depends only on the
immutable project ID, so a project rename cannot create a second managed group.
A tenant-created group can hold both the tenant and child-project permits;
using one group avoids a separate quota-specific group. The tenant viewer
role supplies the read-only tenant access needed for quota-allowance listing,
but is broader than quota access alone. Do not describe it as quota-only.
The project and tenant roles are fixed. Do not accept a role override, grant a tenant write role, add the account to a default group, or preserve extra permits on the managed group. If the managed group contains any other permit or duplicate, fail before membership or permit mutation. Do not automatically delete old groups, revoke external/direct grants, or claim those unrelated grants are absent; report them as a separate IAM cleanup or audit when they are in current-task scope.
The managed group must have exactly one member: the fixed codex-agent-sa.
Reject any extra or duplicate member across all membership pages before
mutation. This exactness applies only to the managed group; external groups and
direct grants remain outside automatic cleanup.
From this skill directory:
bash scripts/agent-nebius-auth-setup.sh ensure \
--project-id <project_id>
Optional arguments:
--tenant-id <expected_tenant_id> asserts the resolved tenant; it is not a
selector.--dry-run displays the resolved target, required actions, and any bounded
conditional credential replacement without mutation.The live path takes its local locks first, validates the current non-agent
administrative profile by minting a human-user access token with
nebius iam get-access-token while discarding stdout and provider stderr, resolves authoritative
project metadata once, and performs one convergence pass. It never prints or
persists that human token. All bootstrap IAM and authorized-key operations use
the validated human profile until the agent service account is ready. The path
creates or reuses the project-parented service account, reconciles the one
exact-permit group, ensures one membership, maintains the canonical credential
and profile, and verifies project access plus tenant quota-allowance listing.
Live ensure allows the CLI to open browser sign-in within a three-minute
authentication bound. Run it directly after explicit invocation; an expired
human login is not a reason to ask the user to run a separate terminal command
or repeat permission. If browser sign-in cannot complete, report
blocked-admin-auth and the actual browser or authentication blocker. Never
print authorization URLs or raw authentication diagnostics. Preview and
repair-lease checks remain non-browser; verify and diagnosis never launch
human authentication. Before adding a group permit, setup validates every
membership page so an unexpected member cannot receive the new permission.
Membership is checked again after permit writes to detect concurrent drift.
Human and agent ancestry reads use nebius iam v2 project get.
An existing credential normally must resolve to codex-agent-sa under the
selected project before mutation. One exception is a failed get-by-ID whose
nonzero CLI result contains the provider-classified RPC/API NotFound marker:
explicit ensure treats that credential identity as deleted, creates or reuses
a distinct fixed service account through the human profile, reconciles its IAM
shape, generates and identity-checks one new authorized-key credential, then
creates one mode-0600 backup and atomically replaces the stale file before
rebinding the profile. Authentication, authorization, transient, generic
"not found" text, malformed output, and unclassified lookup failures remain
fatal and never trigger this recovery. Credential files must be owned regular
non-symlink files. Canonical credential identity requires JWT/RS256 with equal
valid service-account issuer and subject values.
If a matching credential cannot mint a token with a classified credential
authentication error, ensure creates one mode-0600 backup, replaces the
canonical credential at most once, rebuilds the profile, and tests again.
Profile create/update failures and unclassified or transient token failures
stop without replacing a credential. If the one replacement also fails, stop
without generating a second key or revoking anything automatically. New and
replacement credentials are generated in a private same-directory temporary
location, identity-checked, flushed, and atomically moved into place.
Except for the exact provider-classified deleted-identity case above, read,
authentication, and parse failures are not absence. Group membership lookup
follows all page tokens. Create conflicts count as convergence only after a
successful read proves the desired state. A working repeated ensure does not
rewrite IAM, credentials, or profiles.
verify requires no human/admin profile and never repairs:
bash scripts/agent-nebius-auth-setup.sh verify \
--project-id <project_id>
It checks canonical credential safety and identity, binds the working profile's
reported service-account identity and the project lookup for the fixed
codex-agent-sa to that credential, verifies project access and authoritative
project-to-tenant ancestry, and performs a read-only tenant quota-allowance
list call. It does not enumerate IAM or prove that another workflow has not
granted additional access.
Only when explicitly requested, issue a repair lease for an already working setup:
bash scripts/agent-nebius-auth-setup.sh repair-lease \
--project-id <project_id> \
--ttl-seconds 43200
The default is 12 hours and the maximum is 24 hours. Direct explicit invocation
authorizes issuance; no confirmation digest is required. The lease may
authorize only mode-0600 correction of the exact credential and rebuilding
its exact profile. It cannot authorize IAM, credential generation or rotation,
identity changes, or hooks. Use repair-local --lease-file <path> only with a
valid exact-bound lease.
Hook installation remains separate and explicit:
./install-skills.sh \
--install-hooks agent-nebius-auth-setup/assets/hooks \
--register-hooks
Runtime Nebius commands with an explicit task project opt in with exactly one leading selector:
CODEX_NEBIUS_PROJECT_ID=<project-id> <command>
Without an explicit selector, the hook resolves the config-owned default
profile name and its configured parent-id under a sanitized environment,
then injects the matching renewable profile, project, credential-file, and
token-helper context. It does not persist a global selector or inject one
universal bearer token. Malformed or conflicting selectors fail closed, and a
raw-token child still requires an explicit selector:
python3 "$CODEX_NEBIUS_TOKEN_HELPER" exec-token -- <command> [args...]
Use retry-idempotent only for an explicitly idempotent operation whose real
401 or UNAUTHENTICATED result was mapped to exit status 77.
When using this skill, capture durable, reusable, public-safe learnings in the narrowest appropriate surface only when the task contract allows source edits. For read-only/report-only work, or when a learning is not public-safe, evidence-backed, in scope, or free of unverified/vendor-specific claims, do not edit skill sources; report that it was skipped. Do not capture secrets, private URLs, customer data, raw logs, or one-off local state.
python3 -B scripts/test_agent_nebius_auth_setup.py
python3 -B scripts/test_pre_tool_use_nebius_auth.py
python3 -B scripts/test_nebius_auth_runtime.py
python3 -B scripts/test_install_hook_registration.py
python3 -B scripts/test_agent_nebius_auth_contract.py
README.md (opens in a new tab)agents/openai.yaml (opens in a new tab)assets/hooks.json.template (opens in a new tab)assets/hooks/nebius_auth_shared.py (opens in a new tab)assets/hooks/nebius_auth_token_helper.py (opens in a new tab)assets/hooks/pre_tool_use_nebius_auth.py (opens in a new tab)evals/evals.json (opens in a new tab)evals/process-cases.md (opens in a new tab)evals/trigger-prompts.csv (opens in a new tab)scripts/agent-nebius-auth-repair-lease.py (opens in a new tab)scripts/agent-nebius-auth-setup.sh (opens in a new tab)scripts/test_agent_nebius_auth_contract.py (opens in a new tab)scripts/test_agent_nebius_auth_setup.py (opens in a new tab)scripts/test_install_hook_registration.py (opens in a new tab)scripts/test_nebius_auth_runtime.py (opens in a new tab)scripts/test_pre_tool_use_nebius_auth.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
75 skills in this plugin
/agent-nebius-auth-diagnoseRead-only diagnosis for current-session Nebius project discovery, agent authentication, quota reads, profiles, selectors, or auth-hook failures. Use when auth is missing/blocked; never mutate auth or IAM./ai-agent-designDesign provider-neutral production AI agent subsystems: behavior and topology, contracts, tools, context, memory, authority, durability, security, evals, and operations. Use ai-stack when AI technology selection remains, design/app-stack for whole products, and implementation skills for code./ai-stackSelect or review undecided AI components across models, runtimes, training/inference, interoperability, retrieval, evals, safety, and operations. Consume ai-agent-design's frozen agent-subsystem contract; use app-stack for non-AI layers, research for one technology, and design for whole solutions./alignAlign a project after changes across code, wiring, tests, CI, CLI/help, config, docs, workflows, and skills, with focused quality gates. Use align-skill for skill-folder-only work./align-skillAlign existing/scaffolded skills for Agent Skills, Codex, Claude Code, and npx skills installation while preserving functionality, native controls, resources, and evals. Accept local or report-only GitHub sources; use skill-creator for new scaffolds and align for projects./apply-securityReview software, infrastructure, CI/CD, containers, IaC, or design for security risks involving secrets, IAM/auth, exposure, inputs, dependencies, or supply chain. Advise implicitly; patch only when authorized.npx claudepluginhub nebius/nebius-ps-services --plugin skills