본문으로 건너뛰기
cccskills
무료GitHub에 공개

agent-handoffs

Agent parameter passing, memory files, and data handoffs between agents

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(2)

  • SKILL.md7.8 KB
  • metadata.json1.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Agent Parameter Passing Guidelines

Core Principle

Agents are workflow-agnostic. They perform specific tasks regardless of which workflow invokes them.

Workflows pass parameters to agents to tell them:

  • Which workflow is running
  • What files to read (input)
  • What files to write (output)
  • Any workflow-specific context

Standard Parameters

All agents that work with memory files MUST accept these parameters:

interface AgentParameters {
  workflow: string;      // "create-module" | "add-operation" | "update-module"
  moduleId: string;      // "github-github" | "amazon-aws-s3"
  inputFile?: string;    // File to read from (optional if agent doesn't need input)
  outputFile: string;    // File to write to
}

Memory Path Construction

CRITICAL: Always use absolute paths for .localmemory to avoid issues when working from different directories.

# Get project root (choose method based on context)
PROJECT_ROOT="$(git rev-parse --show-toplevel)"

# Standard pattern - ALWAYS use absolute paths
MEMORY_PATH="${PROJECT_ROOT}/.claude/.localmemory/${workflow}-${moduleId}"

# Examples (where PROJECT_ROOT is your project's absolute path):
# ${PROJECT_ROOT}/.claude/.localmemory/create-module-github-github/
# ${PROJECT_ROOT}/.claude/.localmemory/add-operation-github-github/
# ${PROJECT_ROOT}/.claude/.localmemory/update-module-amazon-aws-s3/

For Bash Scripts

# Method 1: Using git (preferred if in git repo)
PROJECT_ROOT="$(git rev-parse --show-toplevel)"

# Method 2: Using script location (if you know the script depth)
PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"

# Always construct absolute paths
MEMORY_PATH="${PROJECT_ROOT}/.claude/.localmemory/${workflow}-${moduleId}"

For Agents (invoked by Claude)

Agents should always receive or construct absolute paths. When constructing paths in agent responses, use the working directory from the environment.

Reading Input Files

# Agent receives parameters
WORKFLOW="create-module"
MODULE_ID="github-github"
INPUT_FILE="phase-01-discovery.json"

# Get project root and construct absolute paths
PROJECT_ROOT="$(git rev-parse --show-toplevel)"
MEMORY_PATH="${PROJECT_ROOT}/.claude/.localmemory/${WORKFLOW}-${MODULE_ID}"
INPUT_PATH="${MEMORY_PATH}/${INPUT_FILE}"

# Read data
PRODUCT_PACKAGE=$(jq -r '.productPackage' "${INPUT_PATH}")
MODULE_PACKAGE=$(jq -r '.modulePackage' "${INPUT_PATH}")

Writing Output Files

# Agent receives parameters
OUTPUT_FILE="phase-02-scaffolding.json"

# Get project root and construct absolute paths
PROJECT_ROOT="$(git rev-parse --show-toplevel)"
MEMORY_PATH="${PROJECT_ROOT}/.claude/.localmemory/${WORKFLOW}-${MODULE_ID}"
OUTPUT_PATH="${MEMORY_PATH}/${OUTPUT_FILE}"

# Ensure directory exists
mkdir -p "${MEMORY_PATH}"

# Write data
cat > "${OUTPUT_PATH}" <<EOF
{
  "phase": 2,
  "name": "Module Scaffolding",
  "status": "completed",
  "timestamp": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
  ...
}
EOF

Agent Documentation Structure

❌ Wrong (Workflow-Specific)

## Responsibilities
- Create module structure for new modules
- Read from phase-01-discovery.json
- Write to phase-02-scaffolding.json

✅ Correct (Workflow-Agnostic)

## Responsibilities
- Create module directory structure
- Read parameters from input file
- Validate generated structure
- Write results to output file

## Required Parameters
- workflow: Workflow type
- moduleId: Module identifier
- inputFile: File containing parameters
- outputFile: File to write results

## Input File Structure
Expected fields in input file:
- productPackage: Product package name
- modulePackage: Module package name
- serviceName: Service name

Invocation Examples

From Workflow Documentation

### Phase 2: Module Scaffolding

**Agent:** @module-scaffolder

**Invocation:**
```bash
@module-scaffolder
Parameters:
  workflow: create-module
  moduleId: github-github
  inputFile: phase-01-discovery.json
  outputFile: phase-02-scaffolding.json

### Multiple Workflows Using Same Agent

**Create Module Workflow:**
```bash
@api-architect
Parameters:
  workflow: create-module
  moduleId: github-github
  inputFile: phase-01-discovery.json
  outputFile: phase-03-api-spec.json

Add Operation Workflow:

@api-architect
Parameters:
  workflow: add-operation
  moduleId: github-github
  inputFile: operation-spec.json
  outputFile: updated-api-spec.json

Same agent, different parameters!

File Naming in Workflows

Workflows specify exact file names based on their phase structure:

