Skill permissions and installation scope

Claude Code vs Codex skill scope: discovery is not isolation

Compare Claude Code and Codex skill discovery, invocation, and permissions using a dated official-doc snapshot and a worksheet for checking the actual source.

Published Jul 15, 2026 Updated Nov 17, 2026 Methodology 2026-11-17 Snapshot Nov 17, 2026

The short answer

Installation makes instructions discoverable; it does not, by itself, establish a safe execution boundary. Claude Code and Codex can read the same basic SKILL.md format while discovering different copies, selecting them differently, and running their instructions with different access. Compare three questions separately: which source loads, what causes it to load, and what the resulting tools can do.

For local Claude Code, start with personal and project skill locations, then check enterprise, plugin, added-directory, and account-synced sources. For local Codex, start with repository .agents/skills discovery from the working directory toward the repository root, then check user, admin, and bundled system sources. Neither list is a filesystem jail. Moving a skill into a repository does not confine its scripts or service connections to that repository.

This comparison is a November 17, 2026 documentation snapshot, not a hands-on compatibility or security certification. The public pages were retrieved on that date; their contents can change. Record your installed version, session surface, and effective settings before applying a row to your environment. The AI skill security guide provides the broader threat model.

Compare the boundaries, not the product names

The useful comparison is between actual sessions, not brand labels. A local terminal, hosted task, and desktop workflow can have different sources and credentials even when their menus show the same skill name.

Question Claude Code, local session Codex, local session Decision this supports
Where is a repository skill found? .claude/skills, including documented parent and nested-directory behavior .agents/skills in directories from the working directory up to the repository root Choose a deliberate launch directory and inspect the resolved source
What happens with duplicate names? Enterprise, personal, and project sources have precedence; nested and plugin names have special rules Same-named skills are not merged; both can appear in selectors A matching name alone does not identify the reviewed bundle
Can a model choose it? Relevant skills can load automatically unless invocation controls prevent it Description matching can select a skill implicitly unless its policy disables that Decide whether a workflow should require explicit invocation
Does a skill field approve tools? allowed-tools can pre-approve listed tools for the invoking turn The skills reference documents invocation policy separately; do not assume Claude Code's grant semantics Inspect host-specific permission behavior rather than copying a field blindly
Does installation restrict execution? Tool permissions, sandbox configuration, and service controls are separate Sandbox or permission profile, approval policy, and service controls are separate Evaluate access after discovery, not from the folder name

The discovery and invocation rows come from the Claude Code skills reference and Codex skills reference. The Agent Skills specification describes a portable package format; it does not establish identical host enforcement. A valid package and a safely configured session are different findings.

Installation scope answers “where available?”

Claude Code documents personal ~/.claude/skills and project .claude/skills locations. Its current reference also describes enterprise skills, plugins, parent-directory discovery, and nested skills loaded when Claude works with files in their subdirectory. For ordinary same-named enterprise, personal, and project skills, enterprise wins over personal, and personal wins over project. A nested collision is different: both skills load and the nested one receives a qualified command name. These are resolution rules, not trust rankings. Source: Claude Code skills.

Added directories introduce another source. The current documentation says that a same-named skill from an added directory outside the project can run under a directory-prefixed name; that behavior requires v2.1.309 or later. Do not generalize the enterprise/personal/project precedence row to every extension source. Inspect the command's qualified name and the directory supplying it before making a deployment or data-access decision.

Account sync is another reason a local inventory can be incomplete. The same reference describes enabled claude.ai skills downloaded into ~/.claude/skills/synced for qualifying signed-in terminal sessions, requiring v2.1.273 or later. It lists authentication, feature-flag, and policy conditions under which syncing does not occur. A file downloaded previously can remain available in a later session for the same account. Check the current session's skill listing and account source; do not edit the downloaded copy as if that changed the account's original. This is a conditional feature, not a promise that every local session syncs.

Codex documents repository, user, admin, and system scopes, with user skills under ~/.agents/skills and admin skills under /etc/codex/skills. Its repository scan visits .agents/skills in every directory from the working directory up to the repository root. It follows symlinked skill folders, and same-named skills are not merged. Review a symlink's target and updater as part of the source, not just the visible entry. Source: Codex skills.

For placement and a reversible move between scopes, use the global vs project installation comparison. The comparison here answers a narrower cross-host question: whether the session will actually select the bundle you reviewed.

Invocation is not the same as permission

Claude Code supports explicit /skill-name invocation and model-selected use. Its disable-model-invocation: true field prevents automatic invocation; user-invocable: false instead hides direct user invocation while allowing model use. Hiding a menu item is not an access restriction. Codex documents explicit $skill invocation and an agents/openai.yaml policy field, allow_implicit_invocation. Setting it to false prevents implicit selection while explicit invocation still works. These controls govern activation, not the permissions of later commands. Sources: Claude Code skills, Codex skills.

The important permission-sensitive exception is Claude Code's allowed-tools. Its reference says the listed tools gain approval during the invoking turn and the grant clears on the next user message. Other tools are not removed. It also warns that workspace trust does not gate that field. Managed settings can limit such grants; confirm the effective policy and applicable version rather than assuming the field either always works or is always ignored.

