OpenParable
Skip to content
← Back to skills

Golem Create Golem

Development
golem-create-golem

Golem Create Golem is an Agent Skill for development published in the ThinkR-open/golem repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Create a new golem Shiny application. Triggers on: - "create a golem app" - "create a shiny app with golem" - "initialize a golem app" Do not trigger on: - when building Shiny applications without using the golem package

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/ThinkR-open/golem/blob/HEAD/inst/agent-skills/skills/golem-create-golem/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/golem-create-golem, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Create Golem App

You are helping a user create a new golem Shiny application. Follow the guidelines in the CLAUDE.md file from the golem-claude repository.

Key Steps

  1. Use golem::create_golem(name) to create the application
  2. The name should be the basename of the desired folder, or one provided by the user
  3. Never create the folder yourself - golem will do it
  4. After creation, guide the user to run Rscript -e "golem::run_dev()" from within the new app directory

Important Rules

  • A golem app IS an R package - follow all R package conventions
  • Keep the R/ folder flat - no subfolders
  • Use usethis::use_build_ignore() for files that don't fit the package structure
  • Never edit NAMESPACE by hand
  • Use devtools::document() after any roxygen changes
  • Development scripts go in dev/ folder
  • Data creation goes in data-raw/ folder
  • Follow the tidyverse style guide

Module Naming Convention

  • Modules: R/mod_<name>.R
  • Module functions: R/mod_<name>_fct_<fn>.R
  • Module utilities: R/mod_<name>_utils_<fn>.R
  • Standalone functions: R/fct_<name>.R
  • Utilities: R/utils_<name>.R

Testing

Always create modules and functions with tests:

  • golem::add_module("name", with_test = TRUE)
  • golem::add_fct("name", with_test = TRUE)
  • golem::add_utils("name", with_test = TRUE)

Next Steps After Creation

After creating the app, remind the user to:

  1. Navigate to the created folder
  2. Run Rscript -e "golem::run_dev()" to launch the app
  3. Use devtools::test() to run tests
  4. Use devtools::document() when adding roxygen documentation