agentleFS
SnakeOSnakeO/claude-co-commands/CLAUDE.md

claude-co-commands

CLAUDE.md148 starsChanged 2 months agoMITView on GitHub

A Claude Code plugin (snakeo-co-commands) providing three collaboration skills that use OpenAI's Codex as a second opinion, through the Codex CLI. No compiled code and no build steps: Markdown skill definitions, JSON config, and one small shell helper. Skill discovery: plugin.json uses "skills": ["./skills/*"] — any subdirectory with a SKILL.md is auto-registered. SKILL.md format: YAML frontmatter (name, description) followed by Markdown instructions that Claude Code follows when the skill is invoked. All three skills follow the same anti-bias pattern: 1.…

The file

We split this CLAUDE.md into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    All three skills follow the same anti-bias pattern:

    line 28
  2. Very specific:

    Only after finishing, the agent asks Codex to present (codex-session reply) and compares.

    line 39
  3. Very specific:

    Test with a real session (skills load from a folder with claude --plugin-dir plugins/co-commands).

    line 58

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

What This Is

A Claude Code plugin (snakeo-co-commands) providing three collaboration skills that use OpenAI's Codex as a second opinion, through the Codex CLI. No compiled code and no build steps: Markdown skill definitions, JSON config, and one small shell helper.

Architecture

.claude-plugin/marketplace.json   ← marketplace registration (name, version, plugin refs)
plugins/co-commands/
  plugin.json                     ← plugin definition (auto-discovers skills via glob)
  scripts/codex-session           ← drives `codex exec` (new / run / read / reply)
  skills/
    co-brainstorm/SKILL.md        ← interactive brainstorming
    co-plan/SKILL.md              ← parallel plan generation
    co-validate/SKILL.md          ← staff engineer plan review

Skill discovery: plugin.json uses "skills": ["./skills/*"] — any subdirectory with a SKILL.md is auto-registered.

SKILL.md format: YAML frontmatter (name, description) followed by Markdown instructions that Claude Code follows when the skill is invoked.

Core Design Pattern: Prevent Bias

All three skills follow the same anti-bias pattern:

  1. The agent writes Codex's first message into a session folder (codex-session new), then spawns a background subagent that runs it (codex-session run). The prompt tells Codex to ask any clarifying questions first, and otherwise reply only with a skill-specific ready phrase:
    • co-brainstorm: "My brainstorming is complete and I'm ready to present"
    • co-plan: "My plan is ready to present"
    • co-validate: "My review is complete and I'm ready to present"
  2. The subagent answers Codex's clarifying questions (codex-session reply) until Codex says it is ready, then reports back without requesting Codex's work.
  3. Meanwhile the agent does its own independent work (brainstorming/planning/reviewing).
  4. Only after finishing, the agent asks Codex to present (codex-session reply) and compares.

This prevents the agent from being influenced by Codex's response before forming its own perspective.

Codex Integration (CLI, since 2.0.0)

The skills used to call the Codex MCP server (codex mcp-server, wrapped as the validate-plans-and-brainstorm-ideas server). OpenAI removed that command in Codex 0.154.0 (openai/codex#42993), so 2.0.0 drives the CLI instead through scripts/codex-session:

  • new <label> makes a temp session folder; run <dir> sends <dir>/prompt.md with codex exec --json --sandbox read-only and saves the reply and the thread id
  • reply <dir> continues the thread with codex exec resume <thread id>, kept read-only with -c 'sandbox_mode="read-only"' (exec resume has no --sandbox flag)
  • read <dir> prints the latest reply

Prompts always go on stdin: nothing needs escaping, and codex exec otherwise waits on stdin when it is not a terminal. Skills reference the helper as <base directory>/../../scripts/codex-session.

Test with a real session (skills load from a folder with claude --plugin-dir plugins/co-commands). claude -p kills background tasks when it exits, so a one-shot headless run never sees the subagent finish; test the full flow in an interactive session.

Versioning

Always bump the version when making changes. Version must be updated in three places and kept in sync:

  1. .claude-plugin/marketplace.json → metadata.version
  2. .claude-plugin/marketplace.json → plugins[0].version
  3. plugins/co-commands/plugin.json → version

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.