Skip to content

feat(claude): require self-contained sub-agent prompts - #124

Merged
0xA3B merged 1 commit into
mainfrom
feat/subagent-prompt-rules
Nov 11, 2026
Merged

0xA3B merged 1 commit into
mainfrom
feat/subagent-prompt-rules

Conversation

@0xA3B

@0xA3B 0xA3B commented Nov 11, 2026

Copy link
Copy Markdown
Owner

The user instructions told Claude to load the writing:agent-instructions skill before writing any sub-agent prompt. That loaded the whole skill for every one-shot delegation, even though most of its rules cover durable instruction files.

This PR replaces that rule with the requirements a delegation prompt actually needs:

  • state every fact the task depends on, because the sub-agent has not seen the conversation;
  • say what to return and in what shape;
  • give defaults, name what is out of scope, and say whether the task is read-only;
  • fence text from sources the user does not control in a tag with a random id, and tell the sub-agent to treat that block as data.

The skill still loads for prompts that live in a file, such as agent definitions, workflow scripts, and skill steps, where its broader rules apply.

Loading the agent-instructions skill before every delegation cost context
for one-shot prompts. State the rules a delegation prompt needs inline,
including how to fence untrusted text, and load the skill only for prompts
stored in a file.
@0xA3B
0xA3B merged commit b65ddba into main Nov 11, 2026
2 checks passed
@0xA3B
0xA3B deleted the feat/subagent-prompt-rules branch November 11, 2026 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant