← Catalog

@jocax/cross-system

Cross-agent integration — import commands, skills, and agent personas from other AI coding tools (Claude Code, Gemini CLI, Codex)

Extension

Install

Install with PiG

pig install npm:@jocax/cross-system

Install with Pi

pi install npm:@jocax/cross-system
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./dist/index.js"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.1 (README.md). PiG does not review it.

@jocax/cross-system

Import commands, skills, and agent personas from other AI coding tools — seamlessly use your existing Claude Code, Gemini CLI, and Codex configurations inside pi.

What

This package provides two extensions that work together:

  • cross-agent — Scans .claude/, .gemini/, .codex/ directories (project + global) for commands (commands/*.md → /name), skills (skills/ → /skill:name), and agents (agents/*.md → @name). Discovered commands and skills are registered automatically so you can invoke them directly in pi.
  • system-select — /system command opens a select dialog to pick an agent persona from your discovered agent definitions. The selected persona's system prompt is prepended to pi's instructions, and tools can be restricted to that agent's declared tool set.

Why

If you've invested time configuring Claude Code, Gemini CLI, or Codex with custom commands, skills, and agents, you shouldn't have to recreate them for pi. Cross-system reads your existing configurations and makes them available inside pi — no duplication, no migration.

Install

Install the package from npm:

{
  "source": "npm:@jocax/cross-system"
}

Usage

On startup, cross-system scans your other AI coding agent directories and displays a colored boot notification showing what it found. Commands and skills are registered automatically.

Commands

CommandDescription
/systemOpen select dialog to switch agent persona

Discovered commands from other agents appear as their original name (e.g., if .claude/commands/review.md exists, /review is available). Discovered skills appear as /skill:<name>.

Agent Persona Switching

/system

Opens a selection dialog listing all discovered agent personas with their source directory. Select one to:

  • Prepend the agent's system prompt to pi's default instructions
  • Restrict available tools to the agent's declared set (if specified in frontmatter tools field)

Select "Reset to Default" to restore pi's original behavior.

Command Argument Expansion

Imported commands support argument expansion:

  • $ARGUMENTS or $@ — all arguments
  • $1, $2, $N — positional arguments

Configuration

Cross-system scans the following directories automatically:

DirectorySource
.claude/commands/, skills/, agents/Project-local Claude Code
.gemini/commands/, skills/, agents/Project-local Gemini CLI
.codex/commands/, skills/, agents/Project-local Codex
.pi/agents/Project-local pi agents
~/.claude/commands/, skills/, agents/Global Claude Code
~/.gemini/commands/, skills/, agents/Global Gemini CLI
~/.codex/commands/, skills/, agents/Global Codex
~/.pi/agent/agents/Global pi agents

No environment variable configuration is required — cross-system discovers configurations automatically from standard paths.

Examples

Run each extension standalone (no install required):

# Cross-agent only — discover commands and skills
pi -e software/packages/cross-system/examples/cross-agent.ts

# System-select only — agent persona switching
pi -e software/packages/cross-system/examples/system-select.ts

# Full package — both extensions
pi -e software/packages/cross-system/examples/all.ts

Run the demo

just demo-web cross-system     # browser
just demo cross-system         # herdr

The sandbox copy gets two personas under .claude/agents/ and two commands under .claude/commands/, which is all this extension needs to find them. The scenario prompt arrives prefilled in the prompt box; send it to start.

Scenario "Commands from .claude"

StepDo thisWatch
1Start the sessionTwo start-up notifications: a terminal-coloured one naming .claude (2 commands) (2 agents), /greet-check, /review, @code-reader, @test-writer (click to expand — a multi-line notification collapses to one row), and a plain one, Loaded 2 agents (2 from .claude). The status line reads System Prompt: Default
2Look at the side panel/review, /greet-check and /system are listed — plus /llama, from the kit's own Ollama provider. A click appends the command to the prompt box; its [.claude] … description is the button's tooltip, not visible text
3Send /review src/greet.jsThe timeline shows the typed command, not the expanded file body, and the agent answers it

Scenario "Switch the persona"

StepDo thisWatch
1Send the first promptThe agent explains src/greet.js
2Type /systemA dialog titled Select System Prompt lists Reset to Default, code-reader — Reads code and explains it, never edits [.claude], test-writer — Writes node:test cases for existing functions [.claude]
3Pick code-reader, then send the second promptStatus line reads System Prompt: Code Reader, a notification confirms System prompt set to "code-reader" (.claude), and the agent declines to write — the persona's tools field left it read, ls, grep
4Type /system, pick test-writer, send the second prompt againwrite is back. The agent usually adds the test case now; a refusal here is not a failure — its earlier refusal is still in context, so the tool is available again even if it needs asking a second time

The notification naming .claude is coloured for a terminal. In the browser it arrives with its raw ANSI escape codes visible; in herdr it renders as intended.

A demo session sees only the sandbox's own .claude/ tree: the session's HOME is a fresh empty directory, so the ~/.claude, ~/.gemini and ~/.codex arms find nothing.

Needs herdr 0.9.3 or newer and one reachable model provider — see demo-kit.

Development

# Type-check
npx tsc --noEmit --skipLibCheck -p software/packages/cross-system/tsconfig.json

# Run tests
npx vitest run software/packages/cross-system/tests/