skills/makefile/SKILL.md
Use when editing Makefile or GNUmakefile, adding development targets, wiring uv commands, defining .PHONY rules, creating self-documenting help, or fixing Make recipe safety.
npx skillsauth add cofin/flow 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.
All projects should use a consistent Makefile structure to ensure developer familiarity. The standard includes:
.ONESHELL, .EXPORT_ALL_VARIABLES, strict shell flags.BLUE, GREEN, RED, YELLOW) and icons (ℹ, ✓, ⚠, ✖).help target parsing ## comments.install, upgrade, clean, test, lint.Copy this template to the root of new projects:
<example>SHELL := /bin/bash
# =============================================================================
# Variables
# =============================================================================
.DEFAULT_GOAL:=help
.ONESHELL:
.EXPORT_ALL_VARIABLES:
MAKEFLAGS += --no-print-directory
# Silence output if VERBOSE is not set
ifndef VERBOSE
.SILENT:
endif
# Define colors and formatting
BLUE := $(shell printf "\033[1;34m")
GREEN := $(shell printf "\033[1;32m")
RED := $(shell printf "\033[1;31m")
YELLOW := $(shell printf "\033[1;33m")
NC := $(shell printf "\033[0m")
INFO := $(shell printf "$(BLUE)ℹ$(NC)")
OK := $(shell printf "$(GREEN)✓$(NC)")
WARN := $(shell printf "$(YELLOW)⚠$(NC)")
ERROR := $(shell printf "$(RED)✖$(NC)")
.PHONY: help
help: ## Display this help text for Makefile
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z0-9_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
# =============================================================================
# Developer Utils
# =============================================================================
.PHONY: install
install: ## Install dependencies for local development
@echo "${INFO} Installing dependencies..."
@uv sync
@echo "${OK} Installation complete"
.PHONY: upgrade
upgrade: ## Upgrade all dependencies
@echo "${INFO} Updating dependencies... 🔄"
@uv lock --upgrade
@uv run pre-commit autoupdate
@echo "${OK} Dependencies updated 🔄"
.PHONY: clean
clean: ## Cleanup temporary build artifacts
@echo "${INFO} Cleaning working directory..."
@rm -rf .pytest_cache .ruff_cache build/ dist/ .coverage coverage.xml htmlcov/
@find . -name '*.egg-info' -exec rm -rf {} +
@find . -name '__pycache__' -exec rm -rf {} +
@echo "${OK} Working directory cleaned"
.PHONY: destroy
destroy: ## Destroy local environment
@echo "${INFO} Destroying environment... 🗑️"
@rm -rf .venv
@echo "${OK} Environment destroyed"
# =============================================================================
# Quality & Testing
# =============================================================================
.PHONY: lint
lint: ## Run all linting checks
@echo "${INFO} Running linting... 🔍"
@uv run pre-commit run --all-files
@echo "${OK} Linting passed ✨"
.PHONY: test
test: ## Run tests
@echo "${INFO} Running tests... 🧪"
@uv run pytest
@echo "${OK} Tests passed ✨"
</example>
Emojis: Use emojis consistent with the tool being used:
Output: Always use the ${INFO}, ${OK}, ${WARN}, ${ERROR} variables to prefix status messages.
Silence: Use .SILENT: (conditioned on VERBOSE) to keep the output clean for the user, revealing commands only when debugging.
Add guardrails instructions here. </guardrails>
<validation> ## ValidationAdd validation instructions here. </validation>
testing
Use when syncing Beads state to markdown, checking Flow status, refreshing context docs, validating task markers, or reporting ready/blocked Flow work.
testing
Use when initializing Flow in a repo, configuring .agents, installing or checking Beads bd, setting local-only sync policy, or creating first project context files.
data-ai
Use when drafting PRDs, researching, planning, refining, revising, or creating .agents/specs/<flow_id>/spec.md worksheets for Flow.
testing
Use when implementing Flow tasks from Beads or spec.md, claiming ready work, applying TDD, recording task notes, committing, and syncing after task state changes.