skills/makefile/SKILL.md
Use when creating, editing, or validating Makefiles. Provides templates for Go, Node, Python, Docker, and Monorepo projects with self-documenting help targets. Also validates existing Makefiles against conventions. Triggers on: Makefile, makefile, make help, validate makefile, lint makefile.
npx skillsauth add jsonlee12138/prompts makefileInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Makefile 模板生成与验证工具。支持两种模式:
核心原则:注释即文档,make 即入口。
用户说 "创建/生成 Makefile" → Generate 模式
用户说 "validate/检查/lint Makefile" → Validate 模式
用户未明确 → 询问选择
根据项目类型选择模板。如果用户未指定,通过以下方式自动检测:
go.mod → Go 模板package.json → Node 模板pyproject.toml 或 setup.py → Python 模板docker-compose.yml → Docker 模板pnpm-workspace.yaml 或 lerna.json → Monorepo 模板| 模板 | 文件 | 适用场景 |
|------|------|----------|
| Go | assets/Makefile.go.tmpl | Go 项目,含 build/test/lint/docker |
| Node | assets/Makefile.node.tmpl | Node.js/TypeScript,自动检测包管理器 |
| Python | assets/Makefile.python.tmpl | Python 项目,含 venv/pytest/ruff |
| Docker | assets/Makefile.docker.tmpl | Docker Compose 项目,含 up/down/logs |
| Monorepo | assets/Makefile.monorepo.tmpl | 多包仓库,支持 filter 单包操作 |
assets/Makefile.<type>.tmplMakefilemake 验证 help 输出## 描述 写在 target 同一行,make(无参数)自动输出所有 target 及说明。
.DEFAULT_GOAL := help
help: ## 显示帮助信息
@grep -E '^[a-zA-Z_-]+:.*?## ' $(MAKEFILE_LIST) | sed 's/:.*##/:/' | awk -F: '{gsub(/^ /, "", $$2); printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'
build: ## 编译项目
go build ./...
.DEFAULT_GOAL := help — 无参数 make 等同 make help.PHONY 声明所有非文件 target## 注释必须与 target 在同一行,格式:target: deps ## 描述help 的 grep/awk 管线不要随意改动setup-db: create-network ## 启动数据库用户说: "validate Makefile" / "检查 Makefile" / "lint Makefile"
references/validation-rules.md 中的规则逐项检查ERROR (必须修复):
.DEFAULT_GOAL := help 存在help target 存在help 使用 ## 解析## 注释## 注释在同一行## 后有空格.PHONY 声明完整WARNING (建议修复):
SHELLclean target 存在:=help 管线包含 ANSI 高亮INFO (最佳实践):
Makefile Validation Report
══════════════════════════
ERROR (2)
E01 .DEFAULT_GOAL := help 未设置
E04 target 'deploy' 缺少 ## 注释
WARNING (1)
W01 未声明 SHELL 变量
INFO (1)
I01 建议添加 lint target
Result: FAIL (2 errors, 1 warning, 1 info)
Validate 完成后:
| 错误 | 正确 |
|------|------|
| ## 注释在 target 上方单独一行 | ## 写在 target 同一行 |
| 缺少 .DEFAULT_GOAL := help | 必须设置 |
| ## 后无空格 | ## 描述,## 后必须有空格 |
| help 管线用 awk -F: 切 3 段 | 用 sed 's/:.*##/:/' 先归一化 |
| recipe 用空格缩进 | 必须用 Tab |
| .PHONY 遗漏 target | 所有非文件 target 都要声明 |
development
Unified design workflow router for critique, accessibility review, developer handoff, design system work, UX copy, user research, and research synthesis. Use when users ask naturally for design feedback, mockup review, a11y audit, handoff specs, UX writing, research planning, research synthesis, or mention Figma, Pencil, or HTML design workflows and should not need to invoke separate sub-skills manually.
development
Use when creating or debugging GitHub Actions workflows that publish npm packages with trusted publishing / OIDC. Triggers on npm publish in CI, ENEEDAUTH, E404 or E422 during publish, tag-triggered releases, setup-node auth behavior, or provenance issues in public vs private GitHub repositories.
tools
TanStack (Router/Query/Form/Table) configuration guide for Vite + React projects. Covers Vite plugin setup, main.tsx registration, DevTools configuration, and editor settings. Use when setting up or reviewing TanStack config in a Vite project. Triggers on: vite-tanstack, tanstack config, tanstack router setup, tanstack query setup, tanstack form setup, tanstack table setup.
tools
Configure UnoCSS with unocss-preset-shadcn using a semi-automatic, framework-agnostic workflow. Use when setting up or updating UnoCSS + shadcn integration, deciding monorepo vs single-project component destinations, enforcing peerDependencies in monorepos, and requiring shadcn MCP + manual component creation mode.