Avoiding lock-in: portable context, skills and pipelines
PLVendor lock-in with coding agents accumulates inside harness configuration rather than application code. AGENTS.md, Agent Skills (SKILL.md), MCP servers, Markdown specs, and multi-agent evals move cleanly across Claude Code, Codex, and Cursor, while cloud setups, review bots, hooks, and managed policy stay behind—so keep core logic in Git and rehearse exit quarterly.
A year ago your company standardized on one coding agent. Teams built 40 custom skills, tuned a vendor review bot, configured cloud-agent build forms in a web console, and wrote vendor-specific secret hooks. Now a competing model leads your evals and your vendor repriced seats twice. The board asks a fair question: what does it actually cost to switch, and how do we prove it? This guide gives CTOs and executives a portability inventory, a feature-adoption decision table, and a timed exit rehearsal.
What travels across vendors versus what stays behind
Section titled “What travels across vendors versus what stays behind”Five open or repository-native assets move cleanly between Claude Code, Codex, and Cursor when structured properly:
| Portable asset | Open standard or format | Portability trap to prevent |
|---|---|---|
| Project instructions | AGENTS.md (Linux Foundation / Agentic AI Foundation) | Having both AGENTS.md and an independent CLAUDE.md causes silent drift; start CLAUDE.md with @AGENTS.md so one file remains the single source of truth |
| Reusable skills | Agent Skills (SKILL.md folders; see skills.wondel.ai) | Format travels while default folder paths differ across tools; keep canonical skills synced and self-contained without hidden plugin-hook dependencies |
| Tool connections | Model Context Protocol (MCP) | Servers travel while registration files differ (.mcp.json vs .codex/config.toml vs .cursor/mcp.json); keep server names identical and test protocol negotiation across clients |
| Specs & decisions | Plain Markdown (docs/specs/, docs/adr/, acceptance criteria) | Portable as long as decisions live in Git rather than vendor-hosted project notebooks |
| Tests, CI gates & evals | Repository CI + multi-provider eval suite | Calling a single vendor’s proprietary SDK directly or gating merges on one vendor’s review bot reintroduces lock-in |
Six valuable features stay behind on exit. Use them freely, yet keep their substance in Git so migration becomes re-registration instead of a rewrite:
| Vendor-bound feature | How to keep exit cheap |
|---|---|
| Cloud-agent environments | Store setup steps in one scripts/agent-setup.sh; vendor UI forms only invoke that script |
| Review bots (Claude Code Review, Codex Review, Cursor Bugbot) | Store house review rules in one versioned Markdown file referenced by every bot; keep merge blocking in your own required CI checks |
| Lifecycle hooks | Put hook logic in repository scripts (scripts/guard-secrets.sh); each tool’s hook config is a thin 3-line adapter |
| Plugin packaging | Package open SKILL.md skills and MCP definitions cleanly so plugin manifests remain thin distribution wrappers |
| Managed policy & permissions | Maintain one tool-neutral intent table (POLICY.md) compiled per tool (managed policy) |
| Vendor memory & chat history | Fold durable architectural lessons back into AGENTS.md and ADRs as part of definition of done |
Decision table: how much lock-in is worth accepting?
Section titled “Decision table: how much lock-in is worth accepting?”Apply this rubric whenever a squad proposes adopting a vendor-specific capability:
| Feature characteristic | Default decision | Condition keeping exit cheap | Executive audit question |
|---|---|---|---|
Reads open Git formats (AGENTS.md, SKILL.md, MCP) | Adopt | Enforced by CI portability check | “Is the source file committed in Git?” |
| Wraps repo scripts (plugin, hook adapter, cloud bootstrap) | Adopt | Wrapper holds zero unique business logic | “How many adapter lines would we rewrite?” |
| Stores rules or memory solely in vendor UI/cloud | Adopt with export | Automated scheduled export to Git tested in exit drill | “Have we verified exporting it this quarter?” |
| Acts as a merge or release gate | Advise only | Own CI checks and human approvers hold authority | “Can we ship if this vendor goes down tomorrow?” |
| Requires one vendor-only model in production pipelines | Adopt with fallback | Tested secondary model passing the same eval suite (models hub) | “When did we last run our degraded fallback?” |
The portable repository layout
Section titled “The portable repository layout”Standardize this structure across repositories so switching primary tools never disrupts daily engineering:
repo/├── AGENTS.md # Single source of truth for all coding agents├── CLAUDE.md # Line 1: @AGENTS.md (plus minimal Claude-only notes)├── .cursor/rules/*.mdc # Path-scoped Cursor rules referencing shared invariants├── .agents/skills/ # Canonical Agent Skills (SKILL.md)├── .mcp.json & .codex/ # Matching project MCP server names (no plaintext tokens)├── docs/specs/ & docs/adr/ # Versioned specifications, review rules, and decisions├── evals/ # Golden tasks runnable against multiple agent providers└── scripts/ ├── agent-setup.sh # Single bootstrap called by every cloud environment └── guard-secrets.sh # Core logic called by thin tool-specific hook adaptersKeep tool registration, import utilities, and rules synchronization aligned with official vendor documentation for Claude Code, OpenAI Codex, and Cursor. Consider a rule-sync generator once three or more distinct agent clients require synchronized rules and MCP setups; see agent frameworks for trade-offs.
Verifying portability continuously—and running exit rehearsals
Section titled “Verifying portability continuously—and running exit rehearsals”Portability decays one convenient shortcut at a time. Prove switching remains cheap with three mechanical checks:
- Run automated portability & harness checks in CI. Fail PRs when
CLAUDE.mdforks away from@AGENTS.md, when mirrored skill directories diverge, or when MCP server names drift between tools. Pair this withnpx @wondelai/harness-audit --cito verify Station 1 (Intent) single-source compliance and Station 2 (Harness) hygiene automatically (check reference). - Run monthly multi-agent evals. Execute your
evals/golden tasks against both your primary and secondary coding agents (keeping task definitions in plain files so even the eval runner is swappable). A widening pass-rate gap warns early that prompts or rules have drifted toward one vendor’s quirks. - Execute a quarterly one-day exit rehearsal. Pick one squad (3–5 engineers) and 2–3 standard backlog items touching MCP servers and skills. Freeze the primary tool for one workday, build strictly from Git and documented setup commands in the secondary agent, log every minute spent rebuilding vendor wrappers, attempt exporting vendor-held rules/memory, and deliver through normal unchanged CI gates.
Exit rehearsal pass criteria: (1) every attempted task merges through unchanged required CI gates; (2) environment and tool setup takes under half a working day; (3) the secondary agent meets your pre-agreed eval pass-rate tolerance; (4) zero merge or release gates depend on the primary vendor’s bot. Every manually rebuilt item enters the platform team backlog, and the CTO shares setup minutes and remaining gaps with executives ahead of contract renewals.
Failure modes when switching coding agents and recovery
Section titled “Failure modes when switching coding agents and recovery”- The secondary tool ignores repository instructions. Recovery: Keep
AGENTS.mdcanonical, startCLAUDE.mdwith@AGENTS.md, and enforce synchronization via CI drift checks andnpx @wondelai/harness-audit. - Shared skills load without triggering. Recovery: Avoid coupling skills to vendor-specific session-start hooks; keep
SKILL.mddescriptions crisp and add a smoke task to multi-agent evals verifying invocation. - MCP servers work in one client and fail in another. Recovery: Standardize server names across configs, test every new MCP server in both primary and secondary clients before allowlisting, and verify protocol compatibility.
- Review coverage disappears silently after dropping a vendor bot. Recovery: Move criteria into a Git-versioned review guide, rely on required CI checks and evidence bundles, and treat review bots as replaceable advisors.
- Cloud agents fail to build the repo on a new vendor. Recovery: Move every install and database-seed step out of vendor web consoles into
scripts/agent-setup.sh.
Official docs and next steps
Section titled “Official docs and next steps”- Open standards & vendor references: Agent Skills · Skills Catalogue · MCP · Claude Code · OpenAI Codex · Cursor
Did this guide help you?
One tap, no sign-in.
What will you do with it?
How did it read?
What got in the way? Pick any that apply
Your role?
Thanks. I read every answer. Michał Jaskólski
Did this guide help?
One tap each. Close whenever you like.
no sign-in
Frequently asked questions
Which coding-agent assets transfer cleanly across Claude Code, Codex, and Cursor?
Repository instructions in AGENTS.md, Agent Skills (SKILL.md folders), MCP servers, Markdown specifications and ADRs, and CI verification suites transfer across tools with minimal or zero rewriting.
Which parts of a coding-agent setup create vendor lock-in?
Proprietary cloud environment forms, vendor review bots acting as merge gates, tool-specific hook schemas, plugin manifests, managed policy files, and vendor-hosted session memory stay behind unless backed by repository scripts and Git-versioned criteria.