Skip to content
Agentmart
Submit a tool

r-cli

Comprehensive R package for command-line interface styling, semantic messaging, and user communication.

Skill by Garrick Aden-Buie (@gadenbuie)

IndexedMIT★ 547
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/posit-dev-r-cli

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Comprehensive R package for command-line interface styling, semantic messaging, and user communication. Use this skill when working with R code that needs to: (1) Format console output with inline markup and colors, (2) Display errors, warnings, or messages with cli_abort/cli_warn/cli_inform, (3) Show progress indicators for long-running operations, (4) Create semantic CLI elements (headers, lists, alerts, code blocks), (5) Apply themes and customize output styling, (6) Handle pluralization in user-facing text, (7) Work with ANSI strings, hyperlinks, or custom containers. Also use when migrating from base R message/warning/stop, debugging cli code, or improving existing cli usage.

Use cases: code-generation, refactoring

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/r-cli

What's inside

Skill name
r-cli
Description
Comprehensive R package for command-line interface styling, semantic messaging, and user communication. Use this skill when working with R code that needs to: (1) Format console output with inline markup and colors, (2) Display errors, warnings, or messages with cli_abort/cli_warn/cli_inform, (3) Show progress indicators for long-running operations, (4) Create semantic CLI elements (headers, lists, alerts, code blocks), (5) Apply themes and customize output styling, (6) Handle pluralization in user-facing text, (7) Work with ANSI strings, hyperlinks, or custom containers. Also use when migrating from base R message/warning/stop, debugging cli code, or improving existing cli usage.
License
MIT
Metadata
author: Garrick Aden-Buie (@gadenbuie) · version: 1.0
Instructions
458 lines in SKILL.md · view on GitHub

Files (6)

  • SKILL.md
  • ansi-operations.md · references/
  • conditions.md · references/
  • inline-markup.md · references/
  • progress.md · references/
  • themes.md · references/

SKILL.md (first lines)

# CLI for R Packages

## When to Use What

task: Display error with context and formatting
use: `cli_abort()` with inline markup and bullet lists

task: Show warning with formatting
use: `cli_warn()` with inline markup

task: Display informative message
use: `cli_inform()` with inline markup

task: Show progress for counted operations
use: `cli_progress_bar()` with total count

task: Show simple progress steps
use: `cli_progress_step()` with status messages

task: Format code or function names
use: `{.code ...}` or `{.fn package::function}`

task: Format file paths
use: `{.file path/to/file}`

task: Format package names
use: `{.pkg packagename}`

task: Format variable names
use: `{.var variable_name}`

task: Format values
use: `{.val value}`

task: Handle singular/plural text
use: `{?s}` or `{?y/ies}` with pluralization

task: Create headers
use: `cli_h1()`, `cli_h2()`, `cli_h3()`

task: Create alerts
use: `cli_alert_success()`, `cli_alert_danger()`, `cli_alert_warning()`, `cli_alert_info()`

task: Create lists
use: `cli_ul()`, `cli_ol()`, `cli_dl()` with `cli_li()`

## Inline Markup Essentials

Use inline markup with `{.class content}` syntax to format text:

```r
# Basic formatting
cli_text("Function {.fn mean} calculates averages")
cli_text("Install package {.pkg dplyr}")
cli_text("See file {.file ~/.Rprofile}")
cli_text("{.var x} must be numeric, not {.obj_type_of {x}}")
cli_text("Got value {.val {x}}")

# Code formatting
cli_text("Use {.code sum(x, na.rm = TRUE)}")

# Paths and arguments
cli_text("Reading from {.path /data/file.csv}")
cli_text("Set {.arg na.rm} to TRUE")

# Types and classes
cli_text("Object is {.cls data.frame}")

# Emphasis
cli_text("This is {.emph important}")
cli_text("This is {.strong critical}")

# Fields
cli_text("The {.field name} field is required")
```

### Vector Collapsing

Vectors are automatically collapsed with commas and "and":

```r
pkgs <- c("dplyr", "tidyr", "ggplot2")
cli_text("Installing packages: {.pkg {pkgs}}")
#> Installing packages: dplyr, tidyr, and ggplot2

files <- c("data.csv", "script.R")
cli_text("Found {length(files)} file{?s}: {.file {files}}")
#> Found 2 files: data.csv and script.R
```

### Escaping Braces

Use double braces `{{` and `}}` to escape literal braces:

```r
cli_text("Use {{variable}} syntax in glue")
#> Use {variable} syntax in glue
```

**For complete markup reference**: See [references/inline-markup.md](references/inline-markup.md) for all 50+ inline classes, edge cases, nesting rules, and advanced patterns.

## Pluralization Basics

Use `{?}` for pluralization with three patterns:

### Single Alternative

```r
nfile <- 1
cli_text("Found {nfile} file{?s}")
#> Found 1 file

nfile <- 3
cli_text("Found {nfile} file{?s}")
#> Found 3 files
```

### Two Alternatives

From posit-dev/skills, MIT.

More from posit-dev/skills

Signals

Stars
547
Forks
57
Open issues
6
Last commit (this folder)
Oct 6, 2026 (22 days ago)

From GitHub (fetched Oct 24, 2026).

Details

Version
1.0
License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Garrick Aden-Buie (@gadenbuie)

Cite this page

r-cli skill. Agent Mart. https://agentmart.dev/skills/posit-dev-r-cli (last updated 2026-10-24)