dotnet-resharper-clt
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseReSharper Command Line Tools
ReSharper 命令行工具
Trigger On
适用场景
- the repo uses or wants ReSharper Command Line Tools
- the team wants or
jb inspectcodejb cleanupcode - the user asks for stronger C# inspections, cleanup profiles, or ReSharper-based CI gates
- 仓库使用或想要使用 ReSharper 命令行工具
- 团队需要使用 或
jb inspectcodejb cleanupcode - 用户需要更强大的C#检查能力、清理配置,或者基于ReSharper的CI门禁
Value
价值
- produce a concrete project delta: code, docs, config, tests, CI, or review artifact
- reduce ambiguity through explicit planning, verification, and final validation skills
- leave reusable project context so future tasks are faster and safer
- 生成具体的项目变更:代码、文档、配置、测试、CI或评审产物
- 通过明确的规划、验证和最终校验能力减少歧义
- 留存可复用的项目上下文,让后续任务执行更高效安全
Do Not Use For
不适用场景
- replacing tests with inspection output
- ad-hoc formatting-only work when the repo intentionally standardizes on another formatter
- repos that do not want JetBrains settings or CLT-based gates in their workflow
- 用检查输出替代测试
- 当仓库明确指定使用其他格式化工具的临时格式化需求
- 工作流中不希望使用JetBrains设置或基于CLT的门禁的仓库
Inputs
输入
- the nearest
AGENTS.md - the target ,
.sln, or bounded file set.csproj - repo-root
.editorconfig - solution shared settings such as
YourSolution.sln.DotSettings
- 最近的 文件
AGENTS.md - 目标 、
.sln或限定的文件集合.csproj - 仓库根目录的 文件
.editorconfig - 解决方案共享配置,例如
YourSolution.sln.DotSettings
Quick Start
快速开始
- Read the nearest and confirm scope and constraints.
AGENTS.md - Run this skill's through the
Workflowuntil outcomes are acceptable.Ralph Loop - Return the with concrete artifacts and verification evidence.
Required Result Format
- 阅读最近的 文件,确认范围和约束。
AGENTS.md - 通过 运行本技能的
Ralph Loop,直到结果符合预期。工作流 - 返回符合的内容,包含具体产物和验证证据。
要求结果格式
Workflow
工作流
- Prefer solution-level runs when possible so ReSharper can resolve references and apply full inspections.
- Build the solution before when working at solution scope.
jb cleanupcode - Use first to surface issues before editing anything broad.
jb inspectcode - Treat surfaced issues as mandatory fixes when this gate is enabled for the repo; do not just dump a report and stop.
- Use with an explicit cleanup profile:
jb cleanupcodeBuilt-in: Full CleanupBuilt-in: Reformat CodeBuilt-in: Reformat & Apply Syntax Style- or a checked-in custom profile
- Keep durable ReSharper settings in the team-shared solution layer and commit the solution file when policy changes.
.DotSettings - Re-run after cleanup or fixes, then run the repo's normal quality pass and tests.
jb inspectcode
- 尽可能优先使用解决方案级运行,以便ReSharper可以解析引用并执行完整检查。
- 在解决方案范围执行前先构建解决方案。
jb cleanupcode - 先运行暴露问题,再进行大范围编辑。
jb inspectcode - 当仓库启用该门禁时,暴露的问题必须修复,不要只输出报告就结束。
- 配合明确的清理配置使用:
jb cleanupcodeBuilt-in: Full CleanupBuilt-in: Reformat CodeBuilt-in: Reformat & Apply Syntax Style- 或者已提交的自定义配置
- 将持久化的ReSharper配置保存在团队共享的解决方案层,策略变更时提交解决方案的文件。
.DotSettings - 清理或修复后重新运行,再运行仓库常规的质量检查和测试。
jb inspectcode
Bootstrap When Missing
缺失时的引导安装
If ReSharper Command Line Tools are not available yet:
- Detect current state:
rg --files -g '.config/dotnet-tools.json' -g '*.sln.DotSettings'dotnet tool list --localdotnet tool list --globalcommand -v jb
- Choose the install path deliberately:
- preferred repo-local install for reproducible CI:
- (if missing)
dotnet new tool-manifest dotnet tool install JetBrains.ReSharper.GlobalTools
- global fallback:
dotnet tool install --global JetBrains.ReSharper.GlobalTools
- preferred repo-local install for reproducible CI:
- Verify the installed commands resolve correctly:
jb inspectcode --helpjb cleanupcode --help
- Record exact commands in , for example:
AGENTS.mddotnet build MySolution.sln -c Releasejb inspectcode MySolution.sln -o=artifacts/inspectcode.sarifjb cleanupcode MySolution.sln --profile="Built-in: Full Cleanup"
- If the repo needs stable settings, save them into the solution team-shared layer and commit .
YourSolution.sln.DotSettings - Run once, fix or triage the surfaced issues, rerun it, and return
jb inspectcodeorstatus: configured.status: improved - If the repo intentionally excludes ReSharper CLT from its toolchain, return .
status: not_applicable
如果还没有安装ReSharper命令行工具:
- 检测当前状态:
rg --files -g '.config/dotnet-tools.json' -g '*.sln.DotSettings'dotnet tool list --localdotnet tool list --globalcommand -v jb
- 谨慎选择安装路径:
- 优先选择仓库本地安装,保证CI可复现:
- (如果缺失)
dotnet new tool-manifest dotnet tool install JetBrains.ReSharper.GlobalTools
- 全局安装备选:
dotnet tool install --global JetBrains.ReSharper.GlobalTools
- 优先选择仓库本地安装,保证CI可复现:
- 验证安装的命令可正常解析:
jb inspectcode --helpjb cleanupcode --help
- 在中记录具体命令,例如:
AGENTS.mddotnet build MySolution.sln -c Releasejb inspectcode MySolution.sln -o=artifacts/inspectcode.sarifjb cleanupcode MySolution.sln --profile="Built-in: Full Cleanup"
- 如果仓库需要稳定配置,将其保存到解决方案团队共享层并提交。
YourSolution.sln.DotSettings - 运行一次,修复或分类处理暴露的问题,重新运行,返回
jb inspectcode或status: configured。status: improved - 如果仓库明确拒绝将ReSharper CLT纳入工具链,返回。
status: not_applicable
Deliver
交付物
- explicit and
jb inspectcodecommandsjb cleanupcode - durable ReSharper settings in shared solution config
- a quality gate that surfaces issues which are then fixed, not ignored
- 明确的和
jb inspectcode命令jb cleanupcode - 保存在共享解决方案配置中的持久化ReSharper设置
- 可暴露问题并推动修复而非忽略的质量门禁
Validate
验证
- the target solution or project builds before solution-wide cleanup
- output is reviewed and acted on
jb inspectcode - cleanup profiles and shared settings are explicit
- tests and the wider quality pass still run after ReSharper-driven fixes
- 目标解决方案或项目在全解决方案级清理前可正常构建
- 输出已被审阅并采取了对应处理
jb inspectcode - 清理配置和共享设置明确
- ReSharper驱动的修复完成后,测试和更广泛的质量检查仍可正常运行
Ralph Loop
Ralph Ralph Loop
Use the Ralph Loop for every task, including docs, architecture, testing, and tooling work.
- Plan first (mandatory):
- analyze current state
- define target outcome, constraints, and risks
- write a detailed execution plan
- list final validation skills to run at the end, with order and reason
- Execute one planned step and produce a concrete delta.
- Review the result and capture findings with actionable next fixes.
- Apply fixes in small batches and rerun the relevant checks or review steps.
- Update the plan after each iteration.
- Repeat until outcomes are acceptable or only explicit exceptions remain.
- If a dependency is missing, bootstrap it or return with explicit reason and fallback path.
status: not_applicable
所有任务都需使用Ralph Loop,包括文档、架构、测试和工具相关工作。
- 优先规划(强制要求):
- 分析当前状态
- 定义目标结果、约束和风险
- 编写详细的执行计划
- 列出最终要运行的最终校验能力,包含顺序和原因
- 执行一个规划好的步骤,生成具体变更。
- 评审结果,记录发现和可执行的后续修复项。
- 小批量应用修复,重新运行相关检查或评审步骤。
- 每次迭代后更新计划。
- 重复直到结果符合预期,或仅剩余明确的例外项。
- 如果缺少依赖,引导安装依赖或返回并附明确原因和备选方案。
status: not_applicable
Required Result Format
要求的结果格式
- :
status|complete|clean|improved|configured|not_applicableblocked - : concise plan and current iteration step
plan - : concrete changes made
actions_taken - : final skills run, or skipped with reasons
validation_skills - : commands, checks, or review evidence summary
verification - : top unresolved items or
remainingnone
For setup-only requests with no execution, return and exact next commands.
status: configured- :
status|complete|clean|improved|configured|not_applicableblocked - : 简要计划和当前迭代步骤
plan - : 已执行的具体变更
actions_taken - : 已运行的最终校验能力,或跳过的原因
validation_skills - : 命令、检查或评审证据摘要
verification - : 主要未解决项或
remainingnone
仅设置类请求无执行内容时,返回和具体的后续命令。
status: configuredLoad References
参考文档
references/resharper-clt.mdreferences/commands.mdreferences/config.md
references/resharper-clt.mdreferences/commands.mdreferences/config.md
Example Requests
请求示例
- "Add ReSharper CLI inspections to this .NET repo."
- "Run InspectCode and fix what it finds."
- "Set up CleanupCode with a shared profile."
- "Use JetBrains ReSharper command line tools in CI."
- "给这个.NET仓库添加ReSharper CLI检查。"
- "运行InspectCode并修复发现的问题。"
- "使用共享配置设置CleanupCode。"
- "在CI中使用JetBrains ReSharper命令行工具。"