一键导入
remove-crate-prefix
Enforce the "Clean Imports over Inline Absolute Paths" rule by removing inline crate:: prefixes and adding proper use statements.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Enforce the "Clean Imports over Inline Absolute Paths" rule by removing inline crate:: prefixes and adding proper use statements.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | remove-crate-prefix |
| description | Enforce the "Clean Imports over Inline Absolute Paths" rule by removing inline crate:: prefixes and adding proper use statements. |
This skill enforces the "Clean Imports over Inline Absolute Paths (Mandatory)" rule defined in the project's AGENTS.md. It automatically scans code for inline crate:: prefixes (e.g. crate::Type, crate::Size) and refactors the code to use clean imports at the top of the file or scope.
Do NOT write absolute inline paths like crate::Type or crate::Size inside function signatures or bodies.
use crate::{Size, Pos};
pub fn render(size: Size) -> Pos { ... }
pub fn render(size: crate::Size) -> crate::Pos { ... }
crate::key_press!). This rule primarily targets structs, traits, and enums (e.g., crate::ModifierKeysMask).use crate::{...} block directly inside a function or if block is preferred over a file-level import to minimize scope pollution.When invoked:
crate:: usage for types.use crate::{...}; statement.crate:: prefix from the inline usages../check.fish --check.Run comprehensive Rust code quality checks including compilation, linting, documentation, and tests. Use after completing code changes and before creating commits.
Rules and guidelines for creating well-formatted commit messages, including 72-char limits, scope prefixes, and trailer blocks for tasks, PR closing, and attribution.
Zero-allocation string building strategies. Use when formatting strings, generating ANSI codes, or writing hot loops to avoid heap allocations and Formatter state machine overhead.
Run clippy linting, enforce comment punctuation rules, format code with cargo fmt, and verify module organization patterns. Use after code changes and before creating commits.
Standard for writing structured tracing logs behind debug flags.
Create a structured integration and review plan for a Pull Request