← Back to list

r-style-guide
by kyleGrealis
Claude Code agents, skills, and other tools
⭐ 1🍴 0📅 Jan 21, 2026
SKILL.md
name: r-style-guide description: Kyle's R coding style guide with tidyverse conventions and personal preferences. Use when writing or reviewing R code to ensure consistency. Covers quotes, indentation, pipes, naming, and markdown formatting.
Kyle's R Style Guide
Quote Usage
ALWAYS use single quotes unless one of these exceptions applies:
- Regex expressions — double quotes for patterns
- Strings with apostrophes —
"Don't know"not'Don\'t know' - User-facing messages — when message naturally contains apostrophes
Function Arguments & Indentation
Arguments MUST start on a new line after opening parenthesis. Never vertically align.
# GOOD
result <- function_name(
argument_1,
argument_2,
argument_3
)
# Also acceptable for very short calls
result <- function_name(arg1, arg2)
# BAD — vertical alignment
result <- function_name(argument_1,
argument_2)
Multi-line formulas — proper indentation:
# GOOD
formula <- outcome ~ var1 + var2 +
var3 + var4
# BAD
formula <- outcome ~ var1 + var2 +
var3 + var4
Indentation Rules
- 2 spaces per level (never tabs)
- Continuation lines indent by 2 spaces
- Pipe chains: indent each step by 2 spaces
- No trailing whitespace
Pipe Usage
- Use native pipe
|>not%>% - One operation per line
- Start pipe on same line as object
# GOOD
result <- data |>
filter(status == 'active') |>
group_by(category) |>
summarize(mean_value = mean(value, na.rm = TRUE))
# BAD
result <- data %>%
filter(status == 'active')
- Maximum 90 characters per line
Markdown Lists — CRITICAL
Bulleted lists in markdown/Quarto MUST have 2 trailing spaces after each line:
Introduction with 2 spaces at end.
- First item with 2 trailing spaces
- Second item with 2 trailing spaces
Next paragraph.
Without trailing spaces, rendering breaks.
Score
Total Score
55/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
○言語
プログラミング言語が設定されている
0/5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon