makefile
Use when creating, editing, or validating Makefiles.
Skill by JsonLee12138
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/jsonlee12138-makefile
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: devops, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/makefile
What's inside
- Skill name
makefile- Description
- 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.
- License
- Apache-2.0
- Instructions
- 157 lines in SKILL.md · view on GitHub
Files (7)
- SKILL.md
- Makefile.docker.tmpl · assets/
- Makefile.go.tmpl · assets/
- Makefile.monorepo.tmpl · assets/
- Makefile.node.tmpl · assets/
- Makefile.python.tmpl · assets/
- validation-rules.md · references/
SKILL.md (first lines)
# Makefile Skill
## Overview
Makefile 模板生成与验证工具。支持两种模式:
1. **Generate** — 根据项目类型生成标准化 Makefile 模板
2. **Validate** — 检查现有 Makefile 是否符合规范
核心原则:**注释即文档,`make` 即入口。**
## Mode Selection
```
用户说 "创建/生成 Makefile" → Generate 模式
用户说 "validate/检查/lint Makefile" → Validate 模式
用户未明确 → 询问选择
```
---
## Generate 模式
### Template Selection
根据项目类型选择模板。如果用户未指定,通过以下方式自动检测:
1. 检查 `go.mod` → Go 模板
2. 检查 `package.json` → Node 模板
3. 检查 `pyproject.toml` 或 `setup.py` → Python 模板
4. 检查 `docker-compose.yml` → Docker 模板
5. 检查 `pnpm-workspace.yaml` 或 `lerna.json` → Monorepo 模板
6. 无法检测 → 询问用户选择
### Available Templates
| 模板 | 文件 | 适用场景 |
|------|------|----------|
| 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 单包操作 |
### Generate Workflow
1. 检测或询问项目类型
2. 读取对应模板 `assets/Makefile.<type>.tmpl`
3. 根据项目实际情况调整变量(APP_NAME、端口等)
4. 写入 `Makefile`
5. 提示用户运行 `make` 验证 help 输出
### Convention
`## 描述` 写在 target 同一行,`make`(无参数)自动输出所有 target 及说明。
```makefile
.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 ./...
```
### Rules
1. `.DEFAULT_GOAL := help` — 无参数 `make` 等同 `make help`
2. `.PHONY` 声明所有非文件 target
3. `##` 注释必须与 target 在同一行,格式:`target: deps ## 描述`
4. 描述用中文或英文,保持项目内一致
5. `help` 的 grep/awk 管线不要随意改动
6. 带依赖的 target:`setup-db: create-network ## 启动数据库`
---
## Validate 模式
### Trigger
```
用户说: "validate Makefile" / "检查 Makefile" / "lint Makefile"
```
### Workflow
1. 读取目标 Makefile(默认当前目录,或用户指定路径)
2. 按 `references/validation-rules.md` 中的规则逐项检查
3. 输出格式化报告
### Validation Rules Summary
**ERROR (必须修复):**
- E01: `.DEFAULT_GOAL := help` 存在
- E02: `help` target 存在
- E03: `help` 使用 `##` 解析
- E04: 每个非文件 target 有 `##` 注释
- E05: `##` 注释在同一行
- E06: `##` 后有空格
- E07: `.PHONY` 声明完整
- E08: 缩进使用 Tab
**WARNING (建议修复):**
- W01: 显式声明 `SHELL`
- W02: `clean` target 存在
- W03: 变量使用 `:=`
- W04: 长命令合理换行
- W05: `help` 管线包含 ANSI 高亮
- W06: target 按功能分组
**INFO (最佳实践):**
- I01: 常用 target 覆盖 (build/test/lint/clean)
- I02: VERSION 从 git 获取
- I03: Docker target 命名一致
- I04: 避免硬编码路径
### Output FormatFrom JsonLee12138/prompts, Apache-2.0.
More from JsonLee12138/prompts
- 0.507score
actions-npm
JsonLee12138
Use when creating or debugging GitHub Actions workflows that publish npm packages with trusted publishing / OIDC.
SkillCFreshness: C★ 2Claude Code +9 - 0.448score
claude-design
JsonLee12138
Unified design workflow router for critique, accessibility review, developer handoff, design system work, UX copy, user research, and research synthesis.
SkillDFreshness: D★ 2Claude Code +9 - 0.448score
components
JsonLee12138
Use when designing, implementing, or reviewing React/TypeScript components with naming conventions, props typing, hooks usage, and UnoCSS styling standards.
SkillDFreshness: D★ 2Claude Code +9 - 0.448score
design-patterns-principles
JsonLee12138
Use when a request asks for software design patterns or design principles, including explanations, comparisons, summaries, or quick reference grounded in…
SkillDFreshness: D★ 2Claude Code +9 - 0.448score
eslint-config
JsonLee12138
Use when configuring ESLint with @antfu/eslint-config for a single project or a monorepo workspace, including flat config setup, shared config packages…
SkillDFreshness: D★ 2Claude Code +9 - 0.448score
solo-ops
JsonLee12138
AI team role manager for multi-agent development workflows.
SkillDFreshness: D★ 2Claude Code +9 - 0.448score
unocss-shadcn
JsonLee12138
Configure UnoCSS with unocss-preset-shadcn using a semi-automatic, framework-agnostic workflow.
SkillDFreshness: D★ 2Claude Code +9 - 0.448score
vite-tanstack
JsonLee12138
TanStack (Router/Query/Form/Table) configuration guide for Vite + React projects.
SkillDFreshness: D★ 2Claude Code +9 - 0.417score
brainstorming
JsonLee12138
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior.
SkillDFreshness: D★ 2Claude Code +9
Signals
- Stars
- 2
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Apr 23, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/JsonLee12138/prompts
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from JsonLee12138
- 0.507score
actions-npm
JsonLee12138
Use when creating or debugging GitHub Actions workflows that publish npm packages with trusted publishing / OIDC.
SkillCFreshness: C★ 2Claude Code +9 - 0.502score
task-splitting
JsonLee12138
Decompose requirement, design, or brainstorming documents into reviewable task drafts with one function per task and one file per task, then create…
SkillDFreshness: D★ 33Claude Code +9 - 0.502score
prompt-engineering-patterns
JsonLee12138
Master advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability in production.
SkillDFreshness: D★ 33Claude Code +9 - 0.497score
mckinsey-consultant
JsonLee12138
McKinsey-style business consultant for hypothesis-driven problem solving, structured analysis, and strategic recommendations Use when the user asks for…
SkillDFreshness: D★ 33Claude Code +9 - 0.497score
pm
JsonLee12138
Full-stack product manager covering strategy, discovery, execution, go-to-market, market research, data analytics, marketing growth, and PM toolkit Use when…
SkillDFreshness: D★ 33Claude Code +9 - 0.497score
pencil-designer
JsonLee12138
Senior Pencil UI/UX Designer specializing in design systems, responsive interfaces, and accessible applications with mandatory Pencil MCP integration Use when…
SkillDFreshness: D★ 33Claude Code +9
Cite this page
makefile skill. Agent Mart. https://agentmart.dev/skills/jsonlee12138-makefile (last updated 2026-10-24)