
Download a local copy of 'goodpractice4agents.md' to tell AI agents how to use this package.
Source:R/api.R
use_skill_gp.RdThe 'goodpractice4agents.md' file contains sufficient instructions for most AI agents to edit package code so that it passes most 'goodpractice' checks. The file can be directly edited and tweaked for personal use cases. An agent can be instructed to simply "run the file goodpractice4agents.md". Alternatively, the file can be directly downloaded from GitHub at https://github.com/ropensci-review-tools/goodpractice/tree/main/inst/skills/goodpractice4agents.md.
Arguments
- path
Local path where the file should be written. If
pathis an existing directory, the file is written asgoodpractice4agents.mdwithin it; otherwisepathis treated as the full target file name.- use_skills_subdir
If
TRUE, thepathwill be edited to write the file in to askills/sub-directory.- overwrite
If
FALSE(default) and file specified bypathalready exists, function will error and not overwrite the existing file.
Details
You can also instruct agents to call the companion function, learn_skill_gp, directly in order to learn and use the skill itself.
Examples
path <- file.path(tempdir(), "skill.md")
f <- use_skill_gp(path)
file.exists(f)
#> [1] TRUE
unlink(f)