Loading...
Loading...
Check and configure Makefile with standard targets for project standards
npx skill4agent add laurigates/claude-plugins configure-makefilehelptestbuildcleanstartstoplintMakefile| Target | Purpose |
|---|---|
| Display available targets (default goal) |
| Run test suite |
| Build project artifacts |
| Remove temporary files and build artifacts |
| Run linters |
| Target | When Required |
|---|---|
| If project has runnable service |
| If project has background service |
| If project uses auto-formatters |
| Check | Standard | Severity |
|---|---|---|
| File exists | Makefile present | FAIL if missing |
| Default goal | | WARN if missing |
| PHONY declarations | All targets marked | WARN if missing |
| Colored output | Color variables defined | INFO |
| Help target | Auto-generated from comments | WARN if missing |
| Language-specific | Commands match project type | FAIL if mismatched |
Makefile Compliance Report
==============================
Project Type: python (detected)
Makefile: Found
Target Status:
help ✅ PASS
test ✅ PASS (uv run pytest)
build ✅ PASS (docker build)
clean ✅ PASS
lint ✅ PASS (uv run ruff check)
format ✅ PASS (uv run ruff format)
start ❌ FAIL (missing)
stop ❌ FAIL (missing)
Makefile Checks:
Default goal ✅ PASS (.DEFAULT_GOAL := help)
PHONY declarations ✅ PASS
Colored output ✅ PASS
Help target ✅ PASS (auto-generated)
Missing Targets: start, stop
Issues: 2 found--fix.DEFAULT_GOAL.PHONY.project-standards.yamlcomponents:
makefile: "2025.1"# Makefile for {{PROJECT_NAME}}
# Provides common commands for development, testing, and building.
# Colors for console output
BLUE := \033[0;34m
GREEN := \033[0;32m
YELLOW := \033[1;33m
RED := \033[0;31m
NC := \033[0m # No Color
.DEFAULT_GOAL := help
.PHONY: help test build clean lint format start stop
##@ Help
help: ## Display this help message
@awk 'BEGIN {FS = ":.*##"; printf "\n$(BLUE)Usage:$(NC)\n make $(GREEN)<target>$(NC)\n"} \
/^[a-zA-Z_0-9-]+:.*?##/ { printf " $(BLUE)%-15s$(NC) %s\n", $$1, $$2 } \
/^##@/ { printf "\n$(YELLOW)%s$(NC)\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
@echo ""
##@ Development
lint: ## Run linters
@echo "$(BLUE)Running linters...$(NC)"
{{LINT_COMMAND}}
format: ## Format code
@echo "$(BLUE)Formatting code...$(NC)"
{{FORMAT_COMMAND}}
test: ## Run tests
@echo "$(BLUE)Running tests...$(NC)"
{{TEST_COMMAND}}
##@ Build & Deploy
build: ## Build project
@echo "$(BLUE)Building project...$(NC)"
{{BUILD_COMMAND}}
clean: ## Clean up temporary files and build artifacts
@echo "$(BLUE)Cleaning up...$(NC)"
{{CLEAN_COMMAND}}
start: ## Start service
@echo "$(BLUE)Starting service...$(NC)"
{{START_COMMAND}}
stop: ## Stop service
@echo "$(BLUE)Stopping service...$(NC)"
{{STOP_COMMAND}}lint:
@uv run ruff check .
format:
@uv run ruff format .
test:
@uv run pytest
build:
@docker build -t {{PROJECT_NAME}} .
clean:
@find . -type f -name "*.pyc" -delete
@find . -type d -name "__pycache__" -delete
@rm -rf .pytest_cache .ruff_cache dist/ build/lint:
@npm run lint
format:
@npm run format
test:
@npm test
build:
@npm run build
@docker build -t {{PROJECT_NAME}} .
clean:
@rm -rf node_modules/ dist/ .next/ .turbo/lint:
@cargo clippy -- -D warnings
format:
@cargo fmt
test:
@cargo nextest run
build:
@cargo build --release
@docker build -t {{PROJECT_NAME}} .
clean:
@cargo cleanlint:
@golangci-lint run
format:
@gofmt -s -w .
test:
@go test ./...
build:
@go build -o bin/{{PROJECT_NAME}}
@docker build -t {{PROJECT_NAME}} .
clean:
@rm -rf bin/ dist/
@go cleanpyproject.tomlrequirements.txtpackage.jsonCargo.tomlgo.moddocker-compose.ymlDockerfilesrc/server.*src/main.*| Flag | Description |
|---|---|
| Report status without offering fixes |
| Apply fixes automatically |
# Check current Makefile compliance
/configure:makefile --check-only
# Create/update Makefile for Python project
/configure:makefile --fix
# Check compliance and prompt for fixes
/configure:makefile/configure:all/configure:workflows/configure:dockerfile