r-conventions

r-conventions:R 代码规范,涵盖 R 4.1+、tidyverse/base 风格、styler/lintr、roxygen2、testthat、错误处理、输入验证、与 C/C++/Rust 的互操作以及 CRAN 合规性。在编写或审查 R 代码时加载。

仓库最近推送
GitHub Stars
182
Forks
19
Issues / PRs
2

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "r-conventions":https://skillpi.com/zh/skills/deepskill-3a8bf230628b5367c8669a0e4ef3e255b5b2dd8e63a1e3c5e5fbc0ad5bdb01a7。安装前核对上游来源和版本:https://github.com/Goldziher/ai-rulez。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

r-conventions:R 代码规范,涵盖 R 4.1+、tidyverse/base 风格、styler/lintr、roxygen2、testthat、错误处理、输入验证、与 C/C++/Rust 的互操作以及 CRAN 合规性。在编写或审查 R 代码时加载。

0 下载

介绍来源: third_party · Goldziher · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: r-conventions
description: R code conventions covering R 4.1+, tidyverse/base style, styler/lintr, roxygen2, testthat, error handling, input validation, C/C++/Rust interop, and CRAN compliance. Load when writing or reviewing R code.
  • R 4.1+, a consistent style guide (e.g., tidyverse), a formatter (e.g., styler) and a linter (e.g., lintr).
  • Base R pipe |> over magrittr %>%, prefer base R when tidyverse not needed.
  • Package dev: devtools/usethis/roxygen2, testthat (80%+ via a coverage tool, e.g., covr).
  • Documentation: roxygen2 for inline docs and NAMESPACE management. @examples on all exports.
  • Vignettes with knitr/rmarkdown for long-form documentation and tutorials.
  • Error handling: tryCatch()/withCallingHandlers(), cli::cli_abort() for user-facing errors.
  • Input validation: checkmate or rlang::arg_match() for function parameter validation.
  • Security: a dependency vulnerability scanner (e.g., oysteR).
  • C/C++: Rcpp or .Call(), PROTECT/UNPROTECT all R objects. Rust: extendr/rextendr.
  • CRAN: R CMD check --as-cran zero warnings/notes, maintain DESCRIPTION with proper versioning.
  • Anti-patterns: eval(parse(text=)) with user input, mixing Rcpp and raw C API, T/F instead of TRUE/FALSE.

