用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/posit-dev/tlg-agent --skill commons命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | commons |
| description | Building, maintaining, and iterating on a self-service data agent with commons. |
Read the relevant reference below before starting the corresponding task.
A commons agent project follows this on-disk convention. Both references above build on it.
my-agent/
├── agent.R # commons() definition
├── dictionaries/
│ └── warehouse.yaml # one data-dict.yaml per data_source(), named
│ # to match the source name in the commons() call
├── measures/
│ ├── sales-dashboard.R # measures grouped by source artifact (default
│ └── churn-report.R # landing spot only; reorganizing later is safe)
└── context/
├── sales-dashboard.md # free-text context, one file per artifact
└── churn-report.md
Every contribution points back to the source it came from with a machine-parseable string. When the host offers a commit-pinned permalink to a line range, use it directly — it is clickable and pins the same repo, sha, path, and lines in one token:
https://github.com/org/sales-dashboard/blob/abc1234/R/server.R#L120-L145
For hosts without a permalink convention (a bare git remote, an internal server), fall back to the host-agnostic grammar:
<repo-url>@<sha> <path>#L<start>-L<end>
For artifacts not under version control, prefer a stable URL that identifies the source (e.g. a published report or deployed app) over a local path; either way, use <location> (retrieved <yyyy-mm-dd>), where <location> is that URL or, failing that, a local path. Measures born from the iterate skill rather than an artifact self-reference their origin: trajectory analysis (<yyyy-mm-dd>).
Where each kind of contribution carries it:
#' @provenance roxygen tags per measure. The tag never reaches the model — read_measures() forwards only the title, description, @return, and documented @params.context_layer() strips frontmatter before indexing, so it never reaches the model.details when a caveat comes straight from artifact code.Example extracted measure:
#' Quarterly revenue
#'
#' Revenue for a fiscal quarter as reported in the sales dashboard's
#' "Revenue (QTD)" value box. Excludes tax and intra-company transfers.
#'
#' @param quarter `string` Fiscal quarter, e.g. "2026 Q2".
#' @provenance https://github.com/org/sales-dashboard/blob/abc1234/R/server.R#L120-L145
#' @measure
quarterly_revenue <- function(quarter, warehouse) {
...
}