Back to Resources
Multi-Agent Platform & Architecture BlueprintLast Updated: Published October 21, 2026

One Cross-Agent Skill Library Across Claude Code, Codex, Cursor, and Antigravity

A cross-agent skill library establishes a single, version-controlled source of truth for your agent instructions, workflows, and prompts across Claude Code, OpenAI Codex, Cursor, and Google Antigravity. By mapping modular YAML frontmatter skills into native runtime paths, you eliminate manual rule translation, prevent instruction drift, and ensure your developer setup follows you across every workspace.

Unified Library
Multi-Agent Parity
Instant Sync

Tired of rewriting rules across Claude Code, Codex, Cursor, and Antigravity? Build one cross-agent skill library that syncs seamlessly across every tool.

Why Do Modern Engineering Teams Need a Cross-Agent Skill Library?

Modern software engineers do not use a single AI coding tool; they use three or four specialized runtimes depending on task complexity and workspace context. A typical daily developer workflow employs Cursor for real-time code completion, Claude Code in terminal windows for multi-file agentic refactoring, OpenAI Codex for automated background scripting, and Google Antigravity for orchestrating multi-agent system workflows. Without a centralized cross-agent skill library, each assistant operates in complete isolation, requiring engineers to manually author, convert, and update identical engineering rubrics in four separate directory locations.

A cross-agent skill library prevents instruction drift by generating runtime-native configuration files in Claude Code, OpenAI Codex, Cursor, and Google Antigravity from a single version-controlled repository. When an engineering team updates an authentication boundary checklist or a database migration rubric, that update propagates instantly to all local agent folders. Instead of managing divergent dotfiles across workstations, developers maintain a canonical library that compiles into runtime-compliant formats on demand.

According to official documentation from Anthropic Claude Code and the Cursor AI Rules documentation, each runtime uses distinct metadata formats to trigger context loading. Cursor explicitly notes: “Rules allow you to provide custom instructions that Cursor will always follow when generating code.” However, when team guidelines are hardcoded into static repository files like .cursorrules, they consume between 2,000 and 8,000 tokens of context window overhead on every query, regardless of task relevance. A modular cross-agent architecture solves this context tax by decoupling execution instructions into discrete, discoverable skill packages.

Runtime Comparison: How Claude Code, Codex, Cursor, and Antigravity Store Skills

Each AI coding runtime enforces distinct file locations, frontmatter parsers, and execution trigger mechanics. The comparison matrix below outlines the exact architectural specifications required to bridge all four environments:

Agent RuntimeNative Filesystem PathFormat & FrontmatterTrigger & Dispatch MechanismContext Overhead
Claude Code~/.claude/skills/<name>/SKILL.mdYAML 1.2 frontmatter (name, description)Semantic intent matching on description (<1,024 chars)~150 tokens indexed; full skill loaded on trigger
OpenAI Codex~/.codex/skills/ or AGENTS.mdMarkdown with YAML metadata or MCP tool resourcesSession prompt preamble or Model Context Protocol tool callDynamic on MCP; static if loaded in preamble
Cursor.cursor/rules/*.mdcMDC frontmatter (description, globs, alwaysApply)File glob match, manual @-mention, or composer intent2,000–8,000 tokens if alwaysApply=true
Google Antigravity~/.gemini/antigravity/skills/Modular SKILL.md bundles or declarative workflow YAMLAutonomous agent skill discovery & subagent routingScoped per subagent task boundary

Monolithic repository rules inject up to 8,000 tokens of unneeded context into every LLM query, whereas modular SKILL.md packages allow agents to dynamically load execution instructions only when relevant keywords are detected. Managing these differences by hand leads to syntax errors, broken glob matching, and silent rule failures across developer workstations.

How Do Skill Formats Differ Across Agent Runtimes?

The core instructional text of a coding rubric remains identical across tools, but the enclosing metadata determines whether an agent executes the workflow or ignores it completely. Claude Code requires a concise description block optimized for embedding-based intent matching, Cursor uses glob expressions to target specific file extensions, and Google Antigravity packages multi-file references alongside autonomous tools.

Claude Code matches skills dynamically based on description semantics in YAML frontmatter, whereas Cursor prioritizes file path glob patterns defined inside .cursor/rules metadata. Below is a worked example demonstrating how a single database migration workflow is adapted across three distinct runtime formats:

1. Canonical Claude Code SKILL.md

In Claude Code, the skill resides in ~/.claude/skills/migrate-db/SKILL.md. The frontmatter description must remain strictly under 1,024 characters to prevent index truncation during CLI startup:

---
name: migrate-db
description: Execute and verify production database migrations. Use when modifying SQL schemas, applying Prisma or Drizzle migrations, validating rollback scripts, or checking foreign key constraints.
---

# Production Database Migration Protocol

Validate safety boundaries before altering persistent state:
1. Generate migration diff against target schema: `pnpm drizzle-kit generate`
2. Verify that non-nullable columns specify default values or backfill plans.
3. Confirm rollback migration script exists and executes cleanly in test container.
4. Run integration dry-run: `DATABASE_URL=$TEST_DB pnpm drizzle-kit migrate`
5. Output structured migration manifest with estimated lock duration and table impact.

2. Cursor Modular Project Rule (.cursor/rules/migrate-db.mdc)

In Cursor, the same procedure is compiled into .cursor/rules/migrate-db.mdc, replacing semantic dispatch with glob filtering over migration directories:

---
description: Database migration safety checks and rollback verification
globs: "packages/db/migrations/**/*.sql,packages/db/schema.ts"
alwaysApply: false
---

