Invoke external AI agents (Claude, Cursor Agent, Gemini) from Claude Code

Install

/plugin install invoke-agent@powdream-plugins

Run it inside Claude Code after adding the marketplace with /plugin marketplace add powdream/claude-plugins.

Contents

Discovered from source

Skills 6

History Skill

Invoke the invoke-agent CLI to view the complete conversation history of a specific responder session thread.

  1. Identify the target session:

    • to: The target agent (claude, cursor-agent, or gemini).
    • to-session-id: The session ID of the responder agent.
  2. Run in the terminal:

    invoke-agent history --to <TARGET_AGENT> --to-session-id <SESSION_ID>
    
  3. The command will print all user prompts and agent responses (stdout, fileContent, stderr) sequentially.

If INVOKE_AGENT_DATABASE_PATH is not set, append --db <project-root>/.invoke-agent/communication.db to the command, where <project-root> is the directory where the AI agent CLI (e.g. Claude Code) was originally started — you already know this from your session context.

Install Skill

Install the invoke-agent CLI for the user's current OS and architecture, then add the install directory to PATH so invoke-agent is available in the shell.

Available substitutions: $ARGUMENTS (optional extra args), ${CLAUDE_SKILL_DIR} — directory of this skill (e.g. ${CLAUDE_SKILL_DIR}/scripts/install.sh for a bundled script). See Skills docs.

1. Detect OS and architecture

  • Unix (macOS/Linux): Run uname -s (Darwin or Linux) and uname -m (x86_64 or aarch64).
  • Windows: Use $env:OS and $env:PROCESSOR_ARCHITECTURE in PowerShell, or %OS% and %PROCESSOR_ARCHITECTURE% in cmd. Map to x64 or ARM64.

2. Map to release asset

GitHub Releases use triples matching tools/build.ts:

OSArchTripleExtension
Linuxx64x86_64-unknown-linux-gnu—
Linuxarm64aarch64-unknown-linux-gnu—
Windowsx64x86_64-pc-windows-msvc.exe
macOSx64x86_64-apple-darwin—
macOSarm64aarch64-apple-darwin—

Latest release asset name format: invoke-agent-<version>-<triple>.zip Base URL: https://github.com/powdream/invoke-agent/releases/latest/download/

3. Download and extract

  • Unix: Create a temp dir, then e.g. curl -L -o artifact.zip "<url>" and unzip artifact.zip (or use tar if the asset is .tar.gz). Copy the binary out of the triple-named folder.
  • Windows PowerShell: Invoke-WebRequest -Uri "<url>" -OutFile artifact.zip -UseBasicParsing then Expand-Archive -Path artifact.zip -DestinationPath .

4. Install directory

  • Linux/macOS: ~/.local/bin (create if needed). Copy the single executable (e.g. invoke-agent or invoke-agent.exe for Windows) there.
  • Windows: $env:LOCALAPPDATA\invoke-agent\bin or %USERPROFILE%\.local\bin. Create the directory and copy the executable.

5. Add to PATH (by shell)

  • Windows cmd: setx PATH "%PATH%;<install-dir>". For current session: set PATH=%PATH%;<install-dir>.
  • Windows PowerShell: [Environment]::SetEnvironmentVariable("Path", $env:Path + ";<install-dir>", "User"). For current session: $env:Path += ";<install-dir>".
  • bash: echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc (skip if already present).
  • zsh: echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc.
  • fish: fish_add_path $HOME/.local/bin or set -Ua fish_user_paths $HOME/.local/bin.

Ask the user which shell they use (or detect from $SHELL / ComSpec) and run only the matching command.

6. Verify

Run invoke-agent --version (or invoke-agent --version in a new shell on Windows after PATH update) and confirm the version matches the release.

Optional: bundled scripts

If this skill includes scripts/install.sh (Unix) or scripts/install.ps1 (PowerShell), run them with ${CLAUDE_SKILL_DIR}/scripts/install.sh or ${CLAUDE_SKILL_DIR}/scripts/install.ps1 so the path works regardless of current working directory. Those scripts can perform OS/arch detection, download, install, and PATH update in one go.

