← AI Curiosity Lab

Why does the same Skill behave differently across coding agents?

30-second answer

The same Skill behaves differently across coding agents because each agent defines, loads, executes, and integrates Skills differently. A Skill is not a portable program but is deeply coupled to the host agent's architecture, tooling, and model capabilities.

Professional explanation

To understand why the same Skill behaves differently across coding agents, we must first recognize that a Skill is not a standardized, portable software module. In products like OpenAI's Codex and Anthropic's Claude Code, a Skill is a meta-instruction or context augmentation mechanism for extending agent capabilities. Its concrete form, lifecycle, and execution are entirely defined by the host platform. Thus, the 'same Skill' is often just a natural language description with similar intent, not a byte-equivalent program entity.

At the definition level, OpenAI Codex treats a Skill as a structured instruction set that can be dynamically discovered and loaded by the agent. It typically includes a name, description, trigger conditions, and specific operational steps. These Skills are stored in YAML or JSON format and may be associated with specific tool-calling permissions. Codex's runtime injects Skill descriptions matching the current intent into the conversation context, guiding the model to generate expected behavior. Skill loading is dynamic, based on semantic matching, and may be constrained by user permissions and session state.

In contrast, Anthropic's Claude Code views Skills as more lightweight, user-defined prompt templates or macros. Users define Skills in simple text files and reference them explicitly during conversations. Skill loading in Claude Code is typically explicit: the user activates a Skill via a specific command or by mentioning its name. The Skill content is directly concatenated into the model's context window as part of the system prompt or user message. This mechanism is closer to 'prompt injection' than Codex's dynamic dispatching with trigger conditions and tool bindings.

This difference in definition and loading directly leads to behavioral divergence. In Codex, a Skill might not trigger at all if the semantic matching threshold isn't met, or it might be partially suppressed due to insufficient permissions. In Claude Code, as long as the user explicitly invokes it, the Skill content is fully injected, but whether the model follows it strictly depends on its instruction-following ability and context window congestion. Thus, a Skill described as 'review code for security vulnerabilities' might activate in Codex only when security-related keywords are detected, while in Claude Code it requires the user to type '/check-security' to execute.

Execution environment differences are another core factor. Codex Skills can declare required tools (e.g., file read/write, terminal command execution, network requests), and the agent grants temporary permissions based on the Skill definition at runtime. This means a Skill's execution capability is limited by the agent's toolset and sandbox policies. For instance, a Skill needing external API access might be blocked in Codex due to network policies but succeed in Claude Code if the user manually grants network access. Moreover, Codex's tool calls are structured function calls generated by the model, while Claude Code may rely more on natural language commands generated by the model and executed by a terminal emulator, introducing additional parsing uncertainty.

Model capability is the fundamental variable determining Skill performance. Even if two agents load identical Skill text, the underlying large language model's reasoning ability, code generation quality, instruction adherence, and context length limits cause significant differences. For example, a Skill requiring 'refactor this function to reduce cyclomatic complexity' might generate code more aligned with software engineering principles in GPT-4-driven Codex, while Claude 3.5 Sonnet-driven Claude Code might focus more on code style consistency. Models also differ in attention decay over long contexts, affecting the completeness of multi-step instruction execution within a Skill.

Context assembly strategies further amplify differences. Codex may use retrieval-augmented generation (RAG) to dynamically select the most relevant fragments from a Skill library for injection, rather than loading the full Skill. This chunking strategy can cause partial instruction loss or semantic fragmentation. Claude Code tends to insert the entire Skill file content directly, but if the Skill is too long, it may crowd the precious context window, causing the model to 'forget' early conversation information or the latter parts of the Skill. Therefore, a long Skill with detailed examples and edge cases might lose examples due to chunking in Codex, or ignore edge cases due to truncation in Claude Code.

Differences in tool integration and error handling cannot be overlooked. Codex Skills can define error-handling branches, such as 'if the file does not exist, create it,' and the agent can execute corresponding logic based on structured error codes returned by tools. Claude Code's tool interaction is closer to command-line interaction, with errors returned as text; the model must parse them and decide the next step. This difference means that the same file-operation Skill, upon encountering a 'permission denied' error, might attempt privilege escalation or report a clear error as defined in the Skill in Codex, while Claude Code might simply display the raw error message to the user and halt execution.

Product design philosophy dictates the degree of Skill autonomy. OpenAI positions Codex as a managed, auditable automation agent, so Skill execution is subject to strict policy controls, such as requiring user confirmation for destructive actions. Anthropic's Claude Code emphasizes direct user control, with Skills acting more like user 'macros'—transparent in execution but lacking automated safety guardrails. Thus, a Skill designed to 'auto-fix all lint errors' might request confirmation for each file in Codex, while in Claude Code it could directly batch-modify files, offering higher efficiency but greater risk.

