Logo von R Tidyverse Style

R Tidyverse Style

Organisation
posit-dev
r-tidyverse-style

Verwenden Sie diesen Skill, wenn Sie R-Code auf tidyverse-Stil prüfen oder bereinigen, Formatierung oder Namen vereinheitlichen, überflüssige Kommentare oder Wrapper entfernen oder den Stil überarbeiten möchten, ohne das Verhalten zu verändern. Verwenden Sie ihn auch, wenn Sie umfangreicheren neuen R-Paket-Code schreiben und tidyverse-Stil wünschen oder das Paket bereits diesem Stil folgt. Nicht für routinemäßige kleinere Änderungen oder allgemeine Prüfungen auf Korrektheit, Sicherheit oder Testqualität.

Add to TypingMind

Übersicht

Herausgeberposit-dev
Repositoryskills
Skill-Namer-tidyverse-style
Sterne
537
Forks
54
Mitgelieferte Dateien
Nur Anweisungen
LizenzMIT
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • In sich abgeschlossen

    Alles, was das Modell braucht, steht in den Anweisungen — keine zusätzlichen Dateien zum Synchronisieren.

  • Open Source

    Von posit-dev auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill R Tidyverse Style in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/posit-dev/skills/tree/main/r-lib/r-tidyverse-style
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/posit-dev/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/r-lib/r-tidyverse-style .claude/skills/r-tidyverse-style
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie R Tidyverse Style in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt R Tidyverse Style automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist R Tidyverse Style nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

Tidyverse style for R package code

Prefer the package's established conventions over the tidyverse guide unless the user requests a migration. Style is not proof of correctness; keep public behavior unchanged during cleanup.

Work through the task

  1. Set scope and mode. For a review, inspect the requested files or diff without editing. For cleanup, change only the agreed scope. When writing new code, inspect neighboring R/ files, tests, and style configuration before choosing conventions. Check DESCRIPTION for supported R versions and dependencies when relevant.
  2. Protect interfaces. Before renaming or reorganizing code, check exports, roxygen/NAMESPACE, S3/S4 methods, callers, tests, and user-visible conditions. Don't treat a public rename, changed default, error, return value, dependency, or supported R version as cosmetic.
  3. Triage observations. Distinguish style, maintainability, and possible bugs. For generated-looking code, investigate comments that restate code, duplicate checks or helpers, pointless wrappers, speculative tryCatch() fallbacks, and docs or tests that contradict behavior. Confirm against callers and tests before removing anything; code provenance alone proves nothing. These are review heuristics, not tidyverse rules.
  4. Change in risk order. Format scoped files first. Then simplify only verified redundancy, retaining comments about intent or constraints. Propose behavior-sensitive changes (pipe conversions, evaluation order, control flow, public names, error text) separately; make them only if the user has authorized that scope, with focused tests. Don't turn a style pass into an unrequested refactor.
  5. Verify and report. Inspect the diff; run relevant focused tests and broader package checks when warranted. For review-only work, give prioritized findings with file/line references and suggested edits, without modifying files. For edits, state what changed, what was deferred, and which checks actually ran. Don't claim a style pass is a correctness or security review.

Style rules

The rules below selectively paraphrase the tidyverse style guide (source, consulted at commit 2aed77e); this is not an official tidyverse skill. The links are citations, not required reading. Open a relevant chapter only when a rule needs clarification or the user requests verification, never all chapters by default.

Syntax and names

Source: Syntax.

  • Prefer descriptive snake_case names: nouns for values, verbs for functions. Dots can obscure S3 method names. Check compatibility before renaming names used outside a file or package.
  • Use two-space indentation, no tabs. Put spaces after commas, around ordinary infix operators, and around = in named arguments; not just inside parentheses or around $, ::, :, ^, or unary -. Tidy-evaluation operators have exceptions. Prefer syntax-aware formatting to regex edits.
  • Use <- for assignment and = for named arguments; avoid semicolons and multiple statements on a line.
  • Put opening braces at line ends, closing braces at line starts, and else beside the preceding }. Use braces for multiline branches and loops. Don't replace if with vectorized ifelse() or change &/| to &&/|| without checking semantics.
  • Put arguments of a long call on separate, consistently indented lines. Aim for readable line lengths (80 characters is a target, not a hard limit).
  • Group related statements into visual paragraphs; use a single empty line to separate distinct thoughts, functions, or pipelines, not every statement. Avoid empty lines at the start or end of functions. A blank line before a comment block can tie its explanation to the code below.
  • Prefer double quotes unless single quotes reduce escaping; spell logical constants TRUE and FALSE. Prefix comments with # . Keep comments explaining decisions or constraints; remove narration only after checking its purpose.
  • Name arguments that control computation or override defaults, but don't require names for every conventional first data argument. Avoid partial matching.

