Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计异常

moai-lang-r摩艾朗日

Agent Skill

moai-lang-r 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,454

周安装

60

GitHub Stars

964

下载量

475
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:moai-lang-r(摩艾朗日)
来源仓库:https://github.com/modu-ai/moai-adk
仓库路径:skills/moai-lang-r
安装命令:
npx skills add https://github.com/modu-ai/moai-adk --skill moai-lang-r
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/modu-ai/moai-adk --skill moai-lang-r

简介

moai-lang-r 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词快速定位候选结果。
  • 通过 npx skills add 命令从 moai-adk 仓库安装并使用。
  • 安装前建议确认权限范围和维护状态,注意是否会触发联网或命令执行。
  • 具体用法可结合来源仓库 README 进一步核验实际功能边界。

SKILL.md

Quick Reference (30 seconds)

R 4.4+ Development Specialist - tidyverse, ggplot2, Shiny, renv, and modern R patterns.

Auto-Triggers: Files with.R extension,.Rmd,.qmd, DESCRIPTION, renv.lock, Shiny or ggplot2 discussions

Core Capabilities:

  • R 4.4 Features: Native pipe operator, lambda syntax with backslash, improved error messages
  • Data Manipulation: dplyr, tidyr, purrr, stringr, forcats
  • Visualization: ggplot2, plotly, scales, patchwork
  • Web Applications: Shiny, reactivity, modules, bslib
  • Testing: testthat 3.0, snapshot testing, mocking
  • Package Management: renv, pak, DESCRIPTION
  • Reproducible Reports: R Markdown, Quarto
  • Database: DBI, dbplyr, pool

Quick Patterns

dplyr Data Pipeline Pattern:

Load tidyverse library. Create result by piping data through filter for year 2020 or later, mutate adding revenue_k as revenue divided by 1000 and growth as current minus lagged revenue divided by lagged revenue, group_by category, then summarise with total_revenue as sum, avg_growth as mean with na.rm TRUE, and groups set to drop.

ggplot2 Visualization Pattern:

Load ggplot2 library. Create ggplot with data and aes mapping x to date, y to value, and color to category. Add geom_line with linewidth 1 and geom_point with size 2. Apply scale_color_viridis_d for color scale. Add labs for title, axis labels, and color legend. Apply theme_minimal for clean appearance.

Shiny Basic App Pattern:

Load shiny library. Create ui using fluidPage with selectInput for variable selection from mtcars column names and plotOutput for plot. Create server function with input, output, and session parameters. In server, assign renderPlot to output plot using ggplot with mtcars and aes using.data pronoun with input variable for histogram. Create app with shinyApp passing ui and server.


Implementation Guide (5 minutes)

R 4.4 Modern Features

Native Pipe Operator:

Create result by piping data through filter removing NA values, mutate adding log_value as log of value, and summarise computing mean_log. For non-first argument position, use underscore placeholder in lm formula call with data parameter.

Lambda Syntax with Backslash:

Use map with data and backslash x syntax for x squared. Use map2 with two lists and backslash x y for x plus y. In dplyr contexts, use mutate with across on numeric columns applying backslash x for scale function extracting first column.

tidyverse Data Manipulation

dplyr Core Verbs:

Load dplyr library. Create processed by piping raw_data through filter for active status and positive amount, select for specific columns, mutate adding month using floor_date and amount_scaled dividing by max, then arrange descending by date. For grouped summaries, pipe through group_by, summarise with n for count, sum and mean for aggregations, and groups drop.

tidyr Reshaping Pattern:

Load tidyr library. For wide to long transformation, use pivot_longer with cols starting with year prefix, names_to for column name, names_prefix to strip, and values_to for values. For long to wide transformation, use pivot_wider with names_from and values_from, adding values_fill for missing value handling.

purrr Functional Programming:

Load purrr library. Use map with files and lambda to read_csv each file. Use map_dfr for row-binding with id parameter for source column. Use map_dbl for extracting numeric results with mean and na.rm TRUE. For error handling, create safe_read using safely wrapper on read_csv. Map files through safe_read, extract results, and use compact to filter successes.

ggplot2 Visualization Patterns

