Use Composer with Claude Code and Codex
Composer runs coding sessions through Claude Code or Codex. Select both as targets in agnostic-ai so both providers share one set of project instructions, rules, and skills. Composer passes the project directory to the provider, which loads its native files.
This guide was checked against the Composer CLI 0.1.12 source. Release downloads were unavailable, so packaged runtime behavior and signed-in sessions were not tested.
Prepare the project
Install agnostic-ai. Install Composer through its official project, then install and sign in to the providers you use: Claude Code and Codex.
Work from your project root. Create agnostic-ai.yaml, or add both targets to your existing list:
targets: [claude, codex]
Keep existing provider files
Before the first sync, import any existing Claude Code or Codex configuration:
agnostic-ai import claude codex --dry-run --diff
agnostic-ai import claude codex
Compare the imported .agnostic-ai/ sources with the original files and resolve differences before syncing. Skip this step in a fresh project. See how imports from several tools merge instructions.
Write the shared sources
mkdir -p .agnostic-ai/rules .agnostic-ai/skills
Add a project note to .agnostic-ai/AGNOSTIC_AI.md, keeping imported text:
When summarizing a change, name the files you inspected.
Save this rule as .agnostic-ai/rules/commit-subjects.md:
---
name: commit-subjects
description: Use the team's commit subject prefixes.
alwaysApply: true
---
Start suggested commit subjects with fix:, feat:, docs:, or chore:.
Save this skill as .agnostic-ai/skills/change-summary.md:
---
name: change-summary
description: Summarize a supplied change. Use when asked for a change summary.
---
1. State the effect a user sees.
2. Suggest a commit subject.
3. List the checks performed, or say that no checks were run.
For more fields, use the rules and skills references.
Generate and inspect
The first sync can replace imported files. --backup keeps the originals as .bak files.
agnostic-ai lint
agnostic-ai sync --plan --backup
Review the plan, then generate and check:
agnostic-ai sync --backup
agnostic-ai sync --check
| Provider | Files to inspect |
|---|---|
| Claude Code | CLAUDE.md, .claude/rules/commit-subjects.md, .claude/skills/change-summary/SKILL.md |
| Codex | AGENTS.md, .agents/skills/change-summary/SKILL.md |
The note appears in both CLAUDE.md and AGENTS.md. Codex gets the rule inside AGENTS.md.
For later changes, edit .agnostic-ai/ and sync again. Home instructions and skills use global configuration. Additional settings, hooks, agents, and MCP servers keep their Claude Code or Codex mappings.
Check each provider in Composer
From the project root, start one session per provider:
composer run --provider claude --permission-mode default 'Use the change-summary skill for this supplied change: a broken documentation link was fixed. Read the project instructions first. Do not edit files.'
composer run --provider codex --permission-mode default 'Use the change-summary skill for this supplied change: a broken documentation link was fixed. Read the project instructions first. Do not edit files.'
Each answer should have a fix: or docs: subject, the skill's three steps, and inspected filenames that match the generated files above. sync --check proves the files match their sources; this session check proves the installed provider loads and follows them.
Composer's run command defaults to Full access in 0.1.12, and its permission mode can override provider configuration, so keep --permission-mode default. A noninteractive run stops when approval is required; to answer approvals, use composer tui and review the provider and permission mode there.
Composer's skill catalog scans global provider skill folders and the Codex plugin cache, not project skill folders, and selecting a skill in the TUI shows a notice instead of running it. Ask the provider to use the project skill, as above.