Skip to contents

AI coding assistants write R code quickly, but they do not know how a WildObs data package is built. Left to guess, an assistant may count every row of observations as a detection (blanks and people included), join tables on the wrong key, or treat a 100-day deployment as a whole survey. WildObsR ships a skill for Claude: a short, plain-text guide to the data that Claude reads before it writes code for you. This vignette shows what the skill contains, how to install it, and how to check it yourself.

What the skill covers

The skill describes the data a public API key downloads, and nothing else. It covers:

  • how the deployments, observations, media and covariates tables join, and on which keys;
  • what each field means, including the fields WildObs adds to Camtrap DP, such as deploymentGroups, multiSeason_deploymentGroup and the covariates measured at five buffer scales;
  • which observations to filter out before counting detections, and why obscured threatened-species records cannot be placed on a camera;
  • what the data can and cannot support: for example, occupancy and abundance models, but not spatial capture-recapture, because individual identities, sex and age are almost never recorded.

The skill is documentation only. It contains no code and no data, and it never sees your API key.

Read it first

The skill ships inside WildObsR, so you can read every file before installing it:

# view where the skill sits in your installed copy of WildObsR
skill_dir <- system.file("claude-skills", "wildobsr-data", package = "WildObsR")

# view its files: an overview, and field-by-field reference tables
list.files(skill_dir, recursive = TRUE)
#> [1] "reference/metadata.md" "reference/tables.md"   "SKILL.md"
# view the first lines of the overview, which tell Claude when to use the skill
cat(head(readLines(file.path(skill_dir, "SKILL.md")), 14), sep = "\n")
#> ---
#> name: wildobsr-data
#> description: >
#>   How to understand and use WildObs camera-trap data downloaded with the WildObsR R package.
#>   Use when working with data packages from wildobs_dp_download() or project IDs from
#>   wildobs_mongo_query(); when reading the deployments, observations, media, or covariates
#>   tables or the package metadata (contributors, sources, temporal, taxonomic, spatial,
#>   WildObsMetadata); when joining those tables or counting detections; when interpreting
#>   deploymentID, observationID, eventID, mediaID, locationID, locationName, deploymentGroups,
#>   multiSeason_deploymentGroup, observationType, deltaTime_event, or covariates at the
#>   _point/_1km2/_3km2/_5km2/_10km2 buffer scales; when using extract_metadata() or
#>   recombine_deployment_groups() to build long-term deployments; or when asked
#>   what WildObs data can and cannot support (occupancy, abundance, activity, REM, distance
#>   sampling). Covers Camtrap DP and the WildObs extensions to it.

Install it

install_claude_skill() copies the skill into ~/.claude/skills, where Claude Code finds it in every project. Start a new Claude Code session afterwards to use it.

After you update WildObsR, install the matching version of the skill:

WildObsR::install_claude_skill(overwrite = TRUE)

To keep the skill within a single project instead, point dest at that project’s .claude/skills folder, for example install_claude_skill(dest = ".claude/skills").

Use it well

Claude uses the skill when a request mentions WildObs data, data packages or their fields. It still helps to say what you are doing, for example “I downloaded three WildObs projects with wildobs_dp_download(); count independent detections of feral cats per camera”. Treat the code it writes as you would a colleague’s: run it on the bundled example_datapackages() first, and check the counts against what you expect.

The skill’s numbers (how many projects, how complete each field is) describe the public database when that version of WildObsR was built, and drift as the database grows. The database itself is always the authority.