Complete Plot Structure:

Load ggplot2 and scales libraries. Create p using ggplot with data and aesthetics for x, y, and color by group. Add geom_point with alpha and size, geom_smooth with lm method and standard error. Apply scale_x_continuous with comma labels, scale_y_log10 with dollar labels, and scale_color_brewer with Set2 palette. Add facet_wrap by category with free_y scales. Add labs for title, subtitle, and axis labels. Apply theme_minimal with base_size and theme for legend position. Save with ggsave specifying filename, plot, dimensions, and dpi.

Multiple Plots with patchwork:

Load patchwork library. Create p1 with histogram, p2 with scatter plot, and p3 with boxplot. Combine using pipe and parentheses for layout with p1 beside p2 over p3. Add plot_annotation for title and tag_levels.

Shiny Application Patterns

Modular Shiny App:

Create dataFilterUI function taking id parameter. Use NS function for namespace. Return tagList with selectInput for category with NULL initial choices and sliderInput for range. Create dataFilterServer function taking id and data reactive. Use moduleServer with inner function. In observe block, extract unique categories and updateSelectInput. Return reactive filtering data by category and range inputs using req for input validation.

Reactive Patterns:

In server function, create processed_data as reactive caching filtered data by input year. Create counter as reactiveVal initialized to 0. Use observeEvent on input increment to update counter. Create analysis as eventReactive on input run_analysis for expensive computation. Apply debounce with 300 milliseconds on search input reactive for rapid input handling.

testthat Testing Framework

Test Structure Pattern:

Load testthat library. Create test_that block for calculate_growth with tibble of years and values. Call function and store result. Use expect_equal for row count, expect_equal for growth value with tolerance, and expect_true for NA check.

renv Dependency Management

Project Setup:

Call renv::init for initialization. Call renv::install for tidyverse and shiny packages. Call renv::snapshot to record state. Call renv::restore to restore from lockfile.


Advanced Implementation (10+ minutes)

For comprehensive coverage including:

  • Advanced Shiny patterns for async, caching, and deployment
  • Complex ggplot2 extensions and custom themes
  • Database integration with dbplyr and pool
  • R package development patterns
  • Performance optimization techniques
  • Production deployment with Docker and Posit Connect

See:

  • modules/advanced-patterns.md for complete advanced patterns guide

Context7 Library Mappings

  • tidyverse/dplyr for data manipulation verbs
  • tidyverse/ggplot2 for grammar of graphics visualization
  • tidyverse/purrr for functional programming toolkit
  • tidyverse/tidyr for data tidying functions
  • rstudio/shiny for web application framework
  • r-lib/testthat for unit testing framework
  • rstudio/renv for dependency management

Works Well With

  • moai-lang-python for Python and R interoperability with reticulate
  • moai-domain-database for SQL patterns and database optimization
  • moai-workflow-testing for DDD and testing strategies
  • moai-essentials-debug for AI-powered debugging
  • moai-foundation-quality for TRUST 5 quality principles

Troubleshooting

Common Issues:

R Version Check:

Call R.version.string in R console for version 4.4 or later. Call packageVersion with package name to check installed package versions.

Native Pipe Not Working:

  • Ensure R version is 4.1 or later for native pipe operator
  • Check RStudio settings under Tools, Global Options, Code for Use native pipe option

renv Issues:

Call renv::clean to remove unused packages. Call renv::rebuild to rebuild package library. Call renv::snapshot with force TRUE to force snapshot update.

Shiny Reactivity Debug:

Set options shiny.reactlog to TRUE. Call reactlog::reactlog_enable to enable logging. Call shiny::reactlogShow to display reactive log visualization.

ggplot2 Font Issues:

Load showtext library. Call font_add_google with font name and family. Call showtext_auto to enable for all graphics devices.


Last Updated: 2026-01-11 Status: Active (v1.1.0)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

30.55%
按下载量换算145

Antigravity

24.39%
按下载量换算116

Gemini CLI

16.49%
按下载量换算78

OpenCode

12.58%
按下载量换算60

Codex

6.85%
按下载量换算33

Cursor

3.39%
按下载量换算16

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills