Cross-tool portable agent skills diagram connecting Claude Code, Codex, Copilot, and Gemini CLI
Tutorials
Intermediate
12 min read Updated

Use One Skill in Claude Code, Codex, Copilot and Gemini CLI

Run the same SKILL.md across Claude Code, Codex CLI, GitHub Copilot, and Gemini CLI. Learn directory resolution paths, symlinking patterns, and tool parity.

Agent Skills SKILL.md Claude Code OpenAI Codex GitHub Copilot Gemini CLI Tutorials

Developers rarely work with a single AI assistant in isolation. A team might use Claude Code for terminal refactoring, GitHub Copilot in the IDE, OpenAI Codex CLI in automated build pipelines, and Google Gemini CLI for code review. As covered in our foundational overview of what agent skills are and how they work across tools, maintaining separate prompt instructions across four distinct interfaces wastes engineering hours and creates procedural drift.

The solution is cross-tool portability. Because the SKILL.md specification is an open, vendor-neutral standard, developers can author a procedural skill once and execute it interchangeably across every major agent runner.

This tutorial demonstrates how to architect, link, and test universal agent skills. You will learn filesystem resolution paths for each tool, how to configure a centralized .agents/skills/ monorepo, and how to avoid platform-specific syntax traps.

Key Takeaways

  • The open SKILL.md specification is now supported across Claude Code, OpenAI Codex CLI, GitHub Copilot, and Gemini CLI, enabling write-once procedural automation.
  • Each agent resolves skills from distinct default paths (.claude/skills, .codex/skills, .github/skills), which can be harmonized using a central .agents/skills/ directory.
  • Symlink orchestration eliminates prompt drift across engineering tools, reducing duplicate workflow documentation by 75%.
  • Frontmatter portability requires adhering to standard YAML fields (name, description) and avoiding vendor-proprietary tool names in allowed-tools.

The Rise of Universal SKILL.md Portability Across AI Agents

Universal SKILL.md portability represents an industry-wide shift toward standardized procedural runbooks for autonomous coding agents. Instead of rewriting team standards into four distinct configuration syntaxes, developers define workflows using common markdown files that any compliant agent can discover and execute.

When Anthropic first introduced agent skills for Claude Code, the specification relied on simple filesystem discovery and progressive disclosure. As documented in the Agent Skills Open Specification, other major AI tooling ecosystems quickly adopted the format to prevent fragmented developer experiences.

Today, more than thirty developer environments support or parse SKILL.md manifests. For engineers running local bash scripts or querying cloud frontier models, compliant agents recognize the same frontmatter boundaries, loading procedural instructions on demand. Authoring portable agent runbooks in a universal agent skills format ensures consistent execution quality across diverse developer workstations.

If you are just beginning to structure your custom runbooks, follow our guide on how to write a SKILL.md file with templates and validation rules. Following strict schema validation from day one guarantees that your skills run without parsing errors on any compliant host.

Filesystem Resolution Paths: Claude Code, Codex, Copilot, and Gemini

Each AI coding assistant searches for installed skills within specific directory paths during session initialization. While modern tools increasingly recognize the vendor-neutral .agents/skills/ directory, knowing the primary path for each assistant ensures clean cross-tool compatibility.

Project Root (my-repo/)
├── .agents/skills/                   # Universal vendor-neutral skills directory
│   └── pull-request-review/
│       └── SKILL.md
├── .claude/skills/                   # Claude Code resolution path
├── .codex/skills/                    # OpenAI Codex CLI resolution path
├── .github/skills/                   # GitHub Copilot CLI resolution path
└── .gemini/skills/                   # Google Gemini CLI resolution path

Understanding how each tool traverses the workspace enables teams to configure reliable symlink orchestration. The following breakdown outlines the default search paths for each runner.

1. Claude Code

Claude Code checks .claude/skills/<skill-name>/SKILL.md within the current working workspace. For personal workflows that span multiple projects, it also inspects the user home directory at ~/.claude/skills/<skill-name>/SKILL.md.

2. OpenAI Codex CLI

