一键导入
fmt
Check or apply rustfmt formatting across the workspace. Use this when asked to format code, check formatting, or fix rustfmt issues.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Check or apply rustfmt formatting across the workspace. Use this when asked to format code, check formatting, or fix rustfmt issues.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Build Cadmus on Linux and macOS hosts using xtask. Use when asked how to compile, test, lint, or run the project locally.
Run clippy locally and report only issues in the current diff, matching the CI reviewdog flow. Use when asked how to lint changed code or get clippy feedback on a branch before pushing.
Build the full Cadmus documentation website (mdBook + cargo doc + Storybook + Next.js). Use this when asked to build, preview, or update the documentation site.
Regenerate `.sqlx/` cached metadata when adding or modifying `sqlx::query!`, `sqlx::query_as!`, or `sqlx::query_scalar!` macros.
Cross-compile Cadmus for Kobo e-reader devices (ARM Linux). Use this when asked to build a Kobo release, cross-compile for ARM, or prepare a device binary.
Regenerate the translations POT file after modifying English documentation sources. Use when docs/src/**/*.md files are changed.
| name | fmt |
| description | Check or apply rustfmt formatting across the workspace. Use this when asked to format code, check formatting, or fix rustfmt issues. |
Always use cargo xtask fmt to format or check formatting in this project —
never bare cargo fmt.
# Check formatting (default — exits non-zero if any file would change)
cargo xtask fmt
# Apply formatting in place
cargo xtask fmt --apply
| Goal | Command |
|---|---|
| CI formatting gate | cargo xtask fmt |
| Fix formatting locally | cargo xtask fmt --apply |
--apply the command runs cargo fmt --all --check, which is the
correct mode for CI.cargo xtask fmt --apply before committing to avoid CI failures.