Deletes a skill directory from a skills directory and removes it from the lock file.
Arguments
- name
The name of the skill to remove.
- path
The skills directory. Can be one of:
A known coding agent name such as
'claude_code','cursor', or'github_copilot'(seeskill_path()for the full list) to use that agent's conventional project-scope path.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.
- force
If
FALSE(the default), prompts for confirmation in interactive sessions. Set toTRUEto skip the prompt.
Examples
src <- tempfile()
dir.create(src)
writeLines(
c('---', 'name: example', 'description: An example skill.', '---'),
file.path(src, 'SKILL.md')
)
tmp <- tempfile()
add_skill(src, path = tmp)
#> Installed skill "example" to /tmp/Rtmp1p0v0x/file1be540f7de83/example.
remove_skill('example', tmp, force = TRUE)
#> Removed skill "example" from /tmp/Rtmp1p0v0x/file1be540f7de83.
