[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M73D5XGYMS68JZCVYV1RNATQ":3,"skill-same:01M73D5XGYMS68JZCVYV1RNATQ":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M73D5XGYMS68JZCVYV1RNATQ","write-roxygen-docs",null,"Write roxygen2 documentation for R package functions, datasets, and classes. Covers all standard tags, cross-references, examples, and generating NAMESPACE entries. Follows tidyverse documentation style. Use when adding documentation to new exported functions, documenting internal helpers or datasets, documenting S3\u002FS4\u002FR6 classes and methods, or fixing documentation-related R CMD check notes.","roohe\u002Fagentic-super-skills","roohe","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99054084?v=4","01M734WCDFP6RZVT5CNM00QR26","01M734WCE4BD0T4NZS5PCV9V5F",10,"MIT","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-roxygen-docs\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: write-roxygen-docs\nlocale: caveman-lite\nsource_locale: en\nsource_commit: 82c77053\ntranslator: \"Julius Brussee homage — caveman\"\ntranslation_date: \"2026-05-03\"\ndescription: >\n  Write roxygen2 documentation for R package functions, datasets, and\n  classes. Covers all standard tags, cross-references, examples,\n  and generating NAMESPACE entries. Follows tidyverse documentation style.\n  Use when adding documentation to new exported functions, documenting\n  internal helpers or datasets, documenting S3\u002FS4\u002FR6 classes and methods,\n  or fixing documentation-related R CMD check notes.\nlicense: MIT\nallowed-tools: Read Write Edit Bash Grep Glob\nmetadata:\n  author: Philipp Thoss\n  version: \"1.0\"\n  domain: r-packages\n  complexity: basic\n  language: R\n  tags: r, roxygen2, documentation, namespace\n---\n\n# Write Roxygen Documentation\n\nCreate complete roxygen2 documentation for R package functions, datasets, and classes.\n\n## When to Use\n\n- Adding documentation to a new exported function\n- Documenting internal helper functions\n- Documenting package datasets\n- Documenting S3\u002FS4\u002FR6 classes and methods\n- Fixing documentation-related `R CMD check` notes\n\n## Inputs\n\n- **Required**: R function, dataset, or class to document\n- **Optional**: Related functions for cross-referencing (`@family`, `@seealso`)\n- **Optional**: Whether the function should be exported\n\n## Procedure\n\n### Step 1: Write Function Documentation\n\nPlace roxygen comments directly above the function:\n\n```r\n#' Compute the weighted mean of a numeric vector\n#'\n#' Calculates the arithmetic mean of `x` weighted by `w`. Missing values\n#' in either `x` or `w` are handled according to the `na.rm` parameter.\n#'\n#' @param x A numeric vector of values.\n#' @param w A numeric vector of weights, same length as `x`.\n#' @param na.rm Logical. Should missing values be removed? Default `FALSE`.\n#'\n#' @return A single numeric value representing the weighted mean.\n#'\n#' @examples\n#' weighted_mean(1:5, rep(1, 5))\n#' weighted_mean(c(1, 2, NA, 4), c(1, 1, 1, 1), na.rm = TRUE)\n#'\n#' @export\n#' @family summary functions\n#' @seealso [stats::weighted.mean()] for the base R equivalent\nweighted_mean \u003C- function(x, w, na.rm = FALSE) {\n  # implementation\n}\n```\n\n**Got:** Complete roxygen block with title, description, `@param` for each parameter, `@return`, `@examples`, and `@export`.\n\n**If fail:** If unsure about a tag, check `?roxygen2::rd_roclet`. Common omission is `@return`, which is required by CRAN for all exported functions.\n\n### Step 2: Essential Tags Reference\n\n| Tag | Purpose | Required for export? |\n|-----|---------|---------------------|\n| `#' Title` | First line, one sentence | Yes |\n| `#' Description` | Paragraph after blank line | Yes |\n| `@param` | Parameter documentation | Yes |\n| `@return` | Return value description | Yes (CRAN) |\n| `@examples` | Usage examples | Strongly recommended |\n| `@export` | Add to NAMESPACE | Yes, for public API |\n| `@family` | Group related functions | Recommended |\n| `@seealso` | Cross-references | Optional |\n| `@keywords internal` | Mark as internal | For non-exported docs |\n\n**Got:** All required tags for the function type are identified. Exported functions have `@param`, `@return`, `@examples`, and `@export` at minimum.\n\n**If fail:** If a tag is unfamiliar, consult the [roxygen2 documentation](https:\u002F\u002Froxygen2.r-lib.org\u002Farticles\u002Frd.html) for usage and syntax.\n\n### Step 3: Document Datasets\n\nCreate `R\u002Fdata.R`:\n\n```r\n#' Example dataset of city temperatures\n#'\n#' A dataset containing daily temperature readings for major cities.\n#'\n#' @format A data frame with 365 rows and 4 variables:\n#' \\describe{\n#'   \\item{date}{Date of observation}\n#'   \\item{city}{City name}\n#'   \\item{temp_c}{Temperature in Celsius}\n#'   \\item{humidity}{Relative humidity percentage}\n#' }\n#' @source \\url{https:\u002F\u002Fexample.com\u002Fdata}\n\"city_temperatures\"\n```\n\n**Got:** `R\u002Fdata.R` contains roxygen blocks for each dataset with `@format` describing the structure and `@source` providing data provenance.\n\n**If fail:** If `R CMD check` warns about undocumented datasets, ensure the quoted string (e.g., `\"city_temperatures\"`) exactly matches the object name saved with `usethis::use_data()`.\n\n### Step 4: Document the Package\n\nCreate `R\u002Fpackagename-package.R`:\n\n```r\n#' @keywords internal\n\"_PACKAGE\"\n\n## usethis namespace: start\n## usethis namespace: end\nNULL\n```\n\n**Got:** `R\u002Fpackagename-package.R` exists with `@keywords internal` and the `\"_PACKAGE\"` sentinel. Running `devtools::document()` generates `man\u002Fpackagename-package.Rd`.\n\n**If fail:** If `R CMD check` reports a missing package documentation page, verify the file is named `R\u002F\u003Cpackagename>-package.R` and contains the `\"_PACKAGE\"` string.\n\n### Step 5: Handle Special Cases\n\n**Functions with dots in names** (S3 methods):\n\n```r\n#' @export\n#' @rdname process\nprocess.myclass \u003C- function(x, ...) {\n  # S3 method\n}\n```\n\n**Reusing documentation** with `@inheritParams`:\n\n```r\n#' @inheritParams weighted_mean\n#' @param trim Fraction of observations to trim.\ntrimmed_mean \u003C- function(x, w, na.rm = FALSE, trim = 0.1) {\n  # implementation\n}\n```\n\n**No visible binding fix** using `.data` pronoun:\n\n```r\n#' @importFrom rlang .data\nmy_function \u003C- function(df) {\n  dplyr::filter(df, .data$column > 5)\n}\n```\n\n**Got:** Special cases (S3 methods, inherited params, `.data` pronoun) are documented correctly. `@rdname` groups S3 methods together. `@inheritParams` reuses parameter docs without duplication.\n\n**If fail:** If `R CMD check` warns about \"no visible binding for global variable,\" add `#' @importFrom rlang .data` or use `utils::globalVariables()` as a last resort.\n\n### Step 6: Generate Documentation\n\n```r\ndevtools::document()\n```\n\n**Got:** `man\u002F` directory updated with `.Rd` files for each documented object. `NAMESPACE` regenerated with correct exports and imports.\n\n**If fail:** Check for roxygen syntax errors. Common issues: unclosed brackets in `\\describe{}`, missing `#'` prefix on a line, or invalid tag names. Run `devtools::document()` again after fixing.\n\n## Validation\n\n- [ ] Every exported function has `@param`, `@return`, and `@examples`\n- [ ] `devtools::document()` runs without errors\n- [ ] `devtools::check()` shows no documentation warnings\n- [ ] `@family` tags group related functions correctly\n- [ ] Examples run without errors (test with `devtools::run_examples()`)\n\n## Pitfalls\n\n- **Missing `@return`**: CRAN requires all exported functions to document their return value\n- **Examples that need internet\u002Fauth**: Wrap in `\\dontrun{}` with a comment explaining why\n- **Slow examples**: Use `\\donttest{}` for examples that work but take too long for CRAN\n- **Markdown in roxygen**: Enable with `Roxygen: list(markdown = TRUE)` in DESCRIPTION\n- **Forgetting to run `devtools::document()`**: Man pages are generated, not hand-written\n\n## Related Skills\n\n- `create-r-package` - initial package setup including roxygen configuration\n- `write-testthat-tests` - test the functions you document\n- `write-vignette` - long-form documentation beyond function reference\n- `submit-to-cran` - documentation requirements for CRAN\n","# Write Roxygen Documentation\n\nCreate complete roxygen2 documentation for R package functions, datasets, and classes.\n\n## When to Use\n\n- Adding documentation to a new exported function\n- Documenting internal helper functions\n- Documenting package datasets\n- Documenting S3\u002FS4\u002FR6 classes and methods\n- Fixing documentation-related `R CMD check` notes\n\n## Inputs\n\n- **Required**: R function, dataset, or class to document\n- **Optional**: Related functions for cross-referencing (`@family`, `@seealso`)\n- **Optional**: Whether the function should be exported\n\n## Procedure\n\n### Step 1: Write Function Documentation\n\nPlace roxygen comments directly above the function:\n\n```r\n#' Compute the weighted mean of a numeric vector\n#'\n#' Calculates the arithmetic mean of `x` weighted by `w`. Missing values\n#' in either `x` or `w` are handled according to the `na.rm` parameter.\n#'\n#' @param x A numeric vector of values.\n#' @param w A numeric vector of weights, same length as `x`.\n#' @param na.rm Logical. Should missing values be removed? Default `FALSE`.\n#'\n#' @return A single numeric value representing the weighted mean.\n#'\n#' @examples\n#' weighted_mean(1:5, rep(1, 5))\n#' weighted_mean(c(1, 2, NA, 4), c(1, 1, 1, 1), na.rm = TRUE)\n#'\n#' @export\n#' @family summary functions\n#' @seealso [stats::weighted.mean()] for the base R equivalent\nweighted_mean \u003C- function(x, w, na.rm = FALSE) {\n  # implementation\n}\n```\n\n**Got:** Complete roxygen block with title, description, `@param` for each parameter, `@return`, `@examples`, and `@export`.\n\n**If fail:** If unsure about a tag, check `?roxygen2::rd_roclet`. Common omission is `@return`, which is required by CRAN for all exported functions.\n\n### Step 2: Essential Tags Reference\n\n| Tag | Purpose | Required for export? |\n|-----|---------|---------------------|\n| `#' Title` | First line, one sentence | Yes |\n| `#' Description` | Paragraph after blank line | Yes |\n| `@param` | Parameter documentation | Yes |\n| `@return` | Return value description | Yes (CRAN) |\n| `@examples` | Usage examples | Strongly recommended |\n| `@export` | Add to NAMESPACE | Yes, for public API |\n| `@family` | Group related functions | Recommended |\n| `@seealso` | Cross-references | Optional |\n| `@keywords internal` | Mark as internal | For non-exported docs |\n\n**Got:** All required tags for the function type are identified. Exported functions have `@param`, `@return`, `@examples`, and `@export` at minimum.\n\n**If fail:** If a tag is unfamiliar, consult the [roxygen2 documentation](https:\u002F\u002Froxygen2.r-lib.org\u002Farticles\u002Frd.html) for usage and syntax.\n\n### Step 3: Document Datasets\n\nCreate `R\u002Fdata.R`:\n\n```r\n#' Example dataset of city temperatures\n#'\n#' A dataset containing daily temperature readings for major cities.\n#'\n#' @format A data frame with 365 rows and 4 variables:\n#' \\describe{\n#'   \\item{date}{Date of observation}\n#'   \\item{city}{City name}\n#'   \\item{temp_c}{Temperature in Celsius}\n#'   \\item{humidity}{Relative humidity percentage}\n#' }\n#' @source \\url{https:\u002F\u002Fexample.com\u002Fdata}\n\"city_temperatures\"\n```\n\n**Got:** `R\u002Fdata.R` contains roxygen blocks for each dataset with `@format` describing the structure and `@source` providing data provenance.\n\n**If fail:** If `R CMD check` warns about undocumented datasets, ensure the quoted string (e.g., `\"city_temperatures\"`) exactly matches the object name saved with `usethis::use_data()`.\n\n### Step 4: Document the Package\n\nCreate `R\u002Fpackagename-package.R`:\n\n```r\n#' @keywords internal\n\"_PACKAGE\"\n\n## usethis namespace: start\n## usethis namespace: end\nNULL\n```\n\n**Got:** `R\u002Fpackagename-package.R` exists with `@keywords internal` and the `\"_PACKAGE\"` sentinel. Running `devtools::document()` generates `man\u002Fpackagename-package.Rd`.\n\n**If fail:** If `R CMD check` reports a missing package documentation page, verify the file is named `R\u002F\u003Cpackagename>-package.R` and contains the `\"_PACKAGE\"` string.\n\n### Step 5: Handle Special Cases\n\n**Functions with dots in names** (S3 methods):\n\n```r\n#' @export\n#' @rdname process\nprocess.myclass \u003C- function(x, ...) {\n  # S3 method\n}\n```\n\n**Reusing documentation** with `@inheritParams`:\n\n```r\n#' @inheritParams weighted_mean\n#' @param trim Fraction of observations to trim.\ntrimmed_mean \u003C- function(x, w, na.rm = FALSE, trim = 0.1) {\n  # implementation\n}\n```\n\n**No visible binding fix** using `.data` pronoun:\n\n```r\n#' @importFrom rlang .data\nmy_function \u003C- function(df) {\n  dplyr::filter(df, .data$column > 5)\n}\n```\n\n**Got:** Special cases (S3 methods, inherited params, `.data` pronoun) are documented correctly. `@rdname` groups S3 methods together. `@inheritParams` reuses parameter docs without duplication.\n\n**If fail:** If `R CMD check` warns about \"no visible binding for global variable,\" add `#' @importFrom rlang .data` or use `utils::globalVariables()` as a last resort.\n\n### Step 6: Generate Documentation\n\n```r\ndevtools::document()\n```\n\n**Got:** `man\u002F` directory updated with `.Rd` files for each documented object. `NAMESPACE` regenerated with correct exports and imports.\n\n**If fail:** Check for roxygen syntax errors. Common issues: unclosed brackets in `\\describe{}`, missing `#'` prefix on a line, or invalid tag names. Run `devtools::document()` again after fixing.\n\n## Validation\n\n- [ ] Every exported function has `@param`, `@return`, and `@examples`\n- [ ] `devtools::document()` runs without errors\n- [ ] `devtools::check()` shows no documentation warnings\n- [ ] `@family` tags group related functions correctly\n- [ ] Examples run without errors (test with `devtools::run_examples()`)\n\n## Pitfalls\n\n- **Missing `@return`**: CRAN requires all exported functions to document their return value\n- **Examples that need internet\u002Fauth**: Wrap in `\\dontrun{}` with a comment explaining why\n- **Slow examples**: Use `\\donttest{}` for examples that work but take too long for CRAN\n- **Markdown in roxygen**: Enable with `Roxygen: list(markdown = TRUE)` in DESCRIPTION\n- **Forgetting to run `devtools::document()`**: Man pages are generated, not hand-written\n\n## Related Skills\n\n- `create-r-package` - initial package setup including roxygen configuration\n- `write-testthat-tests` - test the functions you document\n- `write-vignette` - long-form documentation beyond function reference\n- `submit-to-cran` - documentation requirements for CRAN\n",{"name":5,"locale":23,"license":14,"metadata":24,"translator":31,"description":32,"allowed-tools":33,"source_commit":34,"source_locale":35,"translation_date":36},"caveman-lite",{"tags":25,"author":26,"domain":27,"version":28,"language":29,"complexity":30},"r, roxygen2, documentation, namespace","Philipp Thoss","r-packages","1.0","R","basic","Julius Brussee homage — caveman","Write roxygen2 documentation for R package functions, datasets, and classes. Covers all standard tags, cross-references, examples, and generating NAMESPACE entries. Follows tidyverse documentation style. Use when adding documentation to new exported functions, documenting internal helpers or datasets, documenting S3\u002FS4\u002FR6 classes and methods, or fixing documentation-related R CMD check notes.\n","Read Write Edit Bash Grep Glob","82c77053","en","2026-05-03","master","f483e54f3ad5f202a77d45f2e57f8d970b71195f","skills_library\u002Fwrite-roxygen-docs",2,"https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills","https:\u002F\u002Fgithub.com\u002Froohe","yoou.link","2026-05-19 15:56:07",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add roohe\u002Fagentic-super-skills --skill write-roxygen-docs",{"tool":51,"command":52},"bunx","bunx skills add roohe\u002Fagentic-super-skills --skill write-roxygen-docs",{"tool":54,"command":55},"pnpm","pnpm dlx skills add roohe\u002Fagentic-super-skills --skill write-roxygen-docs","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-roxygen-docs\u002FSKILL.md",true,[],[60,67,74,81,88,95],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M73D865CZME2FCMKA4PQM348","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M73D7Z64J4ABWZJD7P44XBBF","youtube-downloader","Download and process YouTube content for research. Use when: downloading competitor videos for analysis; extracting audio for podcasts; getting transcripts for content repurposing; archiving webinars; research content curation","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyoutube-downloader\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M73D7K8778TGZV3GJFR3703D","yc-pitch-deck","Create a compelling startup pitch deck that follows the structure proven to raise billions from top investors. Master the YC and Sequoia formats that get founders funded. Use when: **Fundraising** to create investor pitch decks; **YC application** to structure your narrative; **Demo Day prep** to craft your 2-minute pitch; **Angel investors** to communicate your opportunity; **Partnership pitches** to structure compelling asks","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyc-pitch-deck\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M73D70KJSE0E8Z28YMNNRT04","x-twitter-scraper","Use when the user needs X (Twitter) data or confirmation-gated X actions through Xquik: tweet search, user lookup, follower extraction, media download, monitoring, webhooks, MCP, SDKs, posting, likes, DMs, and profile updates. Requires a Xquik API key. Never ask for X login material.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fx-twitter-scraper\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":18},"01M73D6ED01GV077R7K4NZNFZJ","write-vignette","Create R package vignettes using R Markdown or Quarto. Covers vignette setup, YAML configuration, code chunk options, building and testing, and CRAN requirements for vignettes. Use when adding a Getting Started tutorial, documenting complex workflows spanning multiple functions, creating domain-specific guides, or when CRAN submission requires user-facing documentation beyond function help pages.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-vignette\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":18},"01M73D69YJR0BK3NFHE0CYG3EF","write-validation-documentation","Write IQ\u002FOQ\u002FPQ validation documentation for computerized systems in regulated environments. Covers protocols, reports, test scripts, deviation handling, and approval workflows. Use when validating R or other software for regulated use, preparing for a regulatory audit, documenting qualification of computing environments, or creating and updating validation protocols and reports for new or re-qualified systems.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-validation-documentation\u002FSKILL.md",[],[]]