subagent-env-handshake

Verify live repository state via a six-field Markdown-HTML handshake.

3|Updated Dec 7, 2025
One-click install
npx skills add https://github.com/Grimblaz/agent-orchestra --skill subagent-env-handshake
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: subagent-env-handshake
Source: https://github.com/Grimblaz/agent-orchestra/tree/main/skills/subagent-env-handshake
Command: npx skills add https://github.com/Grimblaz/agent-orchestra --skill subagent-env-handshake

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Subagents risk acting on stale parent environment data; this handshake ensures subagents can verify live working-tree state before making tree-grounded claims.

Core Features & Use Cases

  • Pilot a robust hand-off of live repo state between parent and subagent to prevent drift in HEAD, branch, CWD, and dirty state.
  • Use in Claude Code agent dispatch to safely coordinate tree-sensitive tasks and improve reliability when subagents execute in the shared working tree.
  • Use Case: When dispatching a subagent to inspect a repository and report findings, prepend the handshake to the Agent prompt so the subagent can verify the environment before proceeding.

Quick Start

Deploy the handshake by prepending the generated block to the Agent tool prompt during subagent dispatch.

Frequently Asked Questions about subagent-env-handshake

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify live repository state before dispatching a Claude subagent?

To verify live repository state before dispatching a Claude subagent, prepend a v1 handshake block to the subagent prompt. This Markdown-HTML comment block passes six fields including parent_head, parent_branch, and parent_dirty_fingerprint to prevent environment drift.

Why does my Claude subagent act on stale parent environment data?

Subagents act on stale parent environment data because they lack a verification mechanism for the live working tree. Without a handshake block checking parent_head and parent_cwd, subagents execute in shared working trees without confirming the current repository state before making tree-grounded claims.

How do I prevent environment drift when sharing a working tree with subagents?

To prevent environment drift when sharing a working tree with subagents, implement a handshake during Claude Code agent dispatch. Prepending the generated block to the Agent tool prompt ensures subagents verify HEAD, branch, CWD, and dirty state before proceeding with tree-sensitive tasks.

Can I use a handshake to coordinate tree-sensitive tasks in Claude Code?

Yes, you can use a handshake to coordinate tree-sensitive tasks in Claude Code. The v1 handshake is designed for agent dispatch workflows where a parent session shares a live working tree, safely improving reliability when subagents execute tree-sensitive operations.

What fields are included in a Claude subagent environment handshake?

A Claude subagent environment handshake includes six fields: parent_head, parent_branch, parent_cwd, parent_dirty_fingerprint, workspace_mode, and handshake_issued_at. These fields capture the exact repository state to verify the live working tree before subagent execution.

Does the subagent handshake work without external dependencies?

Yes, the subagent handshake works without external dependencies. It relies solely on scripts to generate a Markdown-HTML comment block, ensuring the environment verification process integrates seamlessly into existing Claude Code subagent dispatch workflows without requiring additional packages.