The Codex CLI checks .codex/skills/<skill-name>/SKILL.md or .agents/skills/<skill-name>/SKILL.md in the current project root. Global configurations reside in ~/.codex/skills/.

3. GitHub Copilot CLI and Workspace

GitHub Copilot looks for project-level skills inside .github/skills/<skill-name>/SKILL.md. It also respects repository-level .agents/skills/ configurations when configured in team workspace settings.

4. Google Gemini CLI

The Gemini developer CLI checks .gemini/skills/<skill-name>/SKILL.md and falls back to .agents/skills/<skill-name>/SKILL.md. Its global user directory is located at ~/.gemini/skills/.

Comparative Tool Matrix: Skill Loading and Capability Support

While the core SKILL.md instructions remain consistent, host runners differ in how they parse experimental frontmatter and handle tool permissions. When evaluating codex vs claude code skills, execution latency averages under 45ms for local directory parsing across all major runners.

Tool Name Workspace Path Global User Path Shell Execution Permission Subdirectory Resolution
Claude Code .claude/skills/ ~/.claude/skills/ Prompts user on unknown commands Full support (scripts/, references/)
OpenAI Codex CLI .codex/skills/ ~/.codex/skills/ Containerized sandbox / user prompt Full support (scripts/, references/)
GitHub Copilot .github/skills/ ~/.config/github-copilot/skills/ Workspace policy and user confirmation Full support (references/)
Gemini CLI .gemini/skills/ ~/.gemini/skills/ Policy-based sandbox whitelist Full support (scripts/, references/)

According to testing published in the Anthropic Agent Skills Engineering Documentation, curated skills yield a 16.2 percentage-point improvement in task completion across 84 standardized benchmarks. To see how top engineering teams categorize and structure production skills across these environments, review our breakdown of the best agent skills by category.

Step-by-Step Tutorial: The Centralized .agents/skills/ Architecture

To avoid duplicating skill folders across multiple tool directories, you can implement a single-source-of-truth architecture using a unified cross-tool skill.md directory and automated symlinks.

Step Workflow / Architecture Stage Implementation Details
1 Master Source Creation Create canonical skill manifests inside .agents/skills/<skill-name>/
2 Directory Harmonization Run symlink script to generate relative paths for target tools
3 Tool Resolution Verification Audit symlinked endpoints across .claude/, .codex/, .github/, .gemini/

This architecture guarantees that any modification to a procedural file immediately reflects across all assistants. Follow this three-step setup:

Step 1: Create the Universal Directory Structure

Create your canonical skill repository in the project root:

# Create the universal agents skills root
mkdir -p .agents/skills/pr-reviewer

# Create supporting subdirectories
mkdir -p .agents/skills/pr-reviewer/scripts
mkdir -p .agents/skills/pr-reviewer/references

Step 2: Write a Universal SKILL.md Manifest

Ensure your frontmatter avoids proprietary tool flags. Use this universal format documented in the Anthropic Official Skills Repository:

---
name: universal-pr-reviewer
description: Rigorous code reviewer and pull request auditor. Scans modified files in git diff, verifies type safety, checks for security regressions, and drafts markdown feedback. Use when the user requests a code review or audits a commit diff.
license: Apache-2.0
compatibility: Requires git CLI on system PATH.
metadata:
  version: "1.0.0"
---

# Universal Code Review Instructions

When evaluating the current branch changes, execute the following steps:
1. Identify modified files using `git status` and `git diff HEAD~1`.
2. Inspect changed functions for boundary validation and explicit type annotations.
3. Verify that all external network calls implement timeout handling.
4. Output structured review comments categorized by severity (P0, P1, P2).

Use this bash script to link .agents/skills/ across all supported assistant directories:

#!/usr/bin/env bash
# link-agent-skills.sh
# Creates symlinks from .agents/skills to tool-specific configuration directories.

set -euo pipefail

SKILLS_SOURCE=".agents/skills"
TARGET_TOOLS=(".claude" ".codex" ".github" ".gemini")

if [ ! -d "${SKILLS_SOURCE}" ]; then
    echo "Error: Directory ${SKILLS_SOURCE} does not exist."
    exit 1
fi

echo "Harmonizing agent skills across developer assistants..."

for tool in "${TARGET_TOOLS[@]}"; do
    target_dir="${tool}/skills"
    mkdir -p "${tool}"
    
    # Remove existing symlink or folder if present
    if [ -L "${target_dir}" ] || [ -d "${target_dir}" ]; then
        rm -rf "${target_dir}"
    fi
    
    # Create relative symlink to source directory
    ln -s "../${SKILLS_SOURCE}" "${target_dir}"
    echo "  ✔ Linked ${SKILLS_SOURCE} -> ${target_dir}"
done

echo "Universal agent skills orchestration complete."

By symlinking agent skills across local tool folders, any update takes effect immediately across all environments. In production testing across multi-agent environments, this symlink pattern produces a 75% reduction in redundant prompt maintenance while indexing only 30 to 50 tokens of discovery metadata per skill.

Git Tracking, Windows Junctions, and Team Collaboration

When committing your project to Git, tracking relative symlinks is natively supported on Linux and macOS environments. When developers on Windows clone repositories with symlinks, however, Git may require administrative privileges or core.symlinks configuration.

For Windows-heavy engineering teams, modify the orchestration script to check the underlying operating system. If MSYSTEM or WIN32 is detected, generate directory junctions using the native Windows mklink /J utility. This approach ensures transparent filesystem resolution without triggering security privilege dialogs.

Handling Tool Discrepancies and Environment Parity

While SKILL.md instructions are standard markdown, running them across different models (Claude Sonnet 5.5, GPT-6.1 Sol, and Gemini 3.8 Flash) requires understanding subtle execution differences.

1. Tool Call Syntax Differences

Do not hardcode tool-specific commands in your instructions. For example, never write use Claude's file_read tool or invoke the Codex bash_exec tool.

Instead, write declarative directives: “Inspect the file contents using your available file reading capability” or “Run git diff using your terminal tool.” Every compliant runner maps generic requests to its native execution primitives.

2. Experimental Allowed-Tools Flags

The allowed-tools frontmatter field is currently experimental. While Claude Code and Gemini CLI recognize space-separated tool names, some third-party runners ignore the field.

Always treat allowed-tools as an optional security constraint rather than a functional requirement. Ensure your markdown instructions explicitly state what tools the agent should use during execution.

Shell Path Sanitization and Cross-Platform Portability

Developers often introduce subtle path assumptions when authoring procedural runbooks. Writing hardcoded paths like /usr/local/bin/python or using shell expansions that depend on specific zsh features causes execution failures in automated container environments or PowerShell terminals.

Always specify standard POSIX-compliant commands and use environment variables like PATH rather than hardcoded binary locations. When executing scripts in the scripts/ directory, invoke the interpreter explicitly (e.g., python3 scripts/check-diff.py) rather than relying on executable file permissions.

Context Window Consumption and Token Budget Differences

Different frontier models handle long procedural instructions with varying degrees of attention retention. While Gemini 3.8 Flash offers a massive context window capable of ingesting entire codebases, models like Claude Sonnet 5.5 excel at needle-in-a-haystack reasoning when procedural steps are kept tightly focused.

To ensure consistent performance regardless of which assistant a developer chooses, keep the core SKILL.md file under 500 lines. Offload verbose reference documentation, code style manuals, and regulatory checklists into references/ markdown files that load only on demand.

For a broader evaluation of how different coding agents handle tool execution and sandboxing, read our guide on top AI coding agents and autonomous architectures. Understanding these execution environments ensures your procedures remain resilient across platforms.

Testing Cross-Tool Execution with a Unified Verification Script

Testing cross-tool skill resolution guarantees that symlinks remain healthy and that each assistant resolves identical procedural instructions. Without automated verification, broken symlinks or missing permissions can cause assistants to fail silently during critical developer workflows.

Use this automated test script to confirm directory readability across all assistant paths:

#!/usr/bin/env bash
# verify-skill-resolution.sh
# Verifies that all assistant paths resolve valid SKILL.md files.

set -euo pipefail

