Skip to main content
prompt GP ChatGPT

Makefile taste — ChatGPT prompt for Makefiles

The Makefile taste ChatGPT prompt sets conventions for project Makefiles. It guides target structure, recipes, and dependencies so make can act as the project’s front door.

CC0-1.0 ★ 178,201 updated 2026-10-24

Open on GitHub

What Makefile taste does

The prompt treats a Makefile as a thin task runner: targets call scripts and tools instead of carrying long shell logic. It recommends a default help target generated from nearby ## comments, with non-file targets declared in .PHONY.

It calls for Bash error handling and checks for undefined variables. Generated files should have real targets and prerequisites, while output directories can use order-only prerequisites. Running make without arguments should print help, not deploy, migrate, or delete anything.

Other guidance covers sharing make lint test between local work and CI, separating clean from distclean, and splitting large files into included Makefiles under mk/. Recipes use tabs. Projects should account for GNU make versions on macOS and Linux, or require GNU make 4+.

What it helps with

  • structure Makefile targets as concise tasks
  • show help when make runs without arguments
  • make recipe failures visible
  • use the same checks locally and in CI
  • separate build cleanup from removal of local data

Example prompts for the agent

  • Set conventions for this project's Makefile so make prints help without running destructive tasks.
  • Restructure the Makefile: move long shell logic into scripts and add lint and test targets.
  • Suggest Makefile rules for generated files and the build/ directory.

How to install Makefile taste

How to use

Paste the text at the start of a chat or into project instructions

Questions about Makefile taste

How do I install Makefile taste in Claude Code?

Add the command file at .claude/commands/prompts.csv.md.

What does Makefile taste do?

It gives Makefile conventions for targets, recipes, dependencies, cleanup, and CI checks.

What should plain make do according to Makefile taste?

It should print help. It should not deploy, run migrations, or delete files.

Source text

prompts.csv · CC0-1.0
# Makefile taste of a developer who uses make as the project's front door
- Treat the Makefile as a thin task runner that calls real scripts and tools, not as a place to hide hundreds of lines of shell logic. Confidence: 0.90
- Put a `help` target first and make it the default goal, generated from `## description` comments next to each target. Confidence: 0.85
- Declare every non-file target in `.PHONY` so a stray file named `test` or `build` never silently skips a task. Confidence: 0.95
- Set `SHELL := bash` and `.SHELLFLAGS := -eu -o pipefail -c` so recipes fail on errors, unset variables and broken pipes. Confidence: 0.85
- Add `.DELETE_ON_ERROR:` so a failed recipe never leaves a half-written target that looks up to date. Confidence: 0.80
- Use `MAKEFLAGS += --warn-undefined-variables --no-builtin-rules` to catch typos and drop surprising implicit rules. Confidence: 0.75
- Keep target names short, lowercase and verb-like: `setup`, `build`, `test`, `lint`, `fmt`, `run`, `clean`. Confidence: 0.85
- Make `make setup` the single command a new contributor needs to go from fresh clone to working environment. Confidence: 0.90
- Use `?=` for user-overridable variables like `PORT`, `ENV` or `IMAGE_TAG`, so `make run PORT=4000` just works. Confidence: 0.85
- Prefer `:=` over `=` for internal variables to avoid repeated, surprising lazy evaluation of shell commands. Confidence: 0.80
- Use real file targets and prerequisites for generated artifacts so make only rebuilds what actually changed. Confidence: 0.85
- Use order-only prerequisites (`| build/`) for output directories so touching a directory does not trigger rebuilds. Confidence: 0.70
- Prefix only genuinely noisy commands with `@`; keep the important commands visible so CI logs show what ran. Confidence: 0.75
- Never use `-` to ignore errors unless the reason is documented in a comment on the same line. Confidence: 0.85
- Run the same `make lint test` targets in CI that developers run locally, instead of duplicating steps in workflow YAML. Confidence: 0.90
- Split very large Makefiles into `include`d files under `mk/` grouped by concern, such as docker, db and release. Confidence: 0.65
- Use tabs for recipe lines and set `.editorconfig` accordingly so editors never turn them into spaces. Confidence: 0.90
- Keep recipes portable across GNU make versions found on macOS and Linux, or document that GNU make 4+ is required. Confidence: 0.70
- Make `clean` remove only generated files and keep a separate `distclean` for caches, dependencies and local databases. Confidence: 0.75
- Check required tools at the top with a small `require` macro that prints a clear install hint when something is missing. Confidence: 0.70
- Avoid recursive `$(MAKE) -C` across many subdirectories when one non-recursive Makefile can express the whole graph. Confidence: 0.65
- Keep `make` with no arguments safe: it should print help, never deploy, migrate or delete anything. Confidence: 0.95

© f · CC0-1.0 · f/prompts.chat

Similar prompts

All prompts for Data and databases →

From the same set218

The whole set →
MongoDB taste MongoDB taste is a ChatGPT prompt for MongoDB document design around query patterns, indexes, and schema checks. Claude Code loads it from a command file. GP ChatGPT ★ 178,201repo stars API Key and Credential Rotation Runbook (JSON) The API Key and Credential Rotation Runbook (JSON) is a prompt for ChatGPT, Claude.ai, and Claude Code that builds a secure secret rotation plan. It outputs a structured JSON object with steps. GP ChatGPT ★ 178,201repo stars Storybook taste The Storybook taste prompt for ChatGPT sets conventions for writing component stories in Storybook. It covers story structure, component states, interaction checks and sharing changes for review. GP ChatGPT ★ 178,201repo stars RAG Pipeline taste RAG Pipeline taste — a prompt for ChatGPT defines engineering standards for building retrieval systems and evaluating generation accuracy. GP ChatGPT ★ 178,201repo stars API Deprecation and Sunset Plan Builder (YAML) API Deprecation and Sunset Plan Builder (YAML) is a prompt that turns API deprecation details into a structured YAML sunset plan with timelines, communication strategies, and migration steps. GP ChatGPT ★ 178,201repo stars Nginx Config taste The Nginx Config taste ChatGPT prompt sets conventions for Nginx configuration and operations. Use it while configuring virtual hosts, HTTPS, or proxy routes. GP ChatGPT ★ 178,201repo stars Electron App taste Electron App taste is a prompt for ChatGPT, Claude.ai, and Claude Code that sets security standards for desktop apps during architecture design and Electron coding. GP ChatGPT ★ 178,201repo stars Pytest taste Pytest taste is a ChatGPT prompt that sets conventions for Python tests written with pytest. It guides test structure, fixtures, assertions, and suite configuration. GP ChatGPT ★ 178,201repo stars

Project sponsors

Companies that keep this analytics open