关于 ln-751-command-templates
ln-751-command-templates 是一个工作者技能,根据 ln-750 提供的模板和变量生成 Claude Code 命令文件。它将替换后的文件写入 `.claude/commands/`,并在占位符未解析时中止。
主要功能
- 01加载预定义命令模板
- 02替换 Handlebars 风格变量
- 03生成文件至 `.claude/commands/`
- 04占位符未解析时中止
- 05报告成功或失败
适用场景
- 01创建项目上下文命令
- 02生成构建和测试命令
- 03准备部署或数据库命令
- 04使用 Playwright 时添加 UI 测试命令
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ levnikolaevich/ claude-code-skills --skill ln-751-command-templates安装后在 Claude Code 中输入/ln-751-command-templates确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
references/build_and_test_template.mddatabase_ops_template.mddeploy_template.mdrefresh_context_template.mdrefresh_infrastructure_template.mdui_testing_template.md详细介绍
**路径:**文件路径(
shared/、references/、../ln-*)均相对于 skills 仓库根目录。如果在当前工作目录中找不到,请定位此 SKILL.md 目录,并向上一级查找仓库根目录。
ln-751-command-templates
**类型:**L3 Worker **类别:**7XX 项目引导 **上级:**ln-750-commands-generator
根据模板生成 Claude Code 命令,并替换变量。
概览
| 方面 | 详情 |
|---|---|
| 输入 | 模板名称、来自 ln-750 的变量值 |
| 输出 | .claude/commands/{command}.md 文件 |
| 模板 | 位于 references/ 目录中 |
可用模板
| 模板 | 输出文件 | 必需 |
|---|---|---|
refresh_context_template.md | refresh_context.md | 始终 |
refresh_infrastructure_template.md | refresh_infrastructure.md | 始终 |
build_and_test_template.md | build-and-test.md | 始终 |
ui_testing_template.md | ui-testing.md | 如果使用 Playwright |
deploy_template.md | deploy.md | 如果使用 CI/CD |
database_ops_template.md | database-ops.md | 如果使用 Database |
工作流
- 接收来自 ln-750 的模板名称和变量
- 加载
references/{template}.md中的模板 - 替换所有
{{VARIABLE}}占位符 - 写入
.claude/commands/目录 - 报告成功或失败情况给协调器
变量语法
所有模板都使用 Handlebars 风格的语法:{{VARIABLE_NAME}}
常用变量:
{{PROJECT_NAME}}— 项目名称{{FRONTEND_ROOT}}— 前端源代码路径{{BACKEND_ROOT}}— 后端源代码路径{{FRONTEND_PORT}}— 前端开发服务端口{{BACKEND_PORT}}— 后端 API 端口{{TECH_STACK}}— 技术栈摘要
**必须阅读:**从 references/ 加载模板,以获取完整的变量列表。
关键规则
- **仅由模板驱动:**所有输出均根据
references/中的模板生成,绝不自由编写 - **完整替换:**必须替换每个
{{VARIABLE}};若仍有未解析的占位符,则失败 - **写入正确路径:**输出始终写入
.claude/commands/,不得写入其他位置 - 不得修改模板:
references/中的模板为只读;仅写入输出文件
完成定义
- 已从
references/{template}.md加载模板 - 已使用来自 ln-750 的值替换所有
{{VARIABLE}}占位符 - 已将输出写入
.claude/commands/{command}.md - 已向协调器报告成功或失败情况
参考文件
- refresh_context_template.md:references/refresh_context_template.md
- refresh_infrastructure_template.md:references/refresh_infrastructure_template.md
- build_and_test_template.md:references/build_and_test_template.md
- ui_testing_template.md:references/ui_testing_template.md
- deploy_template.md:references/deploy_template.md
- database_ops_template.md:references/database_ops_template.md
**版本:**2.0.0 **最后更新:**2026-01-10
评论
支持 Markdown