How-to: Build Rhino apps with LLM tools
Source:vignettes/how-to/build-rhino-apps-with-llm-tools.Rmd
build-rhino-apps-with-llm-tools.RmdLLM tools like GitHub Copilot and Claude Code can be extremely helpful when building apps with Rhino. However, the unique project structure and the use of the box package for module imports can make it harder for these tools to understand and assist effectively. The good news is that their performance can be significantly improved by providing custom instructions.
AGENTS.md
Many AI coding tools (including Claude Code, Cursor, and others) read
an AGENTS.md file at the
project root for repository-specific guidance. Rhino ships a curated AGENTS.md
template tailored to Rhino projects, covering box
imports, the Rhino module layout, unit-test conventions, and code
style.
-
rhino::init()adds it by default. Setagents_instructions = FALSEto opt out. - To add it to an existing Rhino project, run
rhino::use_agents_md(). IfAGENTS.mdalready exists you will be prompted to either abort or back up the existing file asAGENTS.md.bak.
Tool-specific instruction files
Some AI coding tools read instructions from their own dedicated file
rather than AGENTS.md. If the tool you use does not pick up
AGENTS.md automatically, copy the content of the Rhino
AGENTS.md template into the file that tool expects, for
example:
- GitHub Copilot:
.github/copilot-instructions.md - Claude Code:
CLAUDE.md - Cursor:
.cursor/rules/or.cursorrules
Refer to your tool’s documentation for the exact path it reads.