Skip to content

Latest commit

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Meta Plugin

Meta-operations for managing AI prompts, extracting reusable workflows from sessions, and maintaining parity between Claude Code and Codex CLI.

What This Plugin Is For

This plugin is designed for a Claude Code + Codex CLI dual-tool workflow. The core assumption is:

  • Claude Code is the canonical source for plugin content (commands, skills, scripts)
  • Codex CLI receives a one-way sync of that content
  • You author everything in Claude Code plugins, then sync to Codex

If you use both tools, this plugin provides:

  1. Workflow extraction — Extract reusable patterns from past sessions into commands, skills, or hooks
  2. Plugin content authoring — Quality patterns and guidance for creating production-ready plugin content
  3. Sync infrastructure — Scripts to keep Claude and Codex in parity

Quick Start

Install

/plugin install github:rawr-ai/plugin-meta

Key Commands

CommandPurpose
/meta:extract-workflowExtract workflow patterns from past sessions into reusable artifacts
/meta:create-skillCreate a canonical skill with references/assets following quality patterns
/meta:manage-promptsCRUD operations for plugin content with Claude↔Codex parity

Key Skills

SkillPurpose
workflow-extractorGuidance for analyzing conversations to identify patterns, invariants, decision points
plugin-contentQuality patterns for authoring commands, skills, scripts
disambiguationPatterns for handling ambiguity and presenting options
mental-mapPatterns for navigating complex domains without getting lost

Architecture Overview

┌─────────────────────────────────────────────────────────────┐
│ Meta Plugin │
├─────────────────────────────────────────────────────────────┤
│ │
│ Commands Skills │
│ ┌─────────────────────┐ ┌─────────────────────────┐ │
│ │ extract-workflow │────▶│ workflow-extractor │ │
│ │ create-skill │────▶│ plugin-content │ │
│ │ manage-prompts │ │ disambiguation │ │
│ └─────────────────────┘ │ mental-map │ │
│ │ └─────────────────────────┘ │
│ ▼ │
│ Scripts │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ extract_session.py — Read Claude/Codex sessions │ │
│ │ sync_to_codex.py — One-way sync to Codex │ │
│ │ sync_from_codex.py — Reverse sync (deprecated) │ │
│ │ sync_status.py — Check sync drift │ │
│ │ sync_utils.py — Shared utilities │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘

Directory Layout (Assumed)

The commands assume this layout:

~/.claude/
├── plugins/
│ └── local/
│ └── plugins/ # Your local plugin marketplace
│ ├── meta/ # This plugin
│ ├── dev/ # Other plugins...
│ └── .../
└── projects/ # Claude Code session storage
~/.codex/
├── prompts/ # Synced commands (flat)
├── skills/ # Synced skills (by name)
├── scripts/ # Synced scripts (prefixed)
├── plugins/
│ └── registry.json # Declarative sync index
└── sessions/ # Codex session storage

Sync Workflow

Direction: Claude → Codex (One-Way)

Claude Code plugins are canonical. Codex receives a mirror.

# Preview what would sync
python3 ~/.claude/plugins/local/plugins/meta/scripts/sync_to_codex.py --dry-run
# Apply sync
python3 ~/.claude/plugins/local/plugins/meta/scripts/sync_to_codex.py
# Clean up orphaned files in Codex
python3 ~/.claude/plugins/local/plugins/meta/scripts/sync_to_codex.py --gc

Structure Mapping

