Skip to content

Guide models to pass positional script arguments as a string array - #88

Merged
shibayan merged 1 commit into
masterfrom
clarify-skill-script-argument-guidance
Aug 24, 2026
Merged

Guide models to pass positional script arguments as a string array#88
shibayan merged 1 commit into
masterfrom
clarify-skill-script-argument-guidance

Conversation

@shibayan

Copy link
Copy Markdown
Member

Problem

The skills system prompt's script guidance only showed the JSON-object argument form:

Pass script arguments inside args as a JSON object (e.g. args: {"length": 24}), not as top-level tool parameters.

The run_skill_script tool schema and the script runner have accepted a string array for CLI-style positional arguments all along (args: ["input.docx", "--output", "result.idx"]), but models read the prompt before the tool schema, so they leaned toward the object form even for file-based scripts that document positional arguments.

Change

Prompt wording only — no API or runtime change. The guidance now matches what the Python implementation adopted in microsoft/agent-framework#7695:

  • the object form is scoped to named arguments, inline scripts included;
  • a new line covers file-based scripts documenting CLI-style positional arguments, with the string-array example.

A prompt test mirroring the upstream one asserts both shapes are distinguished in the default prompt.

Verification

  • The new test was written first and observed failing against the previous wording, and failing again after temporarily reverting the fix.
  • pnpm check passes (exit code verified).

🤖 Generated with Claude Code

The skills system prompt only showed the JSON-object form for script
arguments, so models leaned toward it even for file-based scripts that
document CLI-style positional arguments — a shape the args schema and
the runner have accepted all along. The guidance now scopes the object
form to named arguments (inline scripts included) and adds the
string-array form for positional ones, matching the wording the Python
implementation adopted.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 24, 2026 07:49
@shibayan shibayan added the enhancement Usage: [PRs], Target: new functionality or improvements; issues use the Feature issue type label Aug 24, 2026
@github-actions github-actions Bot added core Usage: [Issues, PRs], Target: packages/core skills Usage: [Issues, PRs], Target: Agent Skills labels Aug 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the default skills system-prompt guidance so models correctly choose between the two supported run_skill_script argument shapes (JSON object for named args vs string array for CLI-style positional args), and adds a regression test to lock in the wording behavior.

Changes:

  • Refined SCRIPT_INSTRUCTIONS to explicitly scope the JSON-object form to named arguments (including inline scripts).
  • Added guidance/example for file-based scripts that document positional CLI arguments via args: string[].
  • Added a prompt test asserting both guidance lines are present in the default prompt.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/core/src/skills/provider.ts Updates script-argument guidance in the default skills prompt.
packages/core/src/skills/provider.test.ts Adds a regression test ensuring the prompt distinguishes the two args shapes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@shibayan shibayan self-assigned this Aug 24, 2026
@shibayan
shibayan merged commit a4a7a1a into master Aug 24, 2026
9 checks passed
@shibayan
shibayan deleted the clarify-skill-script-argument-guidance branch August 24, 2026 07:55
@shibayan shibayan mentioned this pull request Aug 28, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Usage: [Issues, PRs], Target: packages/core enhancement Usage: [PRs], Target: new functionality or improvements; issues use the Feature issue type skills Usage: [Issues, PRs], Target: Agent Skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants