Skip to content

Conversation

@LTS2
Copy link
Contributor

@LTS2 LTS2 commented Jan 14, 2026

Summary

Problem

When a skill was invoked as /my-skill (without arguments), the $ARGUMENTS placeholder remained as literal text in the prompt. This caused the agent to see <user-request>$ARGUMENTS</user-request> instead of an empty user request, making it ignore the skill instructions entirely.

Solution

In formatCommandTemplate(), substitute $ARGUMENTS with actual arguments (or empty string) before adding the content to the output. Uses function replacement to prevent $ sequences in user args from being interpreted as special patterns.

Test Plan

  • Existing tests pass (bun test src/hooks/auto-slash-command/)
  • Type check passes (bun run typecheck)
  • Build succeeds (bun run build)

Summary by cubic

Fixes $ARGUMENTS substitution in auto-slash-command skill templates to prevent the placeholder from appearing when a skill is invoked without arguments. We now replace $ARGUMENTS with the provided args or an empty string using function replacement, so the agent sees a clean prompt and follows the skill instructions.

Written for commit b7b8772. Summary will update on new commits.

…emplates

Fixes code-yeongyu#640

When skills are invoked without arguments, the $ARGUMENTS placeholder
was left as literal text, causing the agent to ignore skill instructions.
Now $ARGUMENTS is replaced with the actual arguments (or empty string).

Uses function replacement to prevent $ sequences in user args from
being interpreted as special patterns.
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

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.

[Bug]: Skills invoked as slash commands without arguments ignore skill instructions

1 participant