makefile
Skill1 starsChanged 8 months agoMITView on GitHub
GNU Make automation and build system guidance. Use when creating or maintaining Makefiles, writing Make targets and recipes, or configuring GNU Make build automation. Keywords: Makefile, GNU Make, targets, recipes, build automation.
- Reads credentials
- Deletes or force-pushes
4 other projects use a version of this.
Adopted by
Most recently taken up by
- nhat092005/skillstheir own version, first seen Oct 13, 2026
- andrewzeitlin/claude_skillstheir own version, first seen Oct 8, 2026
- Abdox-menara/guard-skillstheir own version, first seen Aug 24, 2026
- harness-studio/harness-studiotheir own version, first seen Jun 13, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- harness-studio/harness-studio★ 9same name
- nhat092005/skills★ 1same name
- Abdox-menara/guard-skills★ 0same name
- andrewzeitlin/claude_skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- architect-reviewSkill
- brainstormingSkill
- changelog-writerSkill
- dispatching-parallel-agentsSkill
- documentation-writerSkill
- executing-plansSkill
- fastapiSkill
- pgvector-semantic-searchSkill
- postgres-patternsSkill
- python-patternsSkill
- python-testingSkill
- requesting-code-reviewSkill
- ruffSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- task-doc-navigatorSkill
- test-driven-developmentSkill
- tySkill
- using-git-worktreesSkill
- using-superpowersSkill
- uvSkill
- verification-before-completionSkill
- writing-plansSkill
- writing-skillsSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 221
One line in, one line out: Avoid echo spam.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Makefile Skill
Guidance for creating and maintaining GNU Make build automation.
Quick Navigation
| Topic | Reference |
| Rules, prerequisites, targets | syntax.md |
| Variable types and assignment | variables.md |
| Built-in functions | functions.md |
| Special and phony targets | targets.md |
| Recipe execution, parallel | recipes.md |
| Implicit and pattern rules | implicit.md |
| Common practical patterns | patterns.md |
Core Concepts
Rule Structure
target: prerequisites
recipeCritical: Recipe lines MUST start with TAB character.
File vs Phony Targets
# File target - creates/updates a file
build/app.o: src/app.c
$(CC) -c $< -o $@
# Phony target - action, not a file
.PHONY: clean test install
clean:
rm -rf build/Variable Assignment
| Operator | Name | When Expanded |
:= | Simple | Once, at definition |
?= | Conditional | If not already set |
= | Recursive | Each use (late binding) |
+= | Append | Adds to existing value |
CC := gcc # Immediate
CFLAGS ?= -O2 # Default, overridable
DEBUG = $(VERBOSE) # Late binding
CFLAGS += -Wall # AppendAutomatic Variables
| Variable | Meaning |
$@ | Target |
$< | First prerequisite |
$^ | All prerequisites (unique) |
$? | Prerequisites newer than target |
$* | Stem in pattern rules |
Essential Patterns
Self-Documenting Help
.DEFAULT_GOAL := help
help: ## Show available targets
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf " %-15s %s\n", $$1, $$2}'
install: ## Install dependencies
uv sync
test: ## Run tests
uv run pytestPlatform Detection
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
OPEN := open
else ifeq ($(UNAME_S),Linux)
OPEN := xdg-open
endifBuild Directory
BUILDDIR := build
SOURCES := $(wildcard src/*.c)
OBJECTS := $(patsubst src/%.c,$(BUILDDIR)/%.o,$(SOURCES))
$(BUILDDIR)/%.o: src/%.c | $(BUILDDIR)
$(CC) -c $< -o $@
$(BUILDDIR):
mkdir -p $@Environment Export
export PYTHONPATH := $(PWD)/src
export DATABASE_URL
test:
pytest tests/ # sees exported variablesCommon Targets
Quality Checks
.PHONY: lint format check test
lint: ## Run linters
ruff check .
mypy src/
format: ## Format code
ruff format .
check: format lint test ## All quality checksCleanup
.PHONY: clean clean-all
clean: ## Remove build artifacts
rm -rf build/ dist/ *.egg-info
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
clean-all: clean ## Remove all generated files
rm -rf .venv .pytest_cache .mypy_cacheDocker Integration
IMAGE := myapp
VERSION := $(shell git describe --tags --always)
docker-build: ## Build Docker image
docker build -t $(IMAGE):$(VERSION) .
docker-run: ## Run container
docker run -d -p 8000:8000 $(IMAGE):$(VERSION)Recipe Execution
Each Line = Separate Shell
# Won't work - cd lost between lines
bad:
cd subdir
pwd # Still in original dir!
# Correct - combine commands
good:
cd subdir && pwd
# Or use line continuation
also-good:
cd subdir && \
pwd && \
makeSilent and Error Handling
target:
@echo "@ suppresses command echo"
-rm -f maybe.txt # - ignores errorsParallel Execution
make -j4 # 4 parallel jobs
make -j4 lint test # Run lint and test in parallelOutput Discipline
One line in, one line out. Avoid echo spam.
# ❌ Too chatty
start:
@echo "Starting services..."
docker compose up -d
@echo "Waiting..."
@sleep 3
@echo "Done!"
# ✅ Concise
start: ## Start services
@echo "Starting at http://localhost:8000 ..."
@docker compose up -d
@echo "Logs: docker compose logs -f"Conditionals
DEBUG ?= 0
ifeq ($(DEBUG),1)
CFLAGS += -g -O0
else
CFLAGS += -O2
endif
ifdef CI
TEST_FLAGS := --ci
endifIncluding Files
# Required include (error if missing)
include config.mk
# Optional include (silent if missing)
-include local.mk
-include .envCommon Pitfalls
| Pitfall | Problem | Solution |
| Spaces in recipes | Recipes need TAB | Use actual TAB character |
| Missing .PHONY | make test fails if test file exists | Declare .PHONY: test |
| cd in recipes | Each line is new shell | Use cd dir && command |
= vs := confusion | Unexpected late expansion | Use := by default |
| Unexported vars | Subprocesses don't see vars | export VAR |
| Complex shell in make | Hard to maintain | Move to external script |
Quick Reference
# Makefile Template
.DEFAULT_GOAL := help
SHELL := /bin/bash
.SHELLFLAGS := -ec
.PHONY: help install test lint format clean
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf " %-15s %s\n", $$1, $$2}'
install: ## Install dependencies
uv sync --extra dev
test: ## Run tests
uv run pytest tests/ -v
lint: ## Run linters
uv run ruff check .
format: ## Format code
uv run ruff format .
clean: ## Clean artifacts
rm -rf build/ dist/ .pytest_cacheLinks
See Also
- patterns.md - Extended patterns and recipes
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

