dart-mechanical-refactor
GitHub执行DART项目的机械式重构工作流,保持行为不变进行代码结构调整。支持在分支中自动化编辑,更新构建配置,运行lint、build及测试验证,确保重构安全并提交PR。
Trigger Scenarios
Install
npx skills add dartsim/dart --skill dart-mechanical-refactor -g -y
SKILL.md
Frontmatter
{
"name": "dart-mechanical-refactor",
"description": "DART Mechanical Refactor: perform a behavior-preserving mechanical refactor"
}
dart-mechanical-refactor
Use this skill to run the DART dart-mechanical-refactor workflow. The editable workflow
source lives in .claude/commands/; this generated skill is its entrypoint for
Codex and Muse.
Invocation
- Claude Code:
/dart-mechanical-refactor <arguments> - Codex:
$dart-mechanical-refactor <arguments> - Muse:
/dart-mechanical-refactor <arguments>
Treat the text after the skill name, or the user's request when the skill is
loaded on demand, as $ARGUMENTS. When the workflow references $1, $2,
etc., map those to the positional values supplied by the user.
Command Body
Perform mechanical refactor: $ARGUMENTS
Required Reading
@AGENTS.md @CONTRIBUTING.md @docs/onboarding/code-style.md
Workflow
- Define the exact transformation and scope before editing.
- Create a topic branch from the target branch, for example
git switch --no-track -c refactor/<topic> origin/main. - Prefer scriptable or automated edits when the transformation is repetitive.
- Keep behavior unchanged; do not mix in feature work or cleanup outside scope.
- If reorganizing files, update CMake, pixi tasks, generated indexes, and docs.
- Run focused checks first, then broader checks according to risk:
pixi run lintpixi run buildpixi run testpixi run test-allwhen feasiblepixi run -e gazebo test-gzwhen package, collision, constraint, or downstream Gazebo/gz-physics compatibility could be affected
- Ask for explicit maintainer/user approval before pushing or opening a PR. After approval, open a PR with a clear scope statement and no behavior-change claim unless tested.
Output
- Transformation summary
- Files or areas changed
- Verification run
- Any residual risk
Version History
-
f630c91
Current 2026-10-18 20:25
新增对Muse客户端的支持;将单元测试命令从test-unit调整为更通用的test;增加针对Gazebo兼容性的专项测试步骤;完善分支命名规范说明。
-
deb9869
2026-09-08 21:45
AI 运行环境支持从 Claude Code/OpenCode 调整为仅 Claude Code 和 Codex。
- bcd584e 2026-09-02 23:40
- b9fbefc 2026-07-19 11:29