Do not transfer that behavior to Codex merely because its skill has matching YAML. The Codex skills page establishes its invocation policy; the Codex approvals and security guide is the relevant source for execution access and approval decisions. An unsupported equivalence is not evidence that a feature is absent either: it means you must verify that host's documented behavior and resolved configuration.

For Claude Code, permission rules distinguish deny, ask, and allow, evaluated in that order. An allow pattern for one command spelling is not operating-system isolation around everything that program can read or send. Approving a skill, approving a command, and authorizing an external publication must remain separate review questions.

The shell sandbox has a specific perimeter

Claude Code's sandbox documentation describes isolation for shell commands and their child processes. File tools, MCP servers, and hooks do not inherit that shell boundary simply because the workflow also used Bash. Inspect their own permissions. Also check command exclusions and unsandboxed retry paths: a successful retry may have used different restrictions from the initial blocked attempt.

OpenAI's approvals and security guide separates technical sandbox access from the decision to request approval. Its command network controls are not a universal switch for hosted search, apps, MCP, and browser activity. Local settings also do not describe every cloud environment. Check readable files, writable paths, command network access, and connected-service actions separately.

A missing prompt does not prove unrestricted execution, and a restrictive command sandbox does not prove that an authenticated service cannot write remotely. Neither product's skill directory answers those questions. For dedicated failure analysis, see the sandbox boundary checklist.

Use a source-to-action worksheet

The original worksheet below turns the documentation comparison into a reviewable decision. It is an analytical aid, not a tested exploit-resistance score. Fill one row per workflow and per session surface; use redacted source identifiers rather than private data or credential values.

Layer Record before enabling the workflow Cross-host mismatch to look for Stop when
Discovery Launch directory, source type, real bundle location, reviewed version One host reads an ancestor; another loads a nested or synced source The selected source cannot be tied to the reviewed bundle
Resolution Display name, qualified command, duplicate candidates Precedence selects one copy, while another host offers both A same-named personal or extension copy has an unexplained updater
Invocation Explicit and implicit behavior; host-specific metadata A copied invocation flag is not the other host's control A consequential workflow activates unexpectedly
Tool approval Effective permission rules and skill-level grants A field changes approval on one host but has no established equivalent on another Approval scope cannot be explained
Execution Tool, read/write paths, network route, sandbox exceptions A shell restriction is mistaken for a connector restriction A required boundary is absent or a retry changes execution mode
Remote action Service account, operation, destination, result check The same skill reaches different accounts in different sessions The target or account is ambiguous

Consider a release-notes workflow that should read fixture commits and write a local draft. A personal skill, a repository skill, and a synced skill can all have that name. First prove which copy supplied the instructions. Then confirm that the session does not need a real publishing account. Passing the discovery check cannot justify granting remote write access to finish a draft.

Verify with synthetic data before real access

Use a disposable workspace and stub services; never probe a boundary with real secrets. The following is a proposed verification procedure, not an experiment we executed for this article.

  1. Create a harmless skill that reads a synthetic input and writes a draft to a known test directory. Record the host version, launch directory, selected source, and effective settings without exposing sensitive values.
  2. Invoke it explicitly and check the actual draft contents. Inspect the selected source rather than accepting a repeated skill name as proof.
  3. Test implicit selection separately, then disable it using that host's documented control and repeat the same plain-language request. Observe selection rather than assuming success from the flag's presence.
  4. In a separate disposable setup, add a distinguishable same-named copy. Verify the host's documented resolution behavior. Remove the duplicate before enabling real access; do not leave a deliberately confusing source on a normal workstation.
  5. Test an out-of-scope synthetic read or stubbed remote write under the intended restrictions. Record the actual tool, approval, execution mode, and resulting fixture state. A refusal in prose is not proof that nothing changed.
  6. After changing the skill, source, host version, or permission configuration, repeat the relevant checks. Keep a successful allowed task and a blocked disallowed action as separate observations.

A failed observation means stop and diagnose, not automatically broaden access. The safe skill testing procedure explains the fixture boundary in more detail. These checks can reveal a wrong assumption; they cannot establish universal safety or certify every future update.

Make the installation decision

Choose the smallest deliberate availability scope, but approve execution against actual resources and accounts. If a skill works in Claude Code but is missing or behaves differently in Codex, compare the source, resolution, invocation metadata, and effective access before rewriting the workflow or granting more permissions.

Keep related decisions distinct: use the least-privilege worksheet to reduce grants, the shell command checklist for pending execution, the network allowlist guide for outbound routes, and the file-scope inventory for sensitive paths. For a concrete consequential request, use the approval prompt rubric. Those supporting guides do not turn this dated comparison into a safety guarantee.

Choose a workspace before running the agent. Use the workstation comparison and setup checklist to choose where it will run.

Sources and capture note

Captured November 17, 2026. Snapshot state: retrieved public documentation, changeable after capture; not a live inventory of either installed product. No private account analytics, credentials, customer data, or cross-platform execution experiments were used.