feat(cron): expand skill commands in cron job prompts#868
Open
chenhg5 wants to merge 1 commit into
Open
Conversation
When a cron job's prompt starts with "/", parse it as a slash command and attempt to resolve it through the skill registry. If the command matches a known skill, use BuildSkillInvocationPrompt to expand it into full skill instructions before sending to the agent. This allows cron jobs to invoke skills just like regular chat messages. Unknown slash commands (not registered skills) pass through unchanged to the agent. Changes: - Add skill expansion logic in ExecuteCronJob before creating Message - Log expanded skill name and args for debugging - Add regression tests for skill expansion and unknown command passthrough Closes #856 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
chenhg5
commented
May 6, 2026
Owner
Author
chenhg5
left a comment
There was a problem hiding this comment.
LGTM — clean skill command expansion for cron prompts.
The inline approach (resolve in ExecuteCronJob using e.skills.Resolve + BuildSkillInvocationPrompt) is simpler than #860's separate expandCronSkillPrompt method. Unknown slash commands correctly pass through to the agent unchanged.
✅ Logging on expansion (good for debugging)
✅ Two regression tests: expansion + passthrough for unknown commands
✅ Closes #856
This was referenced May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BuildSkillInvocationPromptto expand into full skill instructionsThis allows cron jobs to invoke skills like
/daily-brief for today, which will be expanded into full skill instructions before being sent to the agent.Test plan
go build ./...passesgo vet ./...passesgo test ./...passes (all tests)TestExecuteCronJob_ExpandsSkillCommandTestExecuteCronJob_UnknownSlashCommandPassthroughCloses #856
🤖 Generated with Claude Code