Claude CodeCodex CLINotes
plugins/*/commands/*.md~/.codex/prompts/*.mdFlat directory
plugins/*/skills/<name>/~/.codex/skills/<name>/Preserves skill structure
plugins/*/scripts/*~/.codex/scripts/<plugin>--<file>Prefixed to avoid collisions

Adapting to Your Setup

This plugin is not yet fully tuned for Claude-only or Codex-only users, but you can adapt it.

For Claude-Only Users

If you only use Claude Code (no Codex CLI), here's what's relevant and what to skip:

Use as-is:

  • /meta:extract-workflow — Works fully; extracts from Claude sessions
  • All skills — workflow-extractor, plugin-content, disambiguation, mental-map
  • scripts/extract_session.py — Reads Claude sessions (Codex parts gracefully ignored)

Skip or adapt:

  • scripts/sync_*.py — Not relevant without Codex
  • Sync steps in commands — You'll see references to sync_to_codex.py; just skip these steps

Adapting /meta:create-skill:

The command has hardcoded paths like ~/.claude/plugins/local/plugins/<plugin>/. If your plugins live elsewhere, edit the command or run it and manually adjust paths in your head.

The sync step at the end:

python3 ~/.claude/plugins/local/plugins/meta/scripts/sync_to_codex.py --dry-run

Just skip this step entirely if you don't use Codex.

Adapting /meta:manage-prompts:

Same idea. The command assumes the marketplace layout and includes sync steps. Use the core workflow (create/update content) and skip the Codex sync parts.

For Codex-Only Users

If you only use Codex CLI (no Claude Code), the adaptation is more significant:

Use as-is:

  • All skills — They're pure methodology, no tool-specific coupling
  • scripts/extract_session.py — Works for Codex sessions

What won't work directly:

  • The commands assume Claude Code's plugin structure
  • Sync scripts go the wrong direction for you

Adaptation approach:

  1. Copy the skills you want into ~/.codex/skills/:

    cp -r meta/skills/workflow-extractor ~/.codex/skills/
    cp -r meta/skills/plugin-content ~/.codex/skills/
    # etc.
  2. Copy commands you want into ~/.codex/prompts/:

    cp meta/commands/extract-workflow.md ~/.codex/prompts/
  3. Edit paths in the copied files to reference ~/.codex/ instead of ~/.claude/plugins/local/plugins/

  4. The sync scripts aren't relevant for Codex-only; skip them.

DIY / At Your Own Risk

These adaptation paths are not officially supported. The default, documented path is Claude + Codex together. If you're adapting for one tool only:

  • Read the source files to understand what they assume
  • Adjust paths and skip irrelevant steps as needed
  • File issues or contribute improvements if you find good patterns

Session Extraction

The extract_session.py script reads session transcripts from both Claude Code and Codex CLI:

# List recent sessions (both sources)
python3 scripts/extract_session.py --list --table --limit 20
# List only Claude sessions
python3 scripts/extract_session.py --list --source claude --table
# List only Codex sessions
python3 scripts/extract_session.py --list --source codex --table
# Extract a session by ID
python3 scripts/extract_session.py <session-id> --format text
# Extract with markdown formatting
python3 scripts/extract_session.py <session-id> --format markdown

Session Storage Locations

SourceLocation
Claude Code~/.claude/projects/<encoded-project>/<session-id>.jsonl
Codex (current)~/.codex/sessions/YYYY/MM/DD/rollout-<date>-<session-id>.jsonl
Codex (archived)~/.codex/archived_sessions/rollout-<date>-<session-id>.jsonl

Skills Reference

workflow-extractor

Guidance for analyzing conversations to identify:

  • Sequential patterns
  • Invariants (always-true constraints)
  • Decision points
  • Quality gates
  • Implicit agreements

Use with /meta:extract-workflow or load directly when analyzing sessions.

plugin-content

Quality patterns for authoring production-ready plugin content:

  • XML+markdown workflow structure for commands
  • Progressive disclosure with references/assets for skills
  • Publishing guidance for sharing plugins

References:

  • references/command-patterns.md — Command structural patterns
  • references/skill-patterns.md — Skill quality patterns
  • references/publishing.md — How to publish plugins via GitHub

disambiguation

Patterns for handling ambiguity:

  • The "Black Ice Model" for detecting hidden decision points
  • Question design and option presentation
  • Context preservation across turns

mental-map

Patterns for navigating complex domains:

  • Seeding a mental map before deep work
  • Dropping breadcrumbs as you discover things
  • Injecting accumulated context back into the conversation

Contributing

This plugin reflects a specific workflow. If you find patterns that generalize well or improve portability, contributions are welcome.


License

MIT

About

Meta-operations for managing AI prompts, extracting reusable workflows from sessions, and maintaining parity between Claude Code and Codex CLI

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages