r-style

Detect and rewrite R scripts to remove LLM code smells while preserving outputs.

1|Updated Feb 16, 2026
One-click install
npx skills add https://github.com/halidaee/econtools_marketplace --skill r-style
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: r-style
Source: https://github.com/halidaee/econtools_marketplace/tree/main/analytics-toolkit/skills/r-style
Command: npx skills add https://github.com/halidaee/econtools_marketplace --skill r-style

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Detects LLM-generated R scripts and rewrites them to match the user's preferred coding style, ensuring finished code is readable while preserving results and with archive-verify-revert safety.

Core Features & Use Cases

  • Detects LLM code smells in R scripts and rewrites them to match the user's personal coding style
  • Archives the original version to a draft location and verifies that rewritten code preserves outputs
  • Suitable for post-production cleanup after analysis, before sharing code with collaborators or publishing results

Quick Start

Provide a finished R script to the skill to obtain a human-readable version that preserves the original outputs.

Frequently Asked Questions about r-style

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

FAQPage Schema
How do I clean up LLM-generated R code smells in finished scripts?

This Skill rewrites finished R scripts by detecting LLM code smells and applying style-only adjustments like snake_case naming and explicit return(). It preserves your original outputs during the code cleanup process.

What is the best way to standardize R script style for production contexts?

The best way to standardize R script style is applying post-production linting that restricts structural changes to style-only adjustments. This enforces an archive-verify-revert workflow to align code readability across teams without altering analysis outputs.

Can I rewrite R code for readability without changing the original outputs?

Yes, you can rewrite R code without changing outputs by using an archive-verify-revert workflow. The Skill archives your original version to a draft location, rewrites the code for readability, and verifies that the rewritten script preserves the original results.

Does this R code cleanup Skill work on scripts during active analysis?

No, this R code cleanup Skill applies after analysis is complete on finished code. It is designed for post-production cleanup before you share code with collaborators or publish results, not for interactive scripting during active analysis.

What specific style adjustments are enforced when cleaning R scripts?

The specific style adjustments enforced include using explicit return() statements and snake_case naming conventions. The Skill restricts all structural changes to style-only adjustments to ensure readability while preserving the original script's outputs.