Create Module:

  • Phase 1: phase-01-discovery.json
  • Phase 2: phase-02-scaffolding.json
  • Phase 3: phase-03-api-spec.json
  • etc.

Add Operation:

  • Step 1: operation-definition.json
  • Step 2: api-spec-update.json
  • Step 3: implementation-plan.json
  • etc.

Update Module:

  • Step 1: operations-list.json
  • Step 2: update-plan.json
  • etc.

Agent Flexibility

Agents should be flexible about input structure:

// Agent reads what it needs
const productPackage = input.productPackage;
const modulePackage = input.modulePackage;

// If field doesn't exist, agent reports error
if (!productPackage) {
  throw new Error("Required field 'productPackage' missing from input file");
}

Workflow Responsibility

Workflows are responsible for:

  1. Creating memory directories
  2. Passing correct parameters to agents
  3. Ensuring output from one phase matches input expected by next phase
  4. Orchestrating agent sequence
  5. Error handling and recovery

Agents are responsible for:

  1. Accepting standard parameters
  2. Reading from specified input file
  3. Performing their specific task
  4. Writing to specified output file
  5. Reporting errors if parameters/input invalid

Benefits

✅ Reusability: Same agent works across multiple workflows ✅ Testability: Agents can be tested independently with different parameters ✅ Maintainability: Agent changes don't affect workflow structure ✅ Flexibility: New workflows can use existing agents ✅ Clarity: Clear separation of concerns

Anti-Patterns

❌ Hardcoding Workflow Type

# BAD
if [ "$WORKFLOW" == "create-module" ]; then
  # Special logic for create
fi

Agents should not have workflow-specific logic. If needed, workflows should pass different parameters.

❌ Hardcoding File Paths

# BAD - Relative path
INPUT=".claude/.localmemory/create-module-${MODULE_ID}/phase-01-discovery.json"

# BAD - Hardcoded workflow
INPUT="${PROJECT_ROOT}/.claude/.localmemory/create-module-${MODULE_ID}/phase-01-discovery.json"

# GOOD - Absolute path with parameters
PROJECT_ROOT="$(git rev-parse --show-toplevel)"
INPUT="${PROJECT_ROOT}/.claude/.localmemory/${WORKFLOW}-${MODULE_ID}/${INPUT_FILE}"

Always construct absolute paths from parameters.

❌ Hardcoding Phase Numbers

# BAD
echo '{"phase": 2, ...}'

Extract phase info from parameters or workflow context if needed.

Migration Guide

Old Style (Workflow-Specific)

**File:** `.claude/.localmemory/create-{module-id}/phase-02-scaffolding.json`

Read from: `.claude/.localmemory/create-{module-id}/phase-01-discovery.json`

New Style (Workflow-Agnostic)

**Input File:** Specified by workflow (e.g., phase-01-discovery.json)
**Output File:** Specified by workflow (e.g., phase-02-scaffolding.json)

**Example Paths:**
- Input: `.claude/.localmemory/{workflow}-{moduleId}/{inputFile}`
- Output: `.claude/.localmemory/{workflow}-{moduleId}/{outputFile}`

Summary

  • Agents receive parameters, not hardcoded values
  • Workflows control file naming and sequencing
  • Agents work across any workflow that provides correct parameters
  • Clear separation: workflows orchestrate, agents execute

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

[00] TnR ABSOLUTE RIGOR — Systemic Verification Doctrine. Forced cognitive exertion for high-stakes investigations. Mandates absolute deconstruction, mathematical proof chains, and ≥95% derived certainty. Zero-tolerance for heuristics or sentiment-based reasoning. Shortcuts are defined as intentional hallucinations.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

diegosouzapw/awesome-omni-skill642026년 3월 2일 업데이트

2agent

무료

Configures 2-Agent workflow between PM and implementation roles. Use when user mentions 2-Agent, 2エージェント, PM連携設定, Cursor設定, Cursor連携, 2-agent運用. Do NOT load for: 単独運用, ワークフロー実行, ハンドオフ処理.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

diegosouzapw/awesome-omni-skill642026년 3월 2일 업데이트

Appends relevant hashtags to journal entries based on content analysis. Intended for LLM execution.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

diegosouzapw/awesome-omni-skill642026년 3월 2일 업데이트

add-agent

무료

Add a new AI coding agent to Agent Sandbox. Creates all required files (Dockerfile, templates, CI, docs) and wires the agent into the CLI, proxy, and build system.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

diegosouzapw/awesome-omni-skill642026년 3월 2일 업데이트

Add a new property to the AI agents database. Use when the user wants to add, create, or introduce a new column, property, field, or feature to track across all agents in the comparison matrix. Handles all four required steps - database updates, groups.json, table display, and GitHub issue templates.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

diegosouzapw/awesome-omni-skill642026년 3월 2일 업데이트

Add new Agent templates to the meta-agent-skills framework.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

diegosouzapw/awesome-omni-skill642026년 3월 2일 업데이트

diegosouzapw의 스킬 모두 보기

이 스킬의 문제 신고