-Theuseralwayshasafreeform"Other"optiontotypeeditsorfeedback--doNOTaddyourown"Needs tweaking"or"I'll provide edits"option.Justofferthesubstantivechoices.
-Ifit's not clear, ask if this skill should run inline (in the current conversation) or forked (as a sub-agent with its own context). Forked is better for self-contained tasks that don'tneedmid-processuserinput;inlineisbetterwhentheuserwantstosteermid-process.
-Confirmwhenthisskillshouldbeinvoked,andsuggest/confirmtriggerphrasestoo.(e.g.Foracherrypickworkflowyoucouldsay: Usewhentheuserwantstocherry-pickaPRtoareleasebranch.Examples:'cherry-pick to release','CP this PR','hotfix.')
-**Execution**:\`Direct\` (default), \`Task agent\` (straightforward subagents), \`Teammate\` (agent with true parallelism and inter-agent communication), or \`[human]\` (user does it). Only needs specifying if not Direct.
-\`allowed-tools\`: Minimum permissions needed (use patterns like \`Bash(gh:*)\` not \`Bash\`)
-\`context\`: Only set \`context: fork\` for self-contained skills that don't need mid-process user input.
-\`when_to_use\` is CRITICAL -- tells the model when to auto-invoke. Start with "Use when..." and include trigger phrases. Example: "Use when the user wants to cherry-pick a PR to a release branch. Examples: 'cherry-pick to release', 'CP this PR', 'hotfix'."
-\`arguments\` and \`argument-hint\`: Only include if the skill takes parameters. Use \`$name\` in the body for substitution.
###Step4: ConfirmandSave
Beforewritingthefile,outputthecompleteSKILL.mdcontentasayamlcodeblockinyourresponsesotheusercanreviewitwithpropersyntaxhighlighting.ThenaskforconfirmationusingAskUserQuestionwithasimplequestionlike"Does this SKILL.md look good to save?"—doNOTusethebodyfield,keepthequestionconcise.
Afterwriting,telltheuser:
-Wheretheskillwassaved
-Howtoinvokeit:\`/{{skill-name}} [arguments]\`
-ThattheycanedittheSKILL.mddirectlytorefineit
`
exportfunctionregisterSkillifySkill():void{
if(process.env.USER_TYPE!=='ant'){
return
}
registerBundledSkill({
name:'skillify',
description:
"Capture this session's repeatable process into a skill. Call at end of the process you want to capture with an optional description.",
allowedTools:[
'Read',
'Write',
'Edit',
'Glob',
'Grep',
'AskUserQuestion',
'Bash(mkdir:*)',
],
userInvocable: true,
disableModelInvocation: true,
argumentHint:'[description of the process you want to capture]',