Skip to content

feat!: add tools parameter to skill.when#124

Merged
chenjiahan merged 3 commits intomainfrom
david/skill-when-prompt-only
Apr 14, 2026
Merged

feat!: add tools parameter to skill.when#124
chenjiahan merged 3 commits intomainfrom
david/skill-when-prompt-only

Conversation

@Timeless0911
Copy link
Copy Markdown
Member

@Timeless0911 Timeless0911 commented Apr 14, 2026

Summary

  • add selected tools to skill.when and pass a single context object instead of positional arguments
  • keep skill.when scoped to interactive prompt visibility while explicit --skill values remain authoritative
  • keep --help listing all optional skills and add coverage for the updated API

Breaking Change

extraSkills.when now receives a single context object instead of positional parameters.

Before:

when: (templateName) => templateName === "react"

After:

when: ({ templateName, tools }) =>
  templateName === "react" && tools.includes("rstest")

@Timeless0911 Timeless0911 force-pushed the david/skill-when-prompt-only branch from b6ca9d8 to a994401 Compare April 14, 2026 09:19
@Timeless0911 Timeless0911 changed the title Refine skill when behavior Make skill.when tool-aware without filtering --skill or --help Apr 14, 2026
@Timeless0911 Timeless0911 changed the title Make skill.when tool-aware without filtering --skill or --help feat: add tools parameter to skill.when Apr 14, 2026
@Timeless0911 Timeless0911 force-pushed the david/skill-when-prompt-only branch from a994401 to 73d60e3 Compare April 14, 2026 09:21
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b6ca9d86d3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Timeless0911 Timeless0911 marked this pull request as draft April 14, 2026 09:34
@Timeless0911 Timeless0911 marked this pull request as ready for review April 14, 2026 09:43
@Timeless0911 Timeless0911 changed the title feat: add tools parameter to skill.when feat!: make skill.when accept a context object Apr 14, 2026
@Timeless0911 Timeless0911 changed the title feat!: make skill.when accept a context object feat!: add tools parameter to skill.when Apr 14, 2026
@chenjiahan chenjiahan merged commit 33e4e20 into main Apr 14, 2026
4 checks passed
@chenjiahan chenjiahan deleted the david/skill-when-prompt-only branch April 14, 2026 10:05
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.

2 participants