Version iteration and compatibility are non-negligible factors in real-world engineering. Codex's Skill format and API may change with platform upgrades, causing Skills written for older versions to behave abnormally in newer ones. Claude Code's Skills are plain text, making the format more stable, but model updates (e.g., from Claude 3 to 3.5) can alter the interpretation of the same prompt. Therefore, the same Skill may perform differently even within the same agent at different times, let alone across platforms.

Additionally, initialization state and side-effect management differ. Codex may maintain independent session state for each Skill execution, allowing data to be passed between Skills via shared memory. Claude Code Skills typically run within a single conversation context, with state implicitly passed through conversation history. This means a stateful Skill (e.g., 'maintain a to-do list') might persist via dedicated storage in Codex, but lose state upon conversation reset in Claude Code.

Finally, multi-Skill collaboration and priority conflict resolution mechanisms vary. Codex has a Skill scheduler that selects execution based on priority and context relevance when multiple Skills match simultaneously. Claude Code lacks a built-in scheduler; if a user activates multiple Skills at once, their instructions are injected together into the context, potentially causing instruction conflicts or model confusion. Thus, a Skill that coexists harmoniously with others in Codex might produce unexpected behavior in Claude Code due to instruction pollution.

In summary, the behavioral differences of the same Skill across coding agents stem from ontological differences in Skill definition, loading and scheduling mechanisms, execution environments and tool integrations, underlying model capabilities, context management strategies, product safety philosophies, and state management. Engineers migrating Skills across platforms must conduct thorough re-adaptation and testing, rather than assuming behavioral equivalence. Understanding these boundaries is key to building reliable AI-assisted development workflows.

In simpler words

Think of a Skill as a recipe. You give the same recipe to two different cooks: one works in a professional kitchen with smart appliances, the other in a home kitchen with basic tools. The professional kitchen can automatically preheat the oven when the recipe calls for it, while the home kitchen requires you to manually set the temperature. Similarly, a coding Skill behaves differently across AI coding agents because each agent provides a different 'kitchen'—its own set of tools, rules, and underlying intelligence. OpenAI's Codex and Anthropic's Claude Code are two such distinct kitchens.

First, the Skill itself isn't a universal file. In Codex, a Skill is a set of instructions with trigger conditions; the agent intelligently decides when to use it, much like a smart kitchen suggesting a recipe based on the ingredients you take out. In Claude Code, a Skill is more like a macro: you must explicitly tell the assistant to use it, and then it pastes the instructions into the conversation. So, a 'review code for security' Skill might activate automatically in Codex, but in Claude Code you need to invoke it manually.

Second, execution capabilities and permissions differ. Codex Skills can request specific tools, like file access or internet, but the agent decides whether to grant them based on safety policies—like a head chef overseeing every step. Claude Code trusts the user more; if you grant permission, it executes, which is riskier but more flexible. Additionally, the underlying AI models, such as GPT-4 versus Claude 3.5, have different strengths, so they interpret and execute the same instructions with varying quality.

Finally, context management affects outcomes. Codex might break a long Skill into chunks and load only relevant parts, potentially missing details. Claude Code stuffs the entire Skill into the conversation, but if it's too long, the model might forget the beginning or end. These differences mean a Skill that works perfectly in Codex likely needs significant adaptation—or even a full rewrite—to work in Claude Code. Engineers must test and tailor Skills for each platform, understanding each agent's unique 'kitchen rules' to avoid unexpected behavior.

Common misconceptions

  • Misconception: Skills are portable modules that work across platforms. Reality: Skills are not standardized components; their format, triggering mechanism, and execution environment are entirely defined by the host agent. The same natural language description requires re-adaptation on different platforms.
  • Misconception: If the underlying model is the same, Skill performance will be identical. Reality: Even with the same GPT-4 model, differences in tool integration, context management, and safety policies between Codex and third-party agents cause behavioral divergence.
  • Misconception: Skill performance differences are solely due to model capability. Reality: Beyond model capability, engineering factors like loading timing (dynamic vs. explicit), tool permissions, error handling, and context assembly strategies are equally critical.
  • Misconception: Claude Code does not support dynamic Skill triggering. Reality: Claude Code Skills are primarily activated explicitly, but users can implement simple keyword triggers via custom instructions, though it lacks Codex's semantic matching-based automatic scheduling system.
  • Misconception: Long Skills are always executed completely in Codex. Reality: Codex may use RAG to load Skills in chunks, potentially losing some instructions or examples, thus affecting execution completeness.

What this changes in real products

In real-world engineering, this difference means teams cannot directly deploy a Skill written for one platform to another. For example, an 'auto code review' Skill built for OpenAI Codex, relying on its dynamic scheduling and strict sandbox, must be adapted for explicit invocation in Claude Code, with error handling redesigned for its command-line interaction style. Conversely, a Skill leveraging Claude Code's long context window with many examples may fail in Codex due to RAG chunking. Teams must maintain multiple Skill versions and establish per-platform testing pipelines to ensure reliability and safety in AI-assisted development. Product managers planning AI coding assistant features must clarify Skill boundaries and avoid promising cross-platform consistency to users.