thinkr-open/golem/golem-fix-missing-ns
Claude Code and agent skill by thinkr-open/golem
- community
Checking that the SKILL.md file is still in the repository.
Validate that all module input/output IDs are properly namespaced. Triggers on: - "check my modules for missing ns" - "find missing ns in modules" - "validate module namespaces" Do not trigger on: - when the user is not working inside a golem app
Install
npx vskill@latest install thinkr-open/golem/golem-fix-missing-nsSKILL.md
The same SKILL.md was published earlier as cran/golem/golem-fix-missing-ns.
Check for Missing ns() in Modules
Validate that all module input/output IDs are properly namespaced.
Why Namespacing Matters
In Shiny modules, all input and output IDs must be namespaced using the ns() function. This prevents ID conflicts when the same module is used multiple times in an app.
Correct vs Incorrect
✅ Correct
❌ Incorrect
What to Check
In Module UI Functions
- All input IDs:
textInput(),selectInput(),actionButton(), etc. - All output IDs:
plotOutput(),tableOutput(),uiOutput(), etc. - All input control IDs used in
ns()calls
In Module Server Functions
- JavaScript handler IDs that reference the module namespace
observeEvent(input$...)referencesoutput$...definitionsrenderUI()generated element IDs
Places to Look
- Any file starting with
mod_in theR/directory - Both UI and server functions within modules
How Claude Checks
- Locate all IDs in module files (files starting with
mod_)
- Search for common patterns:
Input(),Output(), input/output IDs
- Verify namespacing by checking each ID is wrapped in
ns()
- Exception: Only the first
NS(id)definition doesn't need wrapping
- Report findings
- If all IDs are properly namespaced: ✅ All good
- If missing IDs found: ❌ List them and ask for permission to fix
- Fix if approved
- Wrap missing IDs in
ns() - Preserve code structure and formatting
Common Mistakes
| Mistake | Fix | |
|---|---|---|
selectInput("myid", ...) | selectInput(ns("myid"), ...) | |
plotOutput("plot") | plotOutput(ns("plot")) | |
observeEvent(input$button) | observeEvent(input$submit, ...) with ID properly namespaced | |
uiOutput("dynamic") | uiOutput(ns("dynamic")) |
When to Run
- After creating or modifying module UI functions
- Before running
devtools::check() - When adding new inputs/outputs to modules
- Before deploying to production
Example Workflow
Notes
- This check is for UI and reactive server code, not data processing functions
- Only module files (
mod_*.R) need this check - Regular functions (
fct_*.R,utils_*.R) don't need namespace wrapping - Module server functions are called with the module ID, which handles the namespacing
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinginst/agent-skills/skills/golem-fix-missing-ns/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/thinkr-open/golem/golem-fix-missing-ns)