cli

Format R console messages with semantic markup and structured errors.

466|38|Updated Nov 21, 2025
One-click install
npx skills add https://github.com/posit-dev/skills --skill cli-posit-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli
Source: https://github.com/posit-dev/skills/tree/main/r-lib/cli
Command: npx skills add https://github.com/posit-dev/skills --skill cli-posit-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

The cli skill provides structured formatting for R console output, replacing plain messages with semantic markup to improve readability, consistency, and usability across scripts, reports, and interactive sessions.

Core Features & Use Cases

  • Inline markup formatting with classes like {.code}, {.pkg}, {.val}, and more to create consistent, readable messages
  • Structured error handling and messaging via cli_abort, cli_warn, and cli_inform, plus progress indicators and semantic CLI elements
  • Use cases include package development, data tooling, and interactive tooling where clear, styled output enhances usability and maintainability

Quick Start

Start by wrapping content with inline markup such as {.fn mean} to format function names in your messages.

Frequently Asked Questions about cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I format R console output with semantic markup?

R console output is formatted using semantic inline markup classes like {.code}, {.pkg}, and {.val} to style function names, package names, and values, creating consistent and readable messages across scripts and interactive sessions.

What is the best way to handle structured error messaging in R packages?

Structured error handling in R packages uses cli_abort, cli_warn, and cli_inform to replace plain messages with semantically formatted errors, improving troubleshooting clarity and maintainability for package development.

Can I add progress indicators to R scripts for long-running tasks?

Progress indicators can be added to R scripts using semantic CLI elements and progress bars, providing clear visual feedback during long-running data processing tasks to enhance user-facing output readability.

How does themed styling improve R console messages?

Themed styling improves R console messages by applying consistent formatting rules across packages and scripts, replacing plain text output with styled elements that enhance visual clarity during development and troubleshooting.

Does this approach work for both interactive R sessions and package development?

Semantic console formatting works across interactive R sessions, package development, and data tooling, providing consistent styled output and structured error messaging regardless of the execution context.

Why use inline markup instead of plain text for R console messages?

Inline markup replaces plain text R console messages with semantic classes to distinguish function names, packages, and values, improving readability and consistency in development, troubleshooting, and user-facing outputs.