fix: add CLAUDE.md and skills reading instructions for subagents - #290
Conversation
a3bbbda to
2c7a1a8
Compare
…kills Based on analysis of Claude Code behavior, subagents only receive skill headers when the Skill tool is explicitly listed in their tools. Without it, subagents cannot access any skills - neither Agent OS standards (when installed as skills) nor user's own custom skills. By adding Skill unconditionally to relevant subagents, they can now: - Receive skill headers describing available skills - Decide whether to load and use specific skills based on context - Access user's custom skills regardless of standards_as_claude_code_skills setting Affected subagents: - implementer: primary code implementation agent - spec-writer: creates specifications with architectural decisions - spec-verifier: validates specs against standards - spec-shaper: gathers requirements with awareness of tech stack - tasks-list-creator: plans tasks aligned with coding conventions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2465e3d to
688ea3d
Compare
|
Hello everyone! At first, I made a fairly significant change and submitted a pull request, but then I found a simpler and more elegant solution. I analyzed the encoded executable of the Claude Code utility using the same Claude Code and discovered that Skill is indeed used in subagents, but only under certain conditions. Either "tools:" must explicitly specify that Skill should be used, or "tools:" must not be defined at all in the subagent headers, because the source code shows that agent-os includes this "tools:" header, but Skill is not present there. Therefore, the simplest approach is to add Skill everywhere it may be needed for using abilities. Why did I decide to do this without special conditions for enabling the “Use standards as Skill” option? Because the programmer may intend for subagents to still load an additional Skill module written by the programmer specifically for the project or globally for the user space. That is why I believe Skill must always be present; otherwise, it simply will not use abilities when performing programming tasks. I consider this a critical fix. For those who do not want to wait until the author approves these changes, you can use the following bash command to install my version of agent-os, which includes these minimal adjustments. |
|
As proof that the original version of Agent-OS does not work with Skills while the patched version does, I created a test repository, verified it myself, and confirmed that this is exactly the case. Here is the link to the repository. https://github.com/Perlover/agent-os-test-skills/ |
|
@Perlover thanks for this and for the explanation 👍 |
Problem
When
standards_as_claude_code_skills: trueis set inconfig.yml, subagents (implementer, tasks-list-creator, spec-writer, etc.) lose access to project coding standards and CLAUDE.md instructions.Root Cause
According to Claude Code subagents documentation, subagents receive:
skills:field)Critical findings:
CLAUDE.md is NOT inherited by subagents
Skills require explicit configuration
skills:field in agent frontmatter:skills:field, so skills are never loadedEmpty fallback in agent-os
{{UNLESS standards_as_claude_code_skills}}block is skipped when skills mode is enabled{{IF standards_as_claude_code_skills}}alternativeCurrent Behavior
In agent files like
implementer.md, standards are included conditionally:standards_as_claude_code_skillsfalse{{standards/*}}✅trueImpact
Subagents may:
npm testinstead of project-specificmake test)Expected Behavior
When
standards_as_claude_code_skills: true, subagents should either:Option A: Be instructed to manually read relevant files:
CLAUDE.md(if exists) for project-specific instructionsagent-os/standards/files for coding standards.claude/skills/files for detailed patternsOption B: Include the
skills:field in agent frontmatter to auto-load relevant skills (though this is challenging since skill names are project-specific)Affected Agents
Environment
References
skills:field for auto-loading skills