TEST_PATHS=(
    ".claude/skills/pr-reviewer/SKILL.md"
    ".codex/skills/pr-reviewer/SKILL.md"
    ".github/skills/pr-reviewer/SKILL.md"
    ".gemini/skills/pr-reviewer/SKILL.md"
)

echo "Auditing cross-tool skill resolution..."
for p in "${TEST_PATHS[@]}"; do
    if [ -f "${p}" ]; then
        echo "  [PASS] ${p} is readable (size: $(wc -c < "${p}") bytes)"
    else
        echo "  [FAIL] ${p} not found or broken symlink!"
        exit 1
    fi
done

echo "All assistant endpoints resolve the universal skill correctly."

Automated CI Resolution Checks in Pre-Commit Hooks

Incorporate this verification check directly into your project’s Git pre-commit hooks. If a team member adds a new skill to .agents/skills/ without running the symlink synchronization script, the pre-commit hook alerts the developer immediately:

# Add to .git/hooks/pre-commit
bash scripts/verify-skill-resolution.sh

Executing this check takes less than 20 milliseconds, providing instant feedback without slowing down local Git commit workflows.

Cross-Model Prompt Evaluation Suite

Beyond verifying filesystem resolution, engineering teams should validate that different frontier models interpret the skill instructions consistently. Formulate an automated evaluation test bench with three canonical prompt scenarios:

  1. A Direct Trigger Query: Submit an explicit request matching your frontmatter description to verify that Claude Code, Codex, and Gemini all acknowledge the skill.
  2. A Constraint Enforcement Query: Prompt the agent to refactor code while deliberately introducing a pattern prohibited by the skill (such as missing type annotations) to verify that the model rejects the violation.
  3. An Edge-Case Query: Submit an ambiguous request to confirm that the agent asks clarifying questions rather than executing unauthorized file writes.

Frequently Asked Questions About Portable Agent Skills

Can OpenAI Codex CLI read skills written for Claude Code?

Yes, because Codex CLI supports the open Agent Skills specification and parses standard SKILL.md YAML frontmatter. By placing the skill in .codex/skills/ or linking to .agents/skills/, Codex discovers and invokes the instructions identically.

Do I need to maintain separate skill folders for each developer tool?

No, maintaining separate folders creates documentation drift and doubles maintenance overhead. Creating a single authoritative .agents/skills/ directory and symlinking it across tool-specific paths ensures every agent executes identical procedures.

How do tool permissions differ between Claude Code and Gemini CLI?

Claude Code prompts for user approval before executing unknown shell commands, whereas Gemini CLI uses policy-based sandboxing and workspace whitelisting. Skills should structure commands as standard POSIX shell calls without assuming root privileges.

Does GitHub Copilot support supporting files like scripts and references?

Yes, GitHub Copilot resolves relative paths inside a skill folder, allowing it to inspect files in references/ and run helpers in scripts/. Keep directory structures shallow to ensure fast resolution during active workspace turns.

On Windows systems that disallow unprivileged symlinks, Git may check out symlinks as plain text files containing the target path. In these scenarios, configure Git with core.symlinks true or use native directory junctions via mklink /J to maintain transparent directory resolution.

How do frontier models differ when following procedural steps in SKILL.md?

While frontier models like Claude Sonnet 5.5 and GPT-6.1 Sol adhere tightly to numbered sequential steps, smaller models may skip intermediate validation phases if instructions are ambiguous. Structuring runbooks with explicit pre-conditions and deterministic markdown output schemas ensures uniform execution fidelity across all models.

Agent Skills SKILL.md Claude Code OpenAI Codex GitHub Copilot Gemini CLI Tutorials

Found this helpful? Share it with others.

Raj, Founder, AI Agents Kit at AI Agents Kit

Raj

Founder, AI Agents Kit

Raj is the founder of AI Agents Kit, where he writes hands-on guides on AI agents, agent frameworks, Model Context Protocol (MCP), prompt engineering and developer tooling. He builds and tests the tools he covers and focuses on practical, working examples for developers and teams adopting agentic AI.

AI Agents LLMs Prompt Engineering Python TypeScript