List Skill

Invoke the invoke-agent CLI to list all responder sessions associated with a specific requester session.

Available substitutions: ${CLAUDE_SESSION_ID} (current Claude Code session ID).

  1. Get the session ID: Typically ${CLAUDE_SESSION_ID} unless the user specifies otherwise.
  2. Run in the terminal:
    invoke-agent list --from claude --from-session-id ${CLAUDE_SESSION_ID}
    
  3. The command will output a list of target agents, their session IDs, and an AI-generated summary (up to 300 characters) for each session thread.

If INVOKE_AGENT_DATABASE_PATH is not set, append --db <project-root>/.invoke-agent/communication.db to the command, where <project-root> is the directory where the AI agent CLI (e.g. Claude Code) was originally started — you already know this from your session context.

Output Skill

Retrieve and display stored agent output by its output ID. After running invoke-agent prompt, the command returns an output ID; use this skill to view that output (stdout, stderr, file content, exit status).

Available substitutions: $ARGUMENTS or $0 — the output ID (e.g. /invoke-agent:output abc-123). See Skills docs.

  1. Get the output ID from the user — the ID that was printed when they (or a previous step) ran invoke-agent prompt. When invoked with an argument, use $ARGUMENTS or $0 as the output ID.

  2. Determine the DB path: If INVOKE_AGENT_DATABASE_PATH is set, the CLI picks it up automatically and no --db flag is needed. Otherwise, pass --db <project-root>/.invoke-agent/communication.db, where <project-root> is the directory where the AI agent CLI (e.g. Claude Code) was originally started — you already know this from your session context.

  3. Run in the terminal:

    invoke-agent output get <OUTPUT_ID> --json
    # or, if INVOKE_AGENT_DATABASE_PATH is not set:
    invoke-agent output get <OUTPUT_ID> --json --db <project-root>/.invoke-agent/communication.db
    
  4. The command prints stdout, stderr, fileContent (if any), and statusCode for that output in JSON format.

Prompt Skill

Invoke the invoke-agent CLI to run a request targeting a specific AI agent, continuing an existing conversation or starting a new one.

Available substitutions: $ARGUMENTS (prompt text), ${CLAUDE_SESSION_ID} (current Claude Code session ID).

  1. Identify the roles:

    • to: The target agent to invoke (claude, cursor-agent, or gemini).
    • from: The requester agent type (usually claude if you are running this from Claude Code).
    • from-session-id: The current session ID (use ${CLAUDE_SESSION_ID}).
  2. Run in the terminal:

    invoke-agent prompt --to <TARGET_AGENT> --from claude --from-session-id ${CLAUDE_SESSION_ID} "<prompt>"
    

    If the user explicitly wants to start a fresh conversation instead of resuming the last one, append --new.

  3. The command returns an output ID when it finishes. You can pass that ID to the output skill (/invoke-agent:output <output-id>) or use invoke-agent output get <output-id> to read the result (stdout, stderr, file content, exit status).

If INVOKE_AGENT_DATABASE_PATH is not set, append --db <project-root>/.invoke-agent/communication.db to the command, where <project-root> is the directory where the AI agent CLI (e.g. Claude Code) was originally started — you already know this from your session context.

Summary Skill

Invoke the invoke-agent CLI to fetch (or generate) a one-paragraph summary of a specific responder session thread.

  1. Identify the target session:

    • to: The target agent (claude, cursor-agent, or gemini).
    • to-session-id: The session ID of the responder agent.
  2. Run in the terminal:

    invoke-agent summary --to <TARGET_AGENT> --to-session-id <SESSION_ID>
    
  3. The command will output a summary of the conversation history.

If INVOKE_AGENT_DATABASE_PATH is not set, append --db <project-root>/.invoke-agent/communication.db to the command, where <project-root> is the directory where the AI agent CLI (e.g. Claude Code) was originally started — you already know this from your session context.

Sponsors

Details

Marketplace
powdream/claude-plugins
Source
powdream/invoke-agent
Category
Community

More from powdream/claude-plugins

All 8