rapid — R 'API' Descriptions
Convert an 'API' description ('APID'), such as one that follows the 'OpenAPI Specification', to an R 'API' description object (a "rapid"). The rapid object follows the 'OpenAPI Specification' to make it easy to convert to and from 'API' documents.
https://rapid.api2r.org/, https://github.com/api2r/rapid
The project follows standard R package conventions with these key directories:
rapid/ ├── R/ # R source code │ ├── rapid-package.R # Auto-generated package docs │ └── *.R # Function definitions, 1 file ~= 1 exported function ├── .github/ │ ├── ISSUE_TEMPLATE/ # GitHub issue templates │ ├── skills/ # Agent skill definitions │ └── workflows/ # CI/CD configurations ├── tests/testthat/ # Test suite ├── man/ # Generated documentation ├── AGENTS.md # Main agent setup file ├── DESCRIPTION # Package metadata ├── NAMESPACE # Auto-generated export information ├── NEWS.md # Changelog └── Various config files # .gitignore, codecov.yml, etc.
For any feature, fix, or refactor:
- Update packages:
pak::pak() - Run tests — confirm passing before changes:
devtools::test(reporter = "check"). If any fail, stop and ask. - Plan — identify affected R files; check if new exports are needed.
- Test first — write failing test, then implement:
devtools::test(filter = "name", reporter = "check"). - Implement — minimal code to pass tests.
- Refactor — clean up, keep tests green.
- Document — document any new or changed exports.
- Verify: Run
devtools::test(reporter = "check"), thendevtools::check(error_on = "warning"). Resolve warnings, errors, and NOTEs. - News — add bullet at top of
NEWS.md(under dev heading):- User-facing changes only. 1 line, end with
. - Present tense, positive framing, function names (backticks +
()) near start:* `fn()` now accepts ...not* Fixed ... - Issue/contributor before final period:
* `fn()` now accepts ... (@user, #N).where#Nis the GitHub issue number being implemented (e.g.#42). - Get username:
gh api user --jq .login; get issue number from the user's prompt, the branch name (git branch --show-current), orgh issue list. - Never guess or invent an issue number. Before writing it, verify: (1) you received it from the user or the branch name, OR (2) you looked it up with
gh. If you cannot trace the number to a concrete source, use#noissue.
- User-facing changes only. 1 line, end with
- R console: use
--quiet --vanilla. - Always run
air format .after generating R code. - Comments explain why, not what.
| Triggers | Path |
|---|---|
| create GitHub issues | @.github/skills/create-issue/SKILL.md |
| document functions | @.github/skills/document/SKILL.md |
| from github | @.github/skills/github/SKILL.md |
| implement issue / work on #NNN | @.github/skills/implement-issue/SKILL.md |
| writing R functions / API design / error handling | @.github/skills/r-code/SKILL.md |
| search / rewrite code | @.github/skills/search-code/SKILL.md |
| writing or reviewing tests | @.github/skills/tdd-workflow/SKILL.md |