Agent Skills › dartsim/dart › dart-mechanical-refactor

dart-mechanical-refactor

GitHub

执行DART项目的机械式重构工作流,保持行为不变进行代码结构调整。支持在分支中自动化编辑,更新构建配置,运行lint、build及测试验证,确保重构安全并提交PR。

.agents/skills/dart-mechanical-refactor/SKILL.md dartsim/dart

Trigger Scenarios

需要保持行为不变的代码结构优化 批量或重复性的代码整理任务

Install

npx skills add dartsim/dart --skill dart-mechanical-refactor -g -y
More Options

Non-standard path

npx skills add https://github.com/dartsim/dart/tree/main/.agents/skills/dart-mechanical-refactor -g -y

Use without installing

npx skills use dartsim/dart@dart-mechanical-refactor

指定 Agent (Claude Code)

npx skills add dartsim/dart --skill dart-mechanical-refactor -a claude-code -g -y

安装 repo 全部 skill

npx skills add dartsim/dart --all -g -y

预览 repo 内 skill

npx skills add dartsim/dart --list

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

  1. Define the exact transformation and scope before editing.
  2. Create a topic branch from the target branch, for example git switch --no-track -c refactor/<topic> origin/main.
  3. Prefer scriptable or automated edits when the transformation is repetitive.
  4. Keep behavior unchanged; do not mix in feature work or cleanup outside scope.
  5. If reorganizing files, update CMake, pixi tasks, generated indexes, and docs.
  6. Run focused checks first, then broader checks according to risk:
    • pixi run lint
    • pixi run build
    • pixi run test
    • pixi run test-all when feasible
    • pixi run -e gazebo test-gz when package, collision, constraint, or downstream Gazebo/gz-physics compatibility could be affected
  7. 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

Same Skill Collection

.agents/skills/dart-analyze/SKILL.md
.agents/skills/dart-architecture/SKILL.md
.agents/skills/dart-audit-agent-compliance/SKILL.md
.agents/skills/dart-backport-pr/SKILL.md
.agents/skills/dart-benchmark-packet/SKILL.md
.agents/skills/dart-branch-cleanup/SKILL.md
.agents/skills/dart-build/SKILL.md
.agents/skills/dart-changelog/SKILL.md
.agents/skills/dart-ci/SKILL.md
.agents/skills/dart-close-issue/SKILL.md
.agents/skills/dart-contribute/SKILL.md
.agents/skills/dart-deps/SKILL.md
.agents/skills/dart-docs-update/SKILL.md
.agents/skills/dart-downstream-fix/SKILL.md
.agents/skills/dart-execute-packet/SKILL.md
.agents/skills/dart-fix-issue/SKILL.md
.agents/skills/dart-io/SKILL.md
.agents/skills/dart-manage-pr/SKILL.md
.agents/skills/dart-model-upgrade/SKILL.md
.agents/skills/dart-new-task/SKILL.md
.agents/skills/dart-next/SKILL.md
.agents/skills/dart-perf/SKILL.md
.agents/skills/dart-plan-update/SKILL.md
.agents/skills/dart-pr/SKILL.md
.agents/skills/dart-python/SKILL.md
.agents/skills/dart-references/SKILL.md
.agents/skills/dart-release-ci-fix/SKILL.md
.agents/skills/dart-release-merge-main/SKILL.md
.agents/skills/dart-release-packaging/SKILL.md
.agents/skills/dart-resume/SKILL.md
.agents/skills/dart-retro/SKILL.md
.agents/skills/dart-review-pr/SKILL.md
.agents/skills/dart-test/SKILL.md
.agents/skills/dart-triage-issue/SKILL.md
.agents/skills/dart-ultrawork/SKILL.md
.agents/skills/dart-verify-sim/SKILL.md
.claude/skills/dart-architecture/SKILL.md
.claude/skills/dart-build/SKILL.md
.claude/skills/dart-ci/SKILL.md
.claude/skills/dart-contribute/SKILL.md
.claude/skills/dart-io/SKILL.md
.claude/skills/dart-perf/SKILL.md
.claude/skills/dart-python/SKILL.md
.claude/skills/dart-references/SKILL.md
.claude/skills/dart-test/SKILL.md
.claude/skills/dart-verify-sim/SKILL.md
.codex/skills/dart-analyze/SKILL.md
.codex/skills/dart-architecture/SKILL.md
.codex/skills/dart-audit-agent-compliance/SKILL.md

Metadata

Files
0
Version
f630c91
Hash
605868d6
Indexed
2026-07-19 11:29

홈 - 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-18 21:59
浙ICP备14020137号-1