Skip to contents

Deletes a skill directory from a skills directory and removes it from the lock file.

Usage

remove_skill(name, path = skill_path(), force = FALSE)

Arguments

name

The name of the skill to remove.

path

The skills directory where the skill is installed. Defaults to skill_path(), which resolves the agent from WF_AGENT, a directory scan, or falls back to "claude_code".

force

If FALSE (the default), prompts for confirmation in interactive sessions. Set to TRUE to skip the prompt.

Value

The name of the removed skill, invisibly.

Examples

src <- tempfile()
dir.create(src)
writeLines(
  c('---', 'name: example', 'description: An example skill.', '---'),
  file.path(src, 'SKILL.md')
)
tmp <- tempfile()
add_skill(src, tmp)
#> Installed skill "example" to /tmp/RtmpdP4Y9A/file19421443be6f/example.
remove_skill('example', tmp, force = TRUE)
#> Removed skill "example" from /tmp/RtmpdP4Y9A/file19421443be6f.