Configure makefile

From laurigates/claude-plugins · View interactive version

Configure makefile is an AI agent skill from the GitHub repository laurigates/claude-plugins. Makefile with standard targets (help, test, build, clean, lint). Use when setting up a Makefile, auditing missing targets, or adding language-specific targets.

How to use this skill

Skill file

/configure:makefile

Check and configure project Makefile against project standards.

When to Use This Skill

| Use this skill when... | Use another approach when... |

|------------------------|------------------------------|

| Setting up a new Makefile for a project that requires Make | Project can use Just instead — use /configure:justfile (preferred) |

| Auditing existing Makefile for missing standard targets | Writing complex build rules with dependencies — consult GNU Make documentation |

| Ensuring Makefile follows team conventions (help target, PHONY, colors) | Project uses a language-native build system (cargo, go build) exclusively |

| Running CI/CD compliance checks on Makefile structure | Migrating from Makefile to Justfile — use /configure:justfile which handles migration |

| Adding language-specific build/test/lint targets to existing Makefile | Debugging a specific Make target — run make -n <target> directly |

Context

Parameters

Parse from $ARGUMENTS:

Required Makefile targets: help, test, build, clean, lint

Execution

Execute this Makefile compliance check:

Step 1: Detect project type

Read the context values and determine project type (in order):

  1. Python: pyproject.toml or requirements.txt present
  2. Node: package.json present
  3. Rust: Cargo.toml present
  4. Go: go.mod present
  5. Generic: None of the above

Check for service indicators (start/stop needed):

Step 2: Analyze existing Makefile targets

If Makefile exists, check against required targets:

Required targets for all projects:

| Target | Purpose |

|--------|---------|

| help | Display available targets (default goal) |

| test | Run test suite |

| build | Build project artifacts |

| clean | Remove temporary files and build artifacts |

| lint | Run linters |

Additional targets (context-dependent):

| Target | When Required |

|--------|---------------|

| start | If project has runnable service |

| stop | If project has background service |

| format | If project uses auto-formatters |

Step 3: Run compliance checks

| Check | Standard | Severity |

|-------|----------|----------|

| File exists | Makefile present | FAIL if missing |

| Default goal | .DEFAULT_GOAL := help | WARN if missing |

| PHONY declarations | All targets marked .PHONY | 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 |

Step 4: Generate compliance report

Print a report showing:

If --check-only is set, stop here.

Step 5: Create or update Makefile (if --fix or user confirms)

  1. Missing Makefile: Create from standard template using the detected project type
  2. Missing targets: Add targets with appropriate language-specific commands
  3. Missing defaults: Add .DEFAULT_GOAL, .PHONY, color variables
  4. Missing help: Add auto-generated help target using awk comment parsing

Use the language-specific commands below:

Python (uv-based):

Node.js:

Rust:

Go:

Step 6: Update standards tracking

Update .project-standards.yaml:

components:
  makefile: "2025.1"

Step 7: Print final report

Print a summary of changes applied, targets added, and suggest running make help to verify.

For the universal Makefile template structure, see REFERENCE.md.

Agentic Optimizations

| Context | Command |

|---------|---------|

| Quick compliance check | /configure:makefile --check-only |

| Auto-fix all issues | /configure:makefile --fix |

| List existing targets | grep -E '^[a-zA-Z_-]+:' Makefile |

| Dry-run a target | make -n <target> |

| Show default goal | make -p \| grep '.DEFAULT_GOAL' |

Flags

| Flag | Description |

|------|-------------|

| --check-only | Report status without offering fixes |

| --fix | Apply fixes automatically |

Examples

# 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

See Also

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.