本技能介绍如何使用命令行`gh`只读查看GitHub issue正文和评论,支持通过编号或URL定位,也可指定其他仓库,并说明如何提取大量评论。
- 查看issue正文和评论
- 通过URL读取issue
- 查看其他仓库的issue
了解如何运行 Carbon 的提交前检查工具 `prek`,可检查全部文件或指定文件,并处理 Jujutsu 工作区、自动改写文件的钩子及依赖或安全策略错误。
Instructions for running prek, the Carbon pre-submit/style/lint checker, that *MUST* be run before submitting an change.
实测评分 未实测
查看安装方法本技能介绍如何运行 Carbon 的提交前格式和代码检查工具 prek。可以检查所有文件,也可以指定文件列表。在 Jujutsu 工作区中直接运行 prek 会失败,因为它要求标准 Git 仓库结构;此时可使用辅助脚本 ./scripts/jj_prek.sh 检查有改动的文件。clang-format 和 rumdl 等钩子会直接改写文件,因此即使文件已经修正,prek 仍可能以失败状态退出。技能说明了如何查看这些改动并重新运行检查。对于受限环境中的依赖解析或安全策略错误,还介绍了在命令前加上 gpkg 的处理方式。
向 Carbon 项目提交改动前,需要检查格式和代码问题时,可以使用本技能。在 Jujutsu 中工作,或检查过程中有文件被改写并导致失败状态时也适用。
prek 检查我修改过的文件。”资料要求提交改动前运行 prek。Jujutsu 辅助脚本始终与 trunk 比较;如果当前改动基于其他书签,检查范围可能包含上游改动中的文件。在受限环境遇到依赖或安全策略错误时,可以在命令前加上 gpkg。
本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。
AI 根据 SKILL.md 的内容检查了需要注意的操作和使用前提。评分只依据实际运行的结果(实测对比)。
不计入评分。 由 AI(OpenAI Codex)于 2026年10月26日 评估。仅供参考,安装前请同时查看原文。
安装前可以查看交给 AI 代理的指令内容。
prek is the Carbon pre-submit, style, and lint checker. Running it is
mandatory before submitting any changes.
To run prek on all files:
prek run -a
To validate a specific list of files:
prek run --files <files>
If you are working in a Jujutsu workspace, running prek directly will fail
because it expects a standard Git repository structure. Instead, use the helper
script:
./scripts/jj_prek.sh
This script runs prek on all files that have changed between trunk and your
current Jujutsu @ change.
Note that the script always compares against trunk. If your change is based on
another bookmark rather than on trunk, the script also checks the files
changed by that underlying change, so a reported failure may not be in your own
work.
Some hooks, notably clang-format and rumdl, fix problems in place rather
than only reporting them. When they do, prek reports a failure and exits
non-zero even though the tree is now correct.
Re-run prek after any failure that modified files, and treat the second, clean
run as the result. Review what it changed: a reflow is expected, but a content
change may not be what you intended.
[!TIP] If
prekfails with an error about resolving dependencies or security policy, you may be running in a restricted environment where the special-purposegpkgtool is required. Prefix the command withgpkg, for example:gpkg prek run -aorgpkg ./scripts/jj_prek.sh.
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
本技能介绍如何使用命令行`gh`只读查看GitHub issue正文和评论,支持通过编号或URL定位,也可指定其他仓库,并说明如何提取大量评论。
本技能为在 Carbon 代码库中工作的 AI 助手规定文件查看、搜索和编辑工具,并说明临时文件的存放与清理规则,以及何时可以编写和运行自定义程序。
了解如何在 Carbon 项目中通过 Bazelisk 构建、测试和运行程序,包括指定目标、启用 ASan,以及系统依赖变更后重建缓存。
本技能介绍如何为Carbon编译器添加内置函数,包括类型注册、签名验证、常量求值、运行时LLVM IR生成、Prelude绑定,以及使用最小Prelude编写针对性测试。
了解 Carbon 工具链对 Bazel、C++、Carbon、Markdown 和 Python 文件的格式规范,并查看注释、文档、命名、设计及提交说明的写作要求。
本技能介绍如何在Carbon工具链中添加或修改错误和警告,包括注册诊断类型、用带类型的参数构造消息、为源码位置添加标签和上下文,以及检查措辞规范和测试覆盖。