# Database Migration Guidelines

When writing or altering database schema files:
- Never execute destructive DROP TABLE or ALTER COLUMN operations without an explicit two-phase migration plan.
- Check lock timeouts on high-traffic tables before altering indexes concurrently.
- Run local migration validation: `pnpm db:migrate:verify` before committing.

3. Google Antigravity Skill Definition (~/.gemini/antigravity/skills/migrate-db/SKILL.md)

Google Antigravity reads modular skills from ~/.gemini/antigravity/skills/migrate-db/SKILL.md, pairing the core rubric with declared subagent capabilities and workspace permission bounds. For detailed subagent orchestration, review our architectural comparison on Antigravity workflows vs Claude Code subagents.

The Sprawl Moment: When Your Best Workflow Is Trapped in Another Tool

The sprawl moment strikes when you spend a full Tuesday engineering a 15-step database migration checklist with dry-run safety verification inside Claude Code at ~/.claude/skills/migrate-db/SKILL.md. Later that afternoon, you switch to Cursor to debug an urgent schema issue in a monorepo backend service, and ask the agent to verify your migration steps against production constraints. Cursor has no knowledge of your skill; it hallucinates an unchecked DROP TABLE migration strategy because your instructions were trapped in a tool-specific folder on a different path. You pivot to a remote Linux workstation running Google Antigravity to check the CI pipeline, only to realize the workflow definition does not exist there either. You find yourself spending twenty minutes manually copying, reformatting YAML, and tweaking glob filters across three different configuration syntaxes instead of shipping code.

How Do You Build an Automated Cross-Agent Synchronization Script?

To bridge disparate agent environments without third-party tooling, engineering teams can implement a centralized Git repository that compiles canonical skills into tool-specific target paths. A robust synchronization script must validate YAML frontmatter, extract Markdown procedural instructions, and deploy runtime-specific headers to local configuration folders.

Below is a production-ready POSIX shell script (sync-cross-agent-skills.sh) that reads from a central ~/Developer/ai-skills-library/ directory and distributes instructions into Claude Code, Codex, Cursor, and Antigravity:

#!/usr/bin/env bash
# sync-cross-agent-skills.sh: Sync canonical AI skills into 4 agent runtimes
set -euo pipefail

CANONICAL_DIR="$HOME/Developer/ai-skills-library"
CLAUDE_DIR="$HOME/.claude/skills"
CODEX_DIR="$HOME/.codex/skills"
ANTIGRAVITY_DIR="$HOME/.gemini/antigravity/skills"
CURSOR_DIR="$PWD/.cursor/rules"

mkdir -p "$CLAUDE_DIR" "$CODEX_DIR" "$ANTIGRAVITY_DIR"

echo "=== Synchronizing Cross-Agent Skill Library ==="

for skill_folder in "$CANONICAL_DIR"/*/; do
    [ -d "$skill_folder" ] || continue
    skill_name=$(basename "$skill_folder")
    canonical_file="$skill_folder/SKILL.md"

    if [ ! -f "$canonical_file" ]; then
        echo "Skipping $skill_name: missing SKILL.md"
        continue
    fi

    # 1. Sync directly into Claude Code native skill directory
    mkdir -p "$CLAUDE_DIR/$skill_name"
    cp -u "$canonical_file" "$CLAUDE_DIR/$skill_name/SKILL.md"

    # 2. Sync into OpenAI Codex skill directory
    mkdir -p "$CODEX_DIR/$skill_name"
    cp -u "$canonical_file" "$CODEX_DIR/$skill_name/SKILL.md"

    # 3. Sync into Google Antigravity skill directory
    mkdir -p "$ANTIGRAVITY_DIR/$skill_name"
    cp -u "$canonical_file" "$ANTIGRAVITY_DIR/$skill_name/SKILL.md"

    # 4. Generate Cursor MDC if in a project repository
    if [ -d "$PWD/.cursor" ]; then
        mkdir -p "$CURSOR_DIR"
        cat <<EOF > "$CURSOR_DIR/$skill_name.mdc"
---
description: Auto-generated from canonical skill: $skill_name
globs: "**/*"
alwaysApply: false
---