Functions and pipes

Sources: Functions, Pipes.

  • Use function(...) { ... } for named functions. Short single-expression anonymous functions can use \(x) ...; use function() for longer ones. Don't introduce formula lambdas or wrappers merely for style.
  • Put long function definitions on multiple lines with consistent indentation. Use return() chiefly for early exits, on its own line; otherwise rely on the last expression. Side-effect functions may invisibly return their input, but changing an existing return value isn't cosmetic.
  • Use pipes for transformations of one primary object; name intermediates when several objects participate or an intermediate has meaning. In multiline pipes, put the pipe at line end and indent steps by two spaces. Short pipes and several assignment layouts are acceptable.
  • The guide favors |>, but don't mass-convert %>%: check the minimum R version, placeholders, pronouns, magrittr operators, and evaluation behavior. Treat migration as separate, tested work.

Package files

Sources: Files, Package files, Tests.

  • Use descriptive lowercase .R filenames with consistent - or _ separators. Name a single-function file after its function; give a file of related functions a concise, evocative name. The guide uses deprec- for deprecated-function files.
  • Put documented public functions before private helpers. If functions share a roxygen documentation block, place them immediately after it. Use section comments when helpful. Check collate order, registration, generated files, and load-time effects before moving code.
  • Match tests/testthat/test-<name>.R to R/<name>.R when organizing tests. The book specifies test-file organization, not test design or coverage goals.
  • In scripts, group library() calls near the top. Don't add library() calls inside package code or infer package dependency policy from this script guidance.

Documentation and diagnostics

Sources: Documentation, Error messages.

  • Put roxygen comments next to code. Use concise sentence-case titles without final periods; explicit @description for longer descriptions. Prefix lines with #' , indent wrapped tags consistently, write complete parameter/return sentences, and use @inheritParams for shared text.
  • Use backticks for R code, argument names, and values, not package names merely because they're packages. Add @seealso, @family, and links where useful. Use @noRd for internal functions documented with roxygen; don't add roxygen to every helper.
  • Lead errors with a clear problem and useful location/details. Use “must” for a clear requirement and “Can't” when the failed operation is more natural. Use bullets or hints only when warranted; don't invent a diagnosis. The guide illustrates cli conventions, but adding a dependency is a separate decision.
  • Check docs against actual signatures, defaults, return values, and examples. Error wording may be user-visible or snapshotted; changing validation rules, condition classes, or error timing isn't style cleanup.

ggplot2 (when relevant)

Source: ggplot2. Put + at line ends, indent subsequent layers, and prefer transforming data before calling ggplot() rather than inside its data argument. Verify any plot restructuring against existing behavior.

Optional tools

Use air format R/file.R for scoped formatting (or air format --check R/file.R to check without writing). If installed, jarl check . provides lint findings and ry check flags possible type errors. Honor project configuration; investigate diagnostics rather than automatically applying fixes. None of these tools is required or proves behavior unchanged. Report unavailable tools or failing pre-existing tests.

Examples

  • Reviewing R/import.R: flag a comment that merely narrates the next line as style noise. Treat tryCatch(..., error = function(e) NULL) as a possible bug to investigate, not something to delete during a review.
  • Cleaning a package that supports R 4.0: format the requested file, but leave %>% and exported names alone. Propose any base-pipe migration or public rename separately, with compatibility analysis and tests.

Use r-testthat for test design and r-package-development for package infrastructure rather than expanding this style pass into either task.

Häufig gestellte Fragen

Was macht der KI-Skill R Tidyverse Style?

Verwenden Sie diesen Skill, wenn Sie R-Code auf tidyverse-Stil prüfen oder bereinigen, Formatierung oder Namen vereinheitlichen, überflüssige Kommentare oder Wrapper entfernen oder den Stil überarbeiten möchten, ohne das Verhalten zu verändern. Verwenden Sie ihn auch, wenn Sie umfangreicheren neuen R-Paket-Code schreiben und tidyverse-Stil wünschen oder das Paket bereits diesem Stil folgt. Nicht für routinemäßige kleinere Änderungen oder allgemeine Prüfungen auf Korrektheit, Sicherheit oder Testqualität.

Warum R Tidyverse Style in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. R Tidyverse Style besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich R Tidyverse Style in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/posit-dev/skills/tree/main/r-lib/r-tidyverse-style ein. TypingMind liest die Datei SKILL.md und installiert den Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können R Tidyverse Style nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit R Tidyverse Style verwenden?

So viele Sie möchten. In TypingMind können Sie R Tidyverse Style mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill R Tidyverse Style kostenlos?

Ja. Der Skill wird von posit-dev auf GitHub unter der Lizenz MIT veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