Rust 精简
- 作者仓库星标 0
- 作者仓库 skills-registry
Rust Simplify
Use this skill for bounded Rust cleanup work in the Citum workspace when the task is to improve code quality rather than fix a specific bug.
When .jj is present, use docs/guides/JJ_AI_CHANGE_STACK.md for optional
local change isolation and intent capture before publishing through Git/GitHub.
Read first:
docs/guides/CODING_STANDARDS.mddocs/guides/AGENT_SKILLS.md
Target Selection
- Prefer
jcodemunchsymbol and file analysis before reading large files. - Pick the highest-value Rust file in the affected crate or module.
- If a file path was supplied, confirm it is actually wired into the build.
Quality Pass
- Reduce duplication and nested control flow.
- Prefer idiomatic Rust and explicit error handling.
- Review suspicious string ownership patterns. Prefer borrowed
&strfor lookup and comparison work, and allocateStringvalues at real ownership boundaries. - Do not perform broad allocation churn in hot paths without benchmark evidence.
- Add or update tests when behavior changes.
- When tests change, keep expected values independent of current implementation output and confirm behavior changes would have failed before the fix when practical.
- Keep the scope to one focused file or one tightly related cluster.
Verification
- Run the repo-required Rust checks for any
.rs,Cargo.toml, orCargo.lockchange. - Run
python3 scripts/audit-rust-review-smells.py --changedfor Rust cleanup passes and review the advisory findings. - Regenerate schemas if the touched files require it.
- Report the exact checks you ran and the result.
<!-- tomevault:4.0:skill_md:2026-05-23 -->Source: citum/citum-core — distributed by TomeVault.
- 流狐分类
- 通用
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 即装即用
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- 未声明
- 底层运行要求
- 未声明
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 Prefer jcodemunch symbol and file analysis before reading large files. Pick the highest-value Rust file in the affected crate or module. If a file path was supplied, confirm it is actually wired into the build.
Reduce duplication and nested control flow. Prefer idiomatic Rust and explicit error handling. Review suspicious string ownership patterns. Prefer borrowed &str for lookup
Run the repo-required Rust checks for any .rs, Cargo.toml, or Cargo.lock change. Run python3 scripts/audit-rust-review-smells.py --changed for Rust cleanup passes and review the advisory findings.
# Rust Simplify
Use this skill for bounded Rust cleanup work in the Citum workspace when the task is to
improve code quality rather than fix a specific bug.
When `.jj` is present, use `docs/guides/JJ_AI_CHANGE_STACK.md` for optional
local change isolation and intent capture before publishing through Git/GitHub.
Read first:
- `docs/guides/CODING_STANDARDS.md`
- `docs/guides/AGENT_SKILLS.md`
## Target Selection
- Prefer `jcodemunch` symbol and file analysis before reading large files.
- Pick the highest-value Rust file in the affected crate or module.
- If a file path was supplied, confirm it is actually wired into the build.
## Quality Pass
- Reduce duplication and nested control flow.
- Prefer idiomatic Rust and explicit error handling.
- Review suspicious string ownership patterns. Prefer borrowed `&str` for lookup
and comparison work, and allocate `String` values at real ownership boundaries.
- Do not perform broad allocation churn in hot paths without benchmark evidence.
- Add or update tests when behavior changes.
- When tests change, keep expected values independent of current implementation
output and confirm behavior changes would have failed before the fix when
practical.
- Keep the scope to one focused file or one tightly related cluster.
## Verification
- Run the repo-required Rust checks for any `.rs`, `Cargo.toml`, or `Cargo.lock` change.
- Run `python3 scripts/audit-rust-review-smells.py --changed` for Rust cleanup
passes and review the advisory findings.
- Regenerate schemas if the touched files require it.
- Report the exact checks you ran and the result.
---
> Source: [citum/citum-core](https://github.com/citum/citum-core) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-05-23 --> 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Target Selection → Quality Pass → Verification
要点 -> Use this skill for bounded Rust cleanup work in the Citum workspace when the task is to improve code quality rather than fix a specific bug. · - Prefer jcodemunch symbol and file analysis before reading large files. · - Reduce duplication and nested control flow. · - Run the repo-required Rust checks for any .rs, Cargo.toml, or Cargo.lock change. · --- > Source: [citum/citum-core](https://github.com/citum/citum-core) — distributed by [TomeVault](https://tomevault.io).
文件/命令 -> .jj · docs/guides/JJAICHANGESTACK.md · docs/guides/CODINGSTANDARDS.md · docs/guides/AGENTSKILLS.md · jcodemunch · &str · String · .rs
内容 SHA-256 -> 93f7f17277fd
原文结构
适用与边界
原文中的明确线索
.jj、docs/guides/JJAICHANGESTACK.md、docs/guides/CODINGSTANDARDS.md、docs/guides/AGENTSKILLS.md、jcodemunch、&str、String、.rs