Creates a new skill directory at path/name/ containing a template
SKILL.md file ready to be filled in.
Arguments
- name
Skill name. Must be 1-64 characters, lowercase alphanumeric with single hyphens (no consecutive
--), and cannot start or end with a hyphen. Consider using a gerund form (e.g."parsing-logs").- path
Directory in which to create the skill. The skill directory itself will be
path/name. Can be one of:A known agent name such as
"claude_code"or"github_copilot"to use that agent's conventional project-scope path (seeskill_path()for the full list).A character string giving the directory path directly.
NULL(the default), in which case the path is resolved from theWF_AGENTenvironment variable, or by prompting in interactive sessions. SetWF_AGENTin your.Renviron(e.g. withusethis::edit_r_environ()) to avoid the prompt.
Examples
init_skill('my-skill', tempfile())
#> Created skill "my-skill" at /tmp/Rtmp1p0v0x/file1be542551cad/my-skill.
