finish

GitHub

用于完成最终任务并保存可复用的子智能体为技能。支持新建、修改或替换旧技能,确保所有有价值的子智能体被正确持久化。

skills/meta/finish/SKILL.md zzatpku/AgentFactory

Trigger Scenarios

任务成功解决后需要提交最终答案 需要将创建的子智能体保存为可复用技能

Install

npx skills add zzatpku/AgentFactory --skill finish -g -y
More Options

Non-standard path

npx skills add https://github.com/zzatpku/AgentFactory/tree/master/skills/meta/finish -g -y

Use without installing

npx skills use zzatpku/AgentFactory@finish

指定 Agent (Claude Code)

npx skills add zzatpku/AgentFactory --skill finish -a claude-code -g -y

安装 repo 全部 skill

npx skills add zzatpku/AgentFactory --all -g -y

预览 repo 内 skill

npx skills add zzatpku/AgentFactory --list

SKILL.md

Frontmatter
{
    "name": "finish",
    "description": "Complete the task with a final answer and save reusable subagents as skills. Use this when you have successfully solved the question."
}

Finish

Complete the task with a final answer and save reusable subagents as skills.

Required Parameters

Both answer and subagents are required keys. Omitting either will cause a validation error.

Parameter Type Description
answer str A brief final answer (1-3 sentences). Do NOT put full reports or large content here.
subagents list List of subagents to save, or [] if none worth saving.

The 4 Valid Patterns

Do NOT mix skill_name and supersedes in the same entry — they are mutually exclusive.

Pattern 1 — New subagents (first time creating)

You created multiple new subagents with create_subagent and want to save them all.

<action>finish</action>
<params>
{"answer": "...", "subagents": [
  {"entry_file": "researcher.py", "description": "..."},
  {"entry_file": "analyzer.py", "description": "..."},
  {"entry_file": "visualizer.py", "description": "..."}
]}
</params>

Pattern 2 — Modified saved skills (small fix via modify_subagent)

You used modify_subagent with skill_name to fix saved skills. Include skill_name so changes are saved back to the original skill directories.

<action>finish</action>
<params>
{"answer": "...", "subagents": [
  {"entry_file": "researcher.py", "description": "...", "skill_name": "researcher"},
  {"entry_file": "analyzer.py", "description": "...", "skill_name": "analyzer"}
]}
</params>

Pattern 3 — New subagents replacing old skills (create_subagent + supersedes)

You created new subagents to replace old broken skills. The old skills will be deleted.

<action>finish</action>
<params>
{"answer": "...", "subagents": [
  {"entry_file": "researcher.py", "description": "...\n**Improved From**: ...", "supersedes": "old_researcher"},
  {"entry_file": "analyzer.py", "description": "..."}
]}
</params>

Pattern 4 — Nothing to save

Use this when: (a) existing saved subagents already solved the problem without any new code or modifications, or (b) the subagents completely failed and contain no useful logic. In all other cases, you MUST save ALL reusable subagents — review every subagent you created in this session and save each one that has value. See Important Notes.

<action>finish</action>
<params>
{"answer": "...", "subagents": []}
</params>

Subagent Entry Fields

Field Type Required Description
entry_file str Yes The exact .py filename from create_subagent. Must match a file in the workspace.
description str Yes What problems this subagent solves. If supersedes is set, MUST include **Improved From**.
skill_name str No Only for Pattern 2. The saved skill name you modified via modify_subagent. Cannot be used with supersedes.
supersedes str No Only for Pattern 3. The old skill name to delete and replace. Cannot be used with skill_name.

Description Format

**Problem Category**: ...
**Applicable Questions**: ...
**Key Features**: ...
**Skills Used**: ...
**Reasoning Pattern**: ...
**Input Format**: ...
**Output Format**: ...
**Improved From**: [Only if supersedes is set. Explain what the old skill got wrong and what this version fixes.]

Important Notes

  • answer must be brief (1-3 sentences). Large content causes JSON parsing failures.
  • entry_file must be the exact .py filename you used in create_subagent.
  • Modified saved skills must be listed (Pattern 2), otherwise modifications are discarded.
  • skill_name and supersedes are mutually exclusive: use one or the other, never both.
  • You MUST save ALL reusable subagents: Before calling finish, review EVERY subagent you created in this session (check all .py files in the workspace). Save each one that has value — do not save only the main one. Even helper subagents or narrowly-focused subagents may be useful for future tasks.
  • Specific subagents are also worth saving: even if a subagent targets a narrow domain, save it with a descriptive skill name and description that clearly states its specific scope (e.g., what site/API/topic it handles). Benefits: (1) identical or very similar tasks can directly reuse it; (2) for related tasks, its code serves as a working reference — use view_subagent_code to study its structure, API calls, and workarounds, then create_subagent to build a new one based on it.
  • All workspace .py files are copied into each saved skill directory.

Version History

  • df92287 Current 2026-07-25 08:38

Same Skill Collection

skills/meta/create_subagent/SKILL.md
skills/meta/list_saved_subagents/SKILL.md
skills/meta/modify_subagent/SKILL.md
skills/meta/run_subagent/SKILL.md
skills/meta/view_subagent_code/SKILL.md
skills/tools/google_search/SKILL.md
skills/tools/jina_reader/SKILL.md
skills/tools/mask/local_search/SKILL.md
skills/tools/mask/open_page/SKILL.md
skills/tools/playwright/SKILL.md
skills/tools/shell_command/SKILL.md

Metadata

Files
0
Version
df92287
Hash
a75bab3d
Indexed
2026-07-25 08:38

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 09:36
浙ICP备14020137号-1 $mapa de visitantes$