andrewbrown-usda/aigb-skills-usda/makefile-development-workflow

Claude Code and agent skill by andrewbrown-usda/aigb-skills-usda

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Standardizes Makefile-based build and test workflows with reproducible targets. Use when creating or refining helpful build, test, and clean targets.

Install

npx vskill@latest install andrewbrown-usda/aigb-skills-usda/makefile-development-workflow

SKILL.md

The same SKILL.md was published earlier as andrewbrown-usda/aigb-skills-usda/makefile-development-workflow.

Makefile Development Workflow

A minimal, well-structured Makefile for any project:

makefile
.PHONY: help build test clean
.DEFAULT_GOAL := help
help: ## Show this help message
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
build: ## Build the project
@echo "Building..."
# Add your build command here
test: ## Run tests
@echo "Running tests..."
# Add your test command here
clean: ## Clean build artifacts
@echo "Cleaning..."
rm -rf build/ dist/ __pycache__/

Run make help to see all available commands.


Best Practices

1. Always Use .PHONY
makefile
.PHONY: help build test clean install

Prevents conflicts with files of the same name and ensures targets always run.

2. Use .DEFAULT_GOAL
makefile
.DEFAULT_GOAL := help

Makes make show help by default instead of the first target.

3. Document Targets with ## Comments
makefile
build: ## Build the project (required)
@echo "Building..."
test: ## Run tests (required)
@echo "Testing..."

The ## comment after the target is picked up by auto-generated help.

4. Use ?= for Overridable Variables
makefile
PYTHON ?= python3 # Can be overridden: make PYTHON=python3.11 test
VENV ?= .venv # Can be overridden: make VENV=myenv test
5. Use SHELL := /bin/bash
makefile
SHELL := /bin/bash

Ensures bash features (like command -v) work consistently.

6. Use @ to Suppress Command Echo
makefile
build:
@echo "Building..." # @ suppresses "echo Building..."
@cd server && go build -o bin/server ./cmd/server
7. Use $$ for Shell Variables in Make
makefile
check-env:
@if [ -z "$$API_KEY" ]; then echo "WARNING: API_KEY not set"; fi

$$ becomes $ in the shell.

8. Use || true to Prevent Failures
makefile
clean:
@pkill -f "uvicorn" || true # Don't fail if process isn't running
@rm -rf build/ || true # Don't fail if directory doesn't exist
9. Use Multi-Line Commands with \
makefile
test:
@if [ "$(VERBOSE)" = "1" ]; then \
pytest tests/ -v -s; \
else \
pytest tests/; \
fi
10. Use && for Chained Commands
makefile
install:
pip install -e ".[dev]" && echo "[OK] Installed"

Quick Command Cheat Sheet

CommandPurpose
make helpShow all available commands
make buildBuild the project
make testRun tests
make cleanClean build artifacts
make installInstall dependencies
make lintRun linter
make formatFormat code
make devStart development mode
make allRun full pipeline
make docker-upStart Docker services
make docker-downStop Docker services
make -j4Run with 4 parallel jobs
make VAR=value targetOverride variable for target

Language-Specific Templates & Patterns

For detailed language-specific Makefiles, patterns, and advanced configurations, see references/anatomy.md.

Quick links:

  • Python projects: templates, pytest setup, venv targets
  • Go projects: build, testing, hot reload patterns
  • Node.js / TypeScript: npm integration, test runners
  • R packages: devtools targets, documentation
  • Docker integration: compose management, build patterns
  • Multi-phase pipelines: setup -> build -> test -> report
  • Conditional tool detection: graceful fallbacks
  • Variable overrides, pattern rules, parallel execution

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/andrewbrown-usda/aigb-skills-usda/makefile-development-workflow/badge)](https://verified-skill.com/skills/andrewbrown-usda/aigb-skills-usda/makefile-development-workflow)

Something wrong with this skill or its page? Tell us.