$(tail -n +8 "$canonical_file")
EOF
    fi

    echo "✓ Synced skill: $skill_name across all runtimes"
done

echo "Sync completed successfully across Claude, Codex, Cursor, and Antigravity."

While custom shell scripts offer a baseline solution, they suffer from critical limitations in team environments: symlinks break across Windows and macOS, Git worktrees fail to track untracked local folders, and shell parsers cannot perform intelligent bidirectional synchronization when rules are updated directly inside an IDE. For multi-repo guidance, see our analysis on syncing AGENTS.md across Git worktrees.

How Prompttly Solves Cross-Agent Skill Sync and Instant Retrieval

Prompttly eliminates the maintenance overhead of homegrown shell scripts by serving as the centralized skill manager for modern AI coding workflows.

Prompttly is a skill manager for AI agents — one library for your skills and prompts that syncs into Claude Code, Codex, ChatGPT, and Claude and is one hotkey away on your Mac, so your setup follows you across every machine, repo, and tool.

Prompttly's native Mac hotkey palette provides global access to your entire cross-agent skill library in under 200ms across any IDE, terminal emulator, or web browser. Instead of writing custom translation scripts, Prompttly provides:

  • Automated Two-Way Sync: Edits made in your local ~/.claude/skills or .cursor/rules directories synchronize automatically back to your cloud library, preventing local configuration divergence.
  • Cross-Platform Parity: Synchronize your workflows seamlessly between your work MacBook, home desktop, and remote Linux development environments without path breakage or symlink failures.
  • Model Context Protocol (MCP) Integration: Connect your skill library directly to Cursor, Claude Desktop, and Antigravity via standard Model Context Protocol endpoints with real-time write permissions.
  • Global Hotkey Access: Summon any prompt, rubric, or code generation template into any application on your Mac using a single configurable keystroke. Learn more about inserting prompts without copy-paste.

To author production-ready skills with validated YAML frontmatter, use our free Claude Skill Creator. If you need conversational preambles optimized for ChatGPT and Claude, try our free Custom Instructions Generator or refine prompt clarity with the Prompt Optimizer.

Frequently Asked Questions About Cross-Agent Skill Libraries

Can you use the exact same SKILL.md file across Claude Code, Cursor, and Antigravity?

While the Markdown instructions are universally compatible, the frontmatter schemas differ between runtimes. Claude Code and Codex parse YAML 1.2 frontmatter with name and description keys for semantic dispatch, whereas Cursor utilizes .cursor/rules/*.mdc with globs and alwaysApply boolean flags, and Google Antigravity parses skill bundles under ~/.gemini/antigravity/skills. A cross-agent skill library maintains a canonical definition and generates runtime-native metadata for each tool.

How do you prevent duplicate token consumption when running multiple AI coding agents in the same repository?

To prevent duplicate token consumption, avoid pasting repetitive guidelines into root AGENTS.md, CLAUDE.md, and .cursorrules simultaneously. Restrict root configuration files to high-level project invariants under 500 tokens, and convert detailed operational workflows into modular skills that agents only load on demand when matching task descriptions or file patterns.

What is the performance overhead of using symlinks to share skills between Claude Code and Codex?

Filesystem symlinks introduce zero runtime latency on POSIX systems, but they frequently break across operating systems (such as Windows NTFS vs macOS APFS), fail to track in Git worktrees, and cannot handle runtime-specific metadata transformations between Cursor MDC and Claude SKILL.md files. A dedicated synchronization pipeline or skill manager provides safer bidirectional parity.

How does Claude Code discover skills compared to Cursor project rules?

Claude Code indexes skills dynamically by reading the description field in SKILL.md frontmatter against the user prompt intent, subject to a 1,024-character description limit. Cursor uses both glob matching against active editor file paths and manual @-mentions in the composer to determine which .cursor/rules documents to inject into context.

Where to Go Next

Explore our extensive library of cross-agent architectures and workflow synchronization guides on the resources hub. For deep dives into specific assistant ecosystems, review our guides on:

Ready to make your skills portable everywhere? Download the Prompttly Mac App or view our team plans to start synchronizing your workflows today.

Maintain one synchronized skill library for every AI agent

Stop copying rules between ~/.claude/skills, .cursor/rules, and AGENTS.md. Prompttly unifies your skills in one cloud library, syncs natively to your local filesystem, and provides sub-200ms hotkey insertion across your entire Mac.