check-style

Check R or Python code against CEDA style standards.

Updated Nov 8, 2024
One-click install
npx skills add https://github.com/cedanl/.github --skill check-style-cedanl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: check-style
Source: https://github.com/cedanl/.github/tree/main/.claude/skills/check-style
Command: npx skills add https://github.com/cedanl/.github --skill check-style-cedanl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Check code against CEDA R or Python style standards. Use when reviewing code, after writing code, or when the user asks to check style/conventions.

Core Features & Use Cases

  • Language detection to determine whether a project is R or Python (R indicators: DESCRIPTION, NAMESPACE, renv.lock, R/ directory; Python indicators: pyproject.toml, uv.lock, src/ directory).
  • Standards loading: read standards/r-style.md for R projects and standards/python-style.md for Python projects from the cedanl/.github repo (and always also check standards/principles.md and standards/data-conventions.md).
  • Scoping and execution: scope checks to a specified file or directory or run on the main sources: for R: R/, main.R, inst/app/app.R; for Python: src/, app/main.py; run automated checks (R: styler and lintr; Python: ruff check and ruff format --check).
  • Reporting & guidance: manual review categories (Package structure, Code style, Naming, Data conventions, Documentation) with actionable feedback.

Quick Start

Run the check-style command on your project to validate R or Python files against the CEDA standards.

Frequently Asked Questions about check-style

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

FAQPage Schema
How do I check my Python code style against CEDA coding standards?

To check Python code style, the tool detects your project via pyproject.toml or src/ directories, loads CEDA python-style.md standards, and runs ruff check and ruff format --check to report violations.

How do I lint R scripts for naming and package structure conventions?

You can lint R scripts for conventions by running the tool on R/ or main.R directories; it uses styler and lintr to evaluate package structure, naming, and code style against CEDA r-style.md standards.

Can I scope code style checks to a specific file or directory?

Yes, you can scope code style checks to a specified file or directory instead of the main sources, allowing targeted validation of individual R or Python modules before a full project review.

What indicates if a project is detected as R or Python for style validation?

Project language detection for style validation looks for R indicators like DESCRIPTION, NAMESPACE, or renv.lock, and Python indicators like pyproject.toml, uv.lock, or a src/ directory.

What categories are reviewed when checking data conventions and code style?

When checking data conventions and code style, the tool provides actionable manual review feedback across Package structure, Code style, Naming, Data conventions, and Documentation categories.