home / skills / chachamaru127 / claude-code-harness / test-nested-agents
This skill tests nested agents by validating in-skills agent packaging and Task tool invocation to ensure reliable echo-agent patterns.
npx playbooks add skill chachamaru127/claude-code-harness --skill test-nested-agentsReview the files below or copy the command above to add this skill to your agents.
---
name: test-nested-agents
description: "ネストエージェントパターンの検証テスト用スキル。Use when user says テスト検証, test nested agents, verify agent pattern."
description-en: "Test skill for verifying nested agents pattern. Use when user says テスト検証, test nested agents, verify agent pattern."
description-ja: "ネストエージェントパターンの検証テスト用スキル。Use when user says テスト検証, test nested agents, verify agent pattern."
allowed-tools: ["Read", "Task", "Bash"]
user-invocable: false
metadata:
skillport:
category: test
tags: [test, experimental]
alwaysApply: false
---
# Test Nested Agents Skill
このスキルは `{skill}/agents/` フォルダにエージェントをパッケージするパターンの検証用です。
## テスト対象
1. スキル内の `agents/` フォルダにエージェントを配置
2. Task tool でそのエージェントを呼び出せるか検証
## 含まれるテストエージェント
| エージェント | 目的 |
|-------------|------|
| test-echo-agent | 入力をエコーバックして動作確認 |
## 検証手順
### パターン A: スキル内エージェントを直接参照
```
Task tool:
subagent_type: "test-echo-agent"
prompt: "Echo back: HELLO FROM NESTED AGENT"
```
### パターン B: 相対パスでプロンプトを読み込み
```
1. Read: ./agents/test-echo-agent.md
2. そのプロンプトを使って Task tool で general-purpose を起動
```
## 実行
このスキルが起動したら、以下を順次実行:
1. まず `agents/test-echo-agent.md` の内容を確認
2. パターン A を試行
3. パターン A が失敗したら パターン B を試行
4. 結果をレポート
This skill verifies the nested-agent packaging pattern by testing agents placed under the agents/ folder. It runs checks that a Task tool can invoke a subagent directly or via a relative prompt file. The skill is implemented in JavaScript as a development harness for Plan→Work→Review cycles.
The skill inspects the agents/ directory for test agents (for example, a test-echo-agent) and reads their prompt files. It then executes two verification patterns: direct subagent invocation via Task tool and loading a prompt file by relative path before invoking a general-purpose agent. The run reports successes, failures, and fallback attempts.
What does the test-echo-agent do?
It echoes back the provided input so you can verify invocation and prompt handling.
What happens if Pattern A fails?
The skill automatically attempts Pattern B (relative-path prompt loading) and reports both results.