/vibe:ghcopilot-instr-makefilefrom vibe
Provides guidance on writing clean, maintainable, and portable GNU Make Makefiles. Covers naming conventions, file structure, variables, and rules.
Ships in vibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Instructions for writing clean, maintainable, and portable GNU Make Makefiles. These instructions are based on the GNU Make manual.
Makefile (recommended for visibility) or makefileGNUmakefile only for GNU Make-specific features incompatible with other make implementationsobjects, OBJECTS, objs, OBJS, obj, or OBJ for object file listsCC, CFLAGS, LDFLAGS)clean, install, test).PHONY to declare targets that don't represent files# Variables
CC = gcc
CFLAGS = -Wall -g
objects = main.o utils.o
# Default goal
all: program
# Rules
program: $(objects)
$(CC) -o program $(objects)
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
# Phony targets
.PHONY: clean all
clean:
rm -f program $(objects)
:= (simple expansion) for immediate evaluation, = for recursive expansion?= to set default values that can be overridden+= to append to existing variables$(VARIABLE) not $VARIABLE (unless single character)$@, $<, $^, $?, $*) in recipes to make rules more generic# Simple expansion (evaluates immediately)
CC := gcc
# Recursive expansion (evaluates when used)
CFLAGS = -Wall $(EXTRA_FLAGS)
# Conditional assignment
PREFIX ?= /usr/local
# Append to variable
CFLAGS += -g
.c to .o)|) for directories and dependencies that shouldn't trigger rebuilds$^, so reference them explicitly if neededThe example below shows a pattern rule that compiles objects into an obj/ directory. The directory itself is listed as an order-only prerequisite so it is created before compiling but does not force recompilation when its timestamp changes.
# Normal prerequisites
program: main.o utils.o
$(CC) -o $@ $^
# Order-only prerequisites (directory creation)
obj/%.o: %.c | obj
$(CC) $(CFLAGS) -c $< -o $@
obj:
mkdir -p obj
.RECIPEPREFIX is changed@ prefix to suppress command echoing when appropriate- prefix to ignore errors for specific commands (use sparingly)&& or ; on the same line when they must execute together# Silent command
clean:
@echo "Cleaning up..."
@rm -f $(objects)
# Ignore errors
.PHONY: clean-all
clean-all:
-rm -rf build/
-rm -rf dist/
# Multi-line recipe with proper continuation
install: program
install -d $(PREFIX)/bin && \
install -m 755 program $(PREFIX)/bin
.PHONY to avoid conflicts with files of the same nameclean, install, test, all.PHONY: all clean test install
all: program
clean:
rm -f program $(objects)
test: program
./run-tests.sh
install: program
install -m 755 program $(PREFIX)/bin
%.o: %.c) for generic transformations.c to .o)CC, CFLAGS) rather than rewriting the rules# Use built-in implicit rules by setting variables
CC = gcc
CFLAGS = -Wall -O2
# Custom pattern rule for special cases
%.pdf: %.md
pandoc $< -o $@
\) to split long lines for readabilityIf you need to split a line without adding whitespace, you can use a special technique: insert $ (dollar-space) followed by a backslash-newline. The $ refers to a variable with a single-space name, which doesn't exist and expands to nothing, effectively joining the lines without inserting a space.
# Concatenate strings without adding whitespace
# The following creates the value "oneword"
var := one$ \
word
# This is equivalent to:
# var := oneword
# Variable definition split across lines
sources = main.c \
utils.c \
parser.c \
handler.c
# Recipe with long command
build: $(objects)
$(CC) -o program $(objects) \
$(LDFLAGS) \
-lm -lpthread
include directive to share common definitions across makefiles-include (or sinclude) to include optional makefiles without errorsinclude directives after variable definitions that may affect included filesinclude for shared variables, pattern rules, or common targets# Include common settings
include config.mk
# Include optional local configuration
-include local.mk
ifeq, ifneq, ifdef, ifndef) for platform or configuration-specific rules# Platform-specific settings
ifeq ($(OS),Windows_NT)
EXE_EXT = .exe
else
EXE_EXT =
endif
program: main.o
$(CC) -o program$(EXE_EXT) main.o
-MMD and -MP to generate .d files with dependencies-include $(deps) to avoid errors if they don't existobjects = main.o utils.o
deps = $(objects:.o=.d)
# Include dependency files
-include $(deps)
# Compile with automatic dependency generation
%.o: %.c
$(CC) $(CFLAGS) -MMD -MP -c $< -o $@
$(error text) or $(warning text) functions for build-time diagnosticsmake -n (dry run) to see commands without executingmake -p to print the database of rules and variables for debugging# Check for required tools
ifeq ($(shell which gcc),)
$(error "gcc is not installed or not in PATH")
endif
# Validate required variables
ifndef VERSION
$(error VERSION is not defined)
endif
clean target to remove generated filesclean as phony to avoid conflicts with a file named "clean"- prefix with rm commands to ignore errors if files don't existclean (removes objects) and distclean (removes all generated files) targets.PHONY: clean distclean
clean:
-rm -f $(objects)
-rm -f $(deps)
distclean: clean
-rm -f program config.mk
make -B to force rebuild all targets:= for variables that don't need recursive expansion (faster)$(shell ...) which creates subprocessesmake -j) safely by ensuring targets don't conflict# Makefile for building the example application
#
# Usage:
# make - Build the program
# make clean - Remove generated files
# make install - Install to $(PREFIX)
#
# Variables:
# CC - C compiler (default: gcc)
# PREFIX - Installation prefix (default: /usr/local)
# Compiler and flags
CC ?= gcc
CFLAGS = -Wall -Wextra -O2
# Installation directory
PREFIX ?= /usr/local
.PHONY for non-file targets.PRECIOUS to preserve intermediate files.INTERMEDIATE to mark files as intermediate (automatically deleted).SECONDARY to prevent deletion of intermediate files.DELETE_ON_ERROR to remove targets if recipe fails.SILENT to suppress echoing for all recipes (use sparingly)# Don't delete intermediate files
.SECONDARY:
# Delete targets if recipe fails
.DELETE_ON_ERROR:
# Preserve specific files
.PRECIOUS: %.o
CC = gcc
CFLAGS = -Wall -O2
objects = main.o utils.o parser.o
.PHONY: all clean install
all: program
program: $(objects)
$(CC) -o $@ $^
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
-rm -f program $(objects)
install: program
install -d $(PREFIX)/bin
install -m 755 program $(PREFIX)/bin
programs = prog1 prog2 prog3
.PHONY: all clean
all: $(programs)
prog1: prog1.o common.o
$(CC) -o $@ $^
prog2: prog2.o common.o
$(CC) -o $@ $^
prog3: prog3.o
$(CC) -o $@ $^
clean:
-rm -f $(programs) *.o
$(shell ls ...) to get file lists (use $(wildcard ...) instead).PHONY$(MAKE) -C subdir) unless absolutely necessaryWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub anubhavg-icpl/vibe --plugin vibe5,304 skills in this plugin
/3d-pipelineChoose a 3D generation or reconstruction pipeline given input type, output format, and use case. Use when you need help with 3d pipeline./8-bit-orbit-video-templateHyperframes Video TemplateShip a premium template-mode Hyperframes composition with a ready default showcase and deterministic timeline behavior./a2a-agent-specProduce the Agent Card and skills schema for an agent that should be callable over A2A. Use when you need help with a2a agent spec.Other plugins' skills for the same job