版本历史

  1. v5.15.0 GitHub ↗
    原版更新说明

    ## What's Changed * chore(deps): bump github.com/parquet-go/parquet-go from 0.32.0 to 0.32.1 in /tools/skillbench by @dependabot[bot] in https://github.com/Goldziher/ai-rulez/pull/597 * chore(deps): bump @astrojs/starlight from 0.42.11 to 0.43.1 in /website by @dependabot[bot] in https://github.com/Goldziher/ai-rulez/pull/595 * feat(plugin): configurable Cursor hook root fallback by @Goldziher in https://github.com/Goldziher/ai-rulez/pull/600 * chore: refresh dependencies, harness names and fix AR005 flag-value false positive by @Goldziher in https://github.com/Goldziher/ai-rulez/pull/601 * chore(release): prepare ai-rulez 5.15.0 by @Goldziher in https://github.com/Goldziher/ai-rulez/pull/602 **Full Changelog**: https://github.com/Goldziher/ai-rulez/compare/v5.14.1...v5.15.0

  2. v5.14.1 GitHub ↗
    原版更新说明

    ## What's Changed * fix(config): honor XDG_CACHE_HOME for the user cache by @Goldziher in https://github.com/Goldziher/ai-rulez/pull/592 **Full Changelog**: https://github.com/Goldziher/ai-rulez/compare/v5.14.0...v5.14.1

  3. v5.14.0 GitHub ↗
    原版更新说明

    ## What's Changed * chore(deps): bump @astrojs/starlight from 0.42.10 to 0.42.11 in /website by @dependabot[bot] in https://github.com/Goldziher/ai-rulez/pull/576 * fix(harnessnames): refresh copilot and cortex built-ins from their sources by @Goldziher in https://github.com/Goldziher/ai-rulez/pull/583 * fix(config): make the session-start briefing source-aware by @Goldziher in https://github.com/Goldziher/ai-rulez/pull/584 * feat(mcp): expose worktree_setup for agent-created worktrees by @Goldziher in https://github.com/Goldziher/ai-rulez/pull/587 * docs(publish): add a verify-before-install recipe for consumers by @Goldziher in https://github.com/Goldziher/ai-rulez/pull/585 * chore(release): prepare ai-rulez 5.14.0 by @Goldziher in https://github.com/Goldziher/ai-rulez/pull/588 **Full Changelog**: https://github.com/Goldziher/ai-rulez/compare/v5.13.4...v5.14.0

  4. v5.13.4 GitHub ↗
    原版更新说明

    ## What's Changed * test(bench): measure native and MCP skill discovery by @Goldziher in https://github.com/Goldziher/ai-rulez/pull/575 * fix(npm): stop the Windows CLI tree when the wrapper exits by @Goldziher in https://github.com/Goldziher/ai-rulez/pull/574 * fix(mcp): improve Claude skill discovery for v5.13.4 by @Goldziher in https://github.com/Goldziher/ai-rulez/pull/577 **Full Changelog**: https://github.com/Goldziher/ai-rulez/compare/v5.13.3...v5.13.4

  5. v5.13.3 GitHub ↗
    原版更新说明

    ## What's Changed * ci: keep generated release artifacts out of Git by @Goldziher in https://github.com/Goldziher/ai-rulez/pull/567 * docs: clarify native and MCP skill discovery by @Goldziher in https://github.com/Goldziher/ai-rulez/pull/568 * fix(npm): preserve stdout and forward termination by @Goldziher in https://github.com/Goldziher/ai-rulez/pull/566 * fix(pathglob): preserve Unicode literals by @Goldziher in https://github.com/Goldziher/ai-rulez/pull/569 * fix(semver): validate release age before duration conversion by @Goldziher in https://github.com/Goldziher/ai-rulez/pull/570 * fix(agents): preserve adjacent AGENTS.md sections by @Goldziher in https://github.com/Goldziher/ai-rulez/pull/571 * bench: add paired skill discovery fixture and protocol by @Goldziher in https://github.com/Goldziher/ai-rulez/pull/572 * chore(release): prepare ai-rulez 5.13.3 by @Goldziher in https://github.com/Goldziher/ai-rulez/pull/573 **Full Changelog**: https://github.com/Goldziher/ai-rulez/compare/v5.13.2...v5.13.3

此处仅展示最近 5 个版本。 在原站查看完整版本历史 ↗

当前收录版本

0.0.1

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值82/100

亮点

  • 提供 R 语言现代开发全流程规范指导,实用性强
  • 覆盖 tidyverse/base 风格、测试、文档、错误处理、CRAN 合规等关键维度
触发精准88/100

亮点

  • 触发场景明确:编写或审查 R 代码时加载
  • 覆盖 R 开发核心需求,边界清晰
结构规范68/100

待提升项

  • 缺少步骤划分与端到端示例 原报告严重程度:轻微

    内容以 bullet points 组织,缺乏 Phase/步骤划分和具体执行示例

    改进建议:建议补充规范落地步骤和端到端示例,提升可操作性

  • 文档结构可进一步优化 原报告严重程度:轻微

    作为规范指南,可考虑分章节组织(如风格、测试、文档等)

    改进建议:建议按主题分章节,提升可读性和结构化程度

亮点

  • frontmatter 完整,内容覆盖全面
执行可靠75/100

亮点

  • 所列工具来源明确,建议合理,符合 R 社区最佳实践
证据可验 (前四项均值)78/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。