jetbrains-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseJetBrains Skill
JetBrains Skill
Quick start
快速开始
Goal: use JetBrains IDE features (index, inspections, refactoring, run configurations, integrated terminal) as tools for an external client, while keeping changes auditable and safe.
notes + tool list (condensed): .
skills/jetbrains-skill/references/jetbrains-skill.md目标:将JetBrains IDE的功能(索引、检查、重构、运行配置、集成终端)作为外部客户端的工具使用,同时确保变更可审计且安全。
说明 + 工具列表(精简版):
skills/jetbrains-skill/references/jetbrains-skill.mdConnection & modes
连接与模式
Client setup (done in the IDE)
客户端设置(在IDE中完成)
- Settings → Tools → MCP Server
- Enable MCP Server
- Use “Auto-configure” for supported clients (updates their JSON config), or copy SSE / Stdio config for manual setup
- Restart the external client to apply changes
- 设置 → 工具 → MCP Server
- 启用MCP Server
- 对支持的客户端使用“自动配置”(会更新其JSON配置),或复制SSE / Stdio配置进行手动设置
- 重启外部客户端以应用更改
Brave Mode (no confirmations)
无畏模式(无需确认)
The IDE can allow running shell commands / run configurations without per-action confirmation (“Brave mode”).
This increases automation power but also increases risk. Require explicit user confirmation before enabling/disabling it.
IDE可允许在无需每次操作确认的情况下运行shell命令/运行配置(“无畏模式”)。
这会提升自动化能力,但也会增加风险。启用/禁用该模式前需获得用户明确确认。
Workflow decision tree
工作流决策树
- Do I need IDE-grade analysis/refactoring?
- File diagnostics:
get_file_problems - Symbol semantics / docs:
get_symbol_info - Safe rename across project: (prefer over plain text replace)
rename_refactoring - Indexed search: /
search_in_files_by_textsearch_in_files_by_regex - Find files: (fast, name-only) or
find_files_by_name_keyword(path glob)find_files_by_glob
- Do I just need file operations in the project?
- Read file text:
get_file_text_by_path - Create file:
create_new_file - Targeted replace: (auto-saves)
replace_text_in_file - Open in editor:
open_file_in_editor - Reformat:
reformat_file
- Do I need to run something?
- List run configs:
get_run_configurations - Run a config (wait for completion):
execute_run_configuration - Run a terminal command in IDE: (may require confirmation; output is capped)
execute_terminal_command
- 我是否需要IDE级别的分析/重构?
- 文件诊断:
get_file_problems - 符号语义/文档:
get_symbol_info - 项目内安全重命名:(优先于纯文本替换)
rename_refactoring - 索引搜索:/
search_in_files_by_textsearch_in_files_by_regex - 查找文件:(快速,仅按名称)或
find_files_by_name_keyword(路径通配符)find_files_by_glob
- 我是否仅需要项目中的文件操作?
- 读取文件文本:
get_file_text_by_path - 创建文件:
create_new_file - 定向替换:(自动保存)
replace_text_in_file - 在编辑器中打开:
open_file_in_editor - 重新格式化:
reformat_file
- 我是否需要运行某些内容?
- 列出运行配置:
get_run_configurations - 运行配置(等待完成):
execute_run_configuration - 在IDE中运行终端命令:(可能需要确认;输出有上限)
execute_terminal_command
Constraints (avoid common mistakes)
约束条件(避免常见错误)
- Always pass when known to avoid ambiguity.
projectPath - Many tools require paths relative to the project root and only operate on project files.
- Line/column positions are 1-based for location-based tools.
- Prefer controlling output with +
maxLinesCount; do not rely on defaults for large outputs.truncateMode - Terminal commands and running configurations are high-risk; require explicit confirmation for any potentially destructive command. Brave Mode removes guardrails.
- 当已知时,务必传入该参数以避免歧义。
projectPath - 许多工具要求路径相对于项目根目录,且仅对项目文件生效。
- 基于位置的工具,其行/列位置为1起始。
- 优先使用+
maxLinesCount控制输出;对于大输出,不要依赖默认设置。truncateMode - 终端命令和运行配置具有高风险;对于任何可能具有破坏性的命令,需获得明确确认。无畏模式会移除这些防护措施。
Recommended high-value patterns
推荐的高价值使用模式
Debug via inspections first
先通过检查进行调试
- to find errors/warnings → 2)
get_file_problemsto understand the code → 3)get_symbol_infofor renames → 4)rename_refactoringonly for truly textual changes.replace_text_in_file
- 使用查找错误/警告 → 2) 使用
get_file_problems理解代码 → 3) 使用get_symbol_info进行重命名 → 4) 仅对纯文本变更使用rename_refactoring。replace_text_in_file
Use indexed search for scale
使用索引搜索实现规模化
Prefer / since it uses IDE search/indexing and highlights matches with .
search_in_files_by_textsearch_in_files_by_regex||优先使用 / ,因为它们利用IDE的搜索/索引功能,并使用高亮匹配结果。
search_in_files_by_textsearch_in_files_by_regex||Running and output control
运行与输出控制
Use with a sane (ms). For terminal commands use , but remember output caps; for huge output, redirect to a file and read it via file tools.
execute_run_configurationtimeoutexecute_terminal_command使用时设置合理的(毫秒)。对于终端命令,使用,但需注意输出上限;若输出量极大,可将其重定向到文件,再通过文件工具读取。
execute_run_configurationtimeoutexecute_terminal_commandReferences
参考资料
- notes + tool list (condensed):
skills/jetbrains-skill/references/jetbrains-skill.md
- 说明 + 工具列表(精简版):
skills/jetbrains-skill/references/jetbrains-skill.md