| Skill | R Documentation |
R6 class representing a skill with progressive loading capabilities. A Skill consists of:
Level 1: YAML frontmatter (name, description) - always loaded
Level 2: SKILL.md body (detailed instructions) - on demand
Level 3: R scripts (executable code) - executed by agent
nameThe unique name of the skill (from YAML frontmatter).
descriptionA brief description of the skill (from YAML frontmatter).
aliasesOptional aliases that should also trigger this skill.
when_to_useOptional triggering guidance for this skill.
pathsOptional file glob patterns that make this skill relevant.
pathThe directory path containing the skill files.
manifestRaw YAML frontmatter parsed from SKILL.md.
new()Create a new Skill object by parsing a SKILL.md file.
Skill$new(path)
pathPath to the skill directory (containing SKILL.md).
A new Skill object.
load()Load the full SKILL.md body content (Level 2).
Skill$load()
Character string containing the skill instructions.
get_manifest()Return the raw SKILL.md frontmatter as a list.
Skill$get_manifest()
Named list of metadata fields.
to_store_record()Export the skill to a structured record suitable for a skill store.
Skill$to_store_record( include_body = TRUE, include_files = TRUE, include_assets = FALSE )
include_bodyInclude the full SKILL.md body in the record.
include_filesInclude textual source files from the skill folder.
include_assetsInclude a list of asset file names.
A named list ready for JSON serialization.
metadata_text()Return concise metadata text used for routing and listing.
Skill$metadata_text()
Character scalar.
matches_paths()Check whether the skill's paths patterns match any provided file paths.
Skill$matches_paths(file_paths = character(0), cwd = NULL)
file_pathsCharacter vector of file paths.
cwdOptional working directory used to relativize absolute paths.
Logical scalar.
execute_script()Execute an R script from the skill's scripts directory (Level 3). Uses callr for safe, isolated execution.
Skill$execute_script(script_name, args = list())
script_nameName of the script file (e.g., "normalize.R").
argsNamed list of arguments to pass to the script.
The result from the script execution.
list_scripts()List available scripts in the skill's scripts directory.
Skill$list_scripts()
Character vector of script file names.
list_resources()List available reference files in the skill's references directory.
Skill$list_resources()
Character vector of reference file names.
read_resource()Read content of a reference file from the references directory.
Skill$read_resource(resource_name)
resource_nameName of the reference file.
Character string containing the resource content.
get_asset_path()Get the absolute path to an asset in the assets directory.
Skill$get_asset_path(asset_name)
asset_nameName of the asset file or directory.
Absolute path string.
print()Print a summary of the skill.
Skill$print()
clone()The objects of this class are cloneable with this method.
Skill$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.