i18n/de/skills/scaffold-shiny-app/SKILL.md
Shiny-App mit golem (produktionsreif), rhino (modularer Ansatz) oder Vanilla-Shiny (einfach) erstellen. Behandelt Projektstruktur, grundlegendes UI/Server-Setup und Verifikation der lokalen Ausführung. Verwenden, wenn eine neue Shiny-App gestartet oder zwischen Scaffolding-Frameworks gewählt werden soll.
npx skillsauth add pjt222/agent-almanac scaffold-shiny-appInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Eine neue Shiny-Anwendung mit dem geeigneten Framework für den Produktionsfall scaffolden.
golem, rhino oder vanillaDas richtige Scaffolding-Framework basierend auf Projektanforderungen auswählen.
| Framework | Wann verwenden |
|-----------|----------------|
| golem | Produktions-Apps, R-Paket-Struktur, CRAN-Deployment |
| rhino | Modulare Apps, box-Module, JavaScript-Assets |
| vanilla | Schnelle Prototypen, einfache Apps, kein Framework-Overhead |
Erwartet: Framework-Auswahl stimmt mit Projektkomplexität und Team-Expertise überein.
Bei Fehler: Wenn unsicher, mit vanilla beginnen und später auf golem/rhino migrieren, wenn die App wächst.
Das gewählte Framework installieren und das Projekt initialisieren.
Für golem:
install.packages("golem")
golem::create_golem("myapp")
Für rhino:
install.packages("rhino")
rhino::init("myapp")
Für Vanilla Shiny:
install.packages("shiny")
# Projektstruktur manuell erstellen
dir.create("myapp")
dir.create("myapp/R")
dir.create("myapp/www")
# App-Dateien erstellen
file.create("myapp/app.R")
file.create("myapp/R/ui.R")
file.create("myapp/R/server.R")
Erwartet: Projektverzeichnis mit Framework-spezifischer Struktur erstellt.
Bei Fehler: Wenn Package-Installation fehlschlägt, prüfen ob CRAN erreichbar ist: options(repos = c(CRAN = "https://cran.rstudio.com/")). Für golem auf GitHub: remotes::install_github("Thinkr-open/golem").
Grundlegende UI- und Server-Komponenten implementieren.
Für golem (R/app_ui.R und R/app_server.R):
# R/app_ui.R
app_ui <- function(request) {
tagList(
golem_add_external_resources(),
fluidPage(
titlePanel("My App"),
sidebarLayout(
sidebarPanel(
selectInput("dataset", "Choose a dataset:",
choices = c("iris", "mtcars"))
),
mainPanel(
tableOutput("table")
)
)
)
)
}
# R/app_server.R
app_server <- function(input, output, session) {
output$table <- renderTable({
get(input$dataset)
})
}
Für Vanilla Shiny (app.R):
library(shiny)
ui <- fluidPage(
titlePanel("My App"),
sidebarLayout(
sidebarPanel(
selectInput("dataset", "Choose a dataset:",
choices = c("iris", "mtcars"))
),
mainPanel(
tableOutput("table")
)
)
)
server <- function(input, output, session) {
output$table <- renderTable({
get(input$dataset)
})
}
shinyApp(ui, server)
Erwartet: UI und Server ohne Syntaxfehler definiert. App startet ohne Laufzeitfehler.
Bei Fehler: Wenn get(input$dataset) Fehler erzeugt, sicherstellen, dass Datensatznamen mit R-Basisumgebung zugänglichen Datensätzen übereinstimmen (iris, mtcars, etc.).
Die App lokal ausführen und grundlegende Funktionalität prüfen.
Für golem:
golem::run_dev()
Für Vanilla:
# Im Projektverzeichnis
shiny::runApp("myapp")
# Oder wenn bereits in myapp/
shiny::runApp()
App öffnet sich im Standard-Browser oder zeigt die URL an:
Listening on http://127.0.0.1:PORT
Erwartet: App startet ohne Fehler. Basis-UI rendert korrekt. Dropdown-Auswahl ändert Tabelleninhalt.
Bei Fehler: Wenn Port belegt ist, anderen Port angeben: shiny::runApp(port = 3838). Wenn App mit Fehler abbricht, Konsolen-Fehlerausgabe für Paket-fehlende oder Syntaxfehler prüfen.
README.md und grundlegende Konfiguration hinzufügen.
# README.md erstellen
writeLines(c(
"# My App",
"",
"## Overview",
"Brief description of the app.",
"",
"## Setup",
"```r",
"install.packages('shiny')",
"shiny::runApp()",
"```",
"",
"## Structure",
"- `R/` — App-Logik (UI, Server, Module)",
"- `www/` — Statische Assets (CSS, JS, Bilder)",
"- `tests/` — App-Tests"
), "myapp/README.md")
Erwartet: README erklärt App-Zweck und Setup-Schritte.
Bei Fehler: Wenn README-Erstellung fehlschlägt, manuell im Texteditor erstellen.
devtools::check() laufen lassen, um Paket-Konformität sicherzustellen.select() exportieren, stets pkg::function() verwenden (z. B. dplyr::select()).input$*-Werte nur innerhalb reaktiver Kontexte (reactive(), observe(), render*()). Außerhalb schlägt dies fehl.run_app() die Entry-Point-Funktion. In Vanilla ist shinyApp(ui, server) der Entry-Point.www/-Verzeichnis: Statische Dateien müssen in www/ liegen. Auf sie wird mit relativem Pfad ohne www/-Präfix zugegriffen.build-shiny-module — wiederverwendbare Shiny-Module erstellentest-shiny-app — App mit shinytest2 testendeploy-shiny-app — App auf shinyapps.io oder Posit Connect deployendesign-shiny-ui — UI mit bslib und modernen Themes gestaltentesting
Launch all available agents in parallel waves for open-ended hypothesis generation on problems where the correct domain is unknown. Use when facing a cross-domain problem with no clear starting point, when single-agent approaches have stalled, or when diverse perspectives are more valuable than deep expertise. Produces a ranked hypothesis set with convergence analysis and adversarial refinement.
tools
Write integration tests for a Node.js CLI application using the built-in node:test module. Covers the exec helper pattern, output assertions, filesystem state verification, cleanup hooks, JSON output parsing, error case testing, and state restoration after destructive tests. Use when adding tests to an existing CLI, testing a new command, verifying adapter behavior across frameworks, or setting up CI for a CLI tool.
development
Screen a proposed trademark for conflicts and distinctiveness before filing. Covers trademark database searches (TMview, WIPO Global Brand Database, USPTO TESS), distinctiveness analysis using the Abercrombie spectrum, likelihood of confusion assessment using DuPont factors and EUIPO relative grounds, common law rights evaluation, and goods/services overlap analysis. Produces a conflict report with a risk matrix. Use before adopting a new brand name, logo, or slogan — distinct from patent prior art search, which uses different databases, legal frameworks, and analysis methods.
tools
Scaffold a new CLI command using Commander.js with options, action handler, three output modes (human-readable, quiet, JSON), and optional ceremony variant. Covers command naming, option design, shared context patterns, error handling, and integration testing. Use when adding a command to an existing Commander.js CLI, designing a new CLI tool from scratch, or standardizing command structure across a multi-command CLI.