install-skills
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseInstall Skills Configuration Tool
安装技能配置工具
Configure skills by asking the user for their preferences and updating the skill files accordingly.
通过询问用户偏好并相应更新技能文件来配置技能。
Arguments
参数
- (optional): Skill name to configure. If not provided, configure all available skills that need setup.
$0
- (可选):要配置的技能名称。如果未提供,则配置所有需要设置的可用技能。
$0
Supported Skills
支持的技能
Build Skill
Build Skill
The skill can be configured with:
build-
Build directory pattern: Where builds are stored relative to workspace
- Always prompt with at least these options:
- (e.g.,
build/${buildType},build/Debug) - Recommendedbuild/Release - (single build directory)
build
- Additional optional patterns:
- (CLion style)
cmake-build-${buildType} - Custom pattern
- Always prompt with at least these options:
-
Default build type: What build type to use when not specified
- Options: ,
Release,Debug,RelWithDebInfo,ASAN,TSAN,MSANUBSAN
- Options:
-
Default target: What to build by default
- Common targets: ,
clickhouse,clickhouse-server, or build allclickhouse-client
- Common targets:
build-
构建目录模式:构建产物相对于工作区的存储位置
- 必须至少提供以下选项供用户选择:
- (例如:
build/${buildType}、build/Debug)- 推荐选项build/Release - (单一构建目录)
build
- 其他可选模式:
- (CLion风格)
cmake-build-${buildType} - 自定义模式
- 必须至少提供以下选项供用户选择:
-
默认构建类型:未指定时使用的构建类型
- 选项:、
Release、Debug、RelWithDebInfo、ASAN、TSAN、MSANUBSAN
- 选项:
-
默认构建目标:默认要构建的内容
- 常见目标:、
clickhouse、clickhouse-server,或构建全部内容clickhouse-client
- 常见目标:
Test Skill
Test Skill
The skill can be configured with:
test-
Build directory pattern: Where to find the clickhouse binary for testing
- Should match the build skill configuration
- Used to set PATH for test runner
- Always prompt with at least: and
build/${buildType}build
-
Default build type for testing: Which build to use when running tests
- Options: ,
Release,Debug,RelWithDebInfo,ASAN, etc.TSAN - Typically the same as the build skill default
- Options:
test-
构建目录模式:测试时查找clickhouse二进制文件的位置
- 应与Build Skill的配置匹配
- 用于为测试运行器设置PATH
- 必须至少提供以下选项:和
build/${buildType}build
-
测试默认构建类型:运行测试时使用的构建版本
- 选项:、
Release、Debug、RelWithDebInfo、ASAN等TSAN - 通常与Build Skill的默认设置相同
- 选项:
Configuration Process
配置流程
-
Identify the skill to configure:
- If is provided, configure that specific skill
$ARGUMENTS - Otherwise, configure all available skills that need setup (build and test together)
- If
-
When configuring both build and test skills together:
- Ask all questions upfront (build directory, default build type, default target)
- Use the same answers to configure both skills
- The test skill will use the same build directory and default build type as the build skill
- After configuration, update CLAUDE.md to load both skills
-
For the build skill:a. Ask about build directory structure:
- Use to ask: "What is your build directory structure?"
AskUserQuestion - MANDATORY: Always include at least these two options:
- - Separate directory per build type (e.g., build/Debug, build/Release)
build/${buildType} - - Single build directory for all build types
build
- Additional optional options:
- - CLion/JetBrains style
cmake-build-${buildType} - Custom - Let user specify their own pattern
b. Ask about default build type:- Use to ask: "What should be the default build type?"
AskUserQuestion - Options (with descriptions):
- - Optimized with debug info (recommended for development)
RelWithDebInfo - - Full debug symbols, no optimization
Debug - - Fully optimized, no debug info
Release - - AddressSanitizer build
ASAN - - ThreadSanitizer build
TSAN - Other sanitizers as options
c. Ask about default target:- Use to ask: "What should be the default build target?"
AskUserQuestion - Options:
- - Main binary (recommended)
clickhouse - - Server only
clickhouse-server - - Client only
clickhouse-client - - Build everything
all - Custom - Let user specify
d. Update the build skill file:- Read
.claude/skills/build/SKILL.md - Use tool to update:
Edit- Build directory path pattern
- Default build type in the arguments section
- Default target in the arguments section
- Update examples to reflect new defaults
- Update the "Build Process" section with the actual paths
- Use
-
For the test skill:a. Ask about build directory structure:
- Use the same build directory structure selected for the build skill
- Or ask separately if configuring test skill independently
- MANDATORY: When asking, always include at least these two options:
- - Separate directory per build type
build/${buildType} - - Single build directory
build
b. Ask about default build type for testing:- Use to ask: "Which build should be used for running tests?"
AskUserQuestion - Options (with descriptions):
- - Optimized with debug info (recommended, same as build default)
RelWithDebInfo - - Full debug build
Debug - - Optimized build
Release - - AddressSanitizer build (for memory testing)
ASAN - - ThreadSanitizer build (for concurrency testing)
TSAN
c. Update the test skill file:- Read
.claude/skills/test/SKILL.md - Use tool to update:
Edit- Binary path in step 3 (verify server) to match build directory pattern
- Binary path in step 4 (PATH export) to match build directory pattern
- Update examples and notes with correct paths
-
Confirm configuration:
- Show summary of changes made
- Confirm the skill is now configured for their workspace
- Provide example commands they can use
-
Update CLAUDE.md to load configured skills:After configuring skills, updateto include them in the "Always load and apply" section:
.claude/CLAUDE.mda. Read the current CLAUDE.md:- Use tool to read
Read.claude/CLAUDE.md
b. Update the skills list:- Find the section that starts with "Always load and apply the following skills:"
- The section currently lists only
.claude/skills/install-skills - Add entries for all configured skills:
- - if build skill was configured
.claude/skills/build - - if test skill was configured
.claude/skills/test
c. Use Edit to update CLAUDE.md:- Replace the skills list to include all configured skills
- Maintain the format with one skill per line prefixed with "- "
- Example result:
Always load and apply the following skills: - .claude/skills/install-skills - .claude/skills/build - .claude/skills/test
d. Confirm the update:- Inform user that CLAUDE.md has been updated to load the configured skills
- Explain that the skills will be automatically available in future sessions
- Use
-
确定要配置的技能:
- 如果提供了,则配置指定的技能
$ARGUMENTS - 否则,配置所有需要设置的可用技能(Build和Test一起配置)
- 如果提供了
-
同时配置Build和Test技能时:
- 提前询问所有问题(构建目录、默认构建类型、默认构建目标)
- 使用相同的答案配置两个技能
- Test技能将使用与Build技能相同的构建目录和默认构建类型
- 配置完成后,更新CLAUDE.md以加载这两个技能
-
针对Build技能:a. 询问构建目录结构:
- 使用询问:"你的构建目录结构是什么?"
AskUserQuestion - **必填:**必须至少包含以下两个选项:
- - 每个构建类型对应单独目录(例如:build/Debug、build/Release)
build/${buildType} - - 所有构建类型共用单一目录
build
- 其他可选选项:
- - CLion/JetBrains风格
cmake-build-${buildType} - 自定义 - 允许用户指定自己的模式
b. 询问默认构建类型:- 使用询问:"默认构建类型应该是什么?"
AskUserQuestion - 选项(含描述):
- - 带调试信息的优化版本(推荐用于开发)
RelWithDebInfo - - 完整调试符号,无优化
Debug - - 完全优化,无调试信息
Release - - AddressSanitizer构建版本
ASAN - - ThreadSanitizer构建版本
TSAN - 其他 sanitizer 选项
c. 询问默认构建目标:- 使用询问:"默认构建目标应该是什么?"
AskUserQuestion - 选项:
- - 主二进制文件(推荐)
clickhouse - - 仅服务器
clickhouse-server - - 仅客户端
clickhouse-client - - 构建全部内容
all - 自定义 - 允许用户指定
d. 更新Build技能文件:- 读取
.claude/skills/build/SKILL.md - 使用工具更新:
Edit- 构建目录路径模式
- 参数部分的默认构建类型
- 参数部分的默认构建目标
- 更新示例以反映新的默认设置
- 使用实际路径更新“构建流程”部分
- 使用
-
针对Test技能:a. 询问构建目录结构:
- 使用为Build技能选择的相同构建目录结构
- 如果独立配置Test技能,则单独询问
- **必填:**询问时必须至少包含以下两个选项:
- - 每个构建类型对应单独目录
build/${buildType} - - 单一构建目录
build
b. 询问测试默认构建类型:- 使用询问:"运行测试应使用哪个构建版本?"
AskUserQuestion - 选项(含描述):
- - 带调试信息的优化版本(推荐,与Build默认设置相同)
RelWithDebInfo - - 完整调试构建版本
Debug - - 优化构建版本
Release - - AddressSanitizer构建版本(用于内存测试)
ASAN - - ThreadSanitizer构建版本(用于并发测试)
TSAN
c. 更新Test技能文件:- 读取
.claude/skills/test/SKILL.md - 使用工具更新:
Edit- 步骤3(验证服务器)中的二进制路径以匹配构建目录模式
- 步骤4(PATH导出)中的二进制路径以匹配构建目录模式
- 使用正确路径更新示例和说明
-
确认配置:
- 显示所做更改的摘要
- 确认技能已为工作区配置完成
- 提供可使用的示例命令
-
更新CLAUDE.md以加载已配置的技能:配置技能后,更新,将它们添加到“始终加载并应用”部分:
.claude/CLAUDE.mda. 读取当前CLAUDE.md:- 使用工具读取
Read.claude/CLAUDE.md
b. 更新技能列表:- 找到以“Always load and apply the following skills:”开头的部分
- 该部分当前仅列出
.claude/skills/install-skills - 添加所有已配置技能的条目:
- - 如果配置了Build技能
.claude/skills/build - - 如果配置了Test技能
.claude/skills/test
c. 使用Edit更新CLAUDE.md:- 替换技能列表以包含所有已配置技能
- 保持格式为每行一个技能,前缀为“- ”
- 示例结果:
Always load and apply the following skills: - .claude/skills/install-skills - .claude/skills/build - .claude/skills/test
d. 确认更新:- 告知用户CLAUDE.md已更新以加载已配置的技能
- 说明这些技能将在未来会话中自动可用
- 使用
Implementation Details
实现细节
- Always use to gather preferences before making changes
AskUserQuestion - Use to read the current skill files and CLAUDE.md
Read - Use to make precise updates to skill files and CLAUDE.md
Edit - Present clear options with descriptions to help users choose
- IMPORTANT: When prompting for build directory, ALWAYS include at minimum: and
build/${buildType}as optionsbuild - Validate user inputs before applying changes
- Show before/after summary of what changed
- After configuring skills, always update CLAUDE.md to include them in the load list
- 始终使用收集偏好后再进行更改
AskUserQuestion - 使用读取当前技能文件和CLAUDE.md
Read - 使用对技能文件和CLAUDE.md进行精确更新
Edit - 提供带描述的清晰选项以帮助用户选择
- 重要提示: 询问构建目录时,必须至少包含和
build/${buildType}作为选项build - 应用更改前验证用户输入
- 显示更改前后的摘要
- 配置技能后,始终更新CLAUDE.md以将其添加到加载列表中
Example Usage
示例用法
- - Configure all skills (build and test together)
/install-skills - - Configure only the build skill
/install-skills build - - Configure only the test skill
/install-skills test
- - 配置所有技能(Build和Test一起)
/install-skills - - 仅配置Build技能
/install-skills build - - 仅配置Test技能
/install-skills test
Notes
注意事项
- Configuration is workspace-specific and stored in
.claude/skills/ - Changes are made to the local skill files
- Users can manually edit skill files later if needed
- The tool preserves other skill content while updating only the specified sections
- 配置是工作区特定的,存储在中
.claude/skills/ - 更改会应用到本地技能文件
- 用户之后可根据需要手动编辑技能文件
- 工具会保留技能的其他内容,仅更新指定部分