Skip to content

fix: inject Skill into --tools when skills are enabled and tools is explicit#1045

Open
ashishpatel26 wants to merge 1 commit into
anthropics:mainfrom
ashishpatel26:fix/issue-977-skills-all-tools-injection
Open

fix: inject Skill into --tools when skills are enabled and tools is explicit#1045
ashishpatel26 wants to merge 1 commit into
anthropics:mainfrom
ashishpatel26:fix/issue-977-skills-all-tools-injection

Conversation

@ashishpatel26

Copy link
Copy Markdown

Summary

When tools is set explicitly (e.g. tools=['Bash', 'Read']) alongside skills='all', the Skill runner was added to --allowedTools but not to --tools. Because the CLI's --tools flag overrides --allowedTools, the Skill tool was effectively unavailable at runtime.

  • Detect when skills is set and tools is an explicit list in _build_command
  • Inject "Skill" into the tools list if not already present
  • Add tests covering the injection for skills="all", named skills, and the case where "Skill" is already present

Test plan

  • test_skills_all_injects_skill_into_explicit_tools_list
  • test_named_skills_inject_skill_into_explicit_tools_list
  • test_skill_already_in_tools_not_duplicated
  • python -m pytest tests/test_transport.py -v

Fixes #977

…xplicit (anthropics#977)

When tools was set explicitly (e.g. tools=['Bash', 'Read']) alongside
skills='all', the Skill runner was added to --allowedTools but not to
--tools. The CLI's --tools flag overrides --allowedTools, leaving Skill
unavailable. Now Skill is injected into the tools list too when skills
is set.
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.

skills="all" does not add "Skill" to tools

1 participant