AgentSkillsCN

invoking-subagents

生成具有可配置工具访问权限的子代理,只返回答案而不淹没你的上下文。用于总结大量git历史、并行比较多个仓库或处理大diff/日志。

SKILL.md
--- frontmatter
name: invoking-subagents
description: Spawns subagents with configurable tool access that return just the answers without flooding your context. Use for summarizing extensive git history, comparing across multiple repositories in parallel, or processing large diffs/logs.
compatibility: Requires `synu` shell plugin and `claude` CLI tool
license: AGPL-3.0-or-later
metadata:
  author: Amolith <amolith@secluded.site>

Invoke with synu claude --flags -p 'prompt'.

Important: Subagents are scoped to their cwd, just like you. To work in another repository, cd there first.

Use a precise and thorough prompt. Aggressively restrict which tools it can interact with; if it doesn't need Edit, don't give it Edit. If it needs to read files, Glob, Grep, and Read are probably sufficient. Task can be helpful. Notebook, Slash, Write, Web, Edit, etc. should almost never be necessary. Execute them in the background. You may invoke multiple when appropriate and in parallel if helpful. Once they're running, you may either stop and wait for me to tell you they're finished or continue with other work.

Example exploring git history in another repo:

bash
cd /path/to/other/repo && fish -c "synu claude --disallowed-tools 'Bash(*) Explore Edit Read WebFetch WebSearch Glob Grep NotebookEdit NotebookRead SlashCommand Write' --allowed-tools 'Bash(git log:*) Bash(git show:*)' -p 'Using only git log and git show, summarise the major user-facing changes in HASH..HASH. Do not provide code snippets or technical details. Consider user-facing changes, like being able to set a port-out PIN or adding a new button or changing font sizes.'"

Refer to installing-synu.md if it's unavailable.