configure-makefile
Makefile with standard targets (help, test, build, clean, lint). Use when setting up a Makefile, auditing missing targets, or adding language-specific targets.
What this skill does
# /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
- Project root: !`pwd`
- Makefile exists: !`find . -maxdepth 1 -name 'Makefile'`
- Makefile targets: !`grep -E '^[a-zA-Z_-]+:' Makefile`
- Package files: !`find . -maxdepth 1 \( -name 'package.json' -o -name 'pyproject.toml' -o -name 'Cargo.toml' -o -name 'go.mod' \)`
- Docker files: !`find . -maxdepth 1 \( -name 'Dockerfile' -o -name 'docker-compose.yml' -o -name 'compose.yml' \)`
- Server files: !`find src -maxdepth 1 \( -name 'server.*' -o -name 'main.*' \)`
## Parameters
Parse from `$ARGUMENTS`:
- `--check-only`: Report Makefile compliance status without modifications
- `--fix`: Apply fixes automatically without prompting
**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):
- Has `docker-compose.yml` or `compose.yml` -> Docker Compose service
- Has `Dockerfile` + HTTP server code -> Container service
- Has `src/server.*` or `src/main.*` -> Application service
### 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:
- Project type (detected)
- Each target with PASS/FAIL status and the command used
- Makefile structural checks (default goal, PHONY, colors, help)
- Missing targets list
- Issue count
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):**
- `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` + remove cache dirs
**Node.js:**
- `lint`: `@npm run lint`
- `format`: `@npm run format`
- `test`: `@npm test`
- `build`: `@npm run build`
- `clean`: `@rm -rf node_modules/ dist/ .next/ .turbo/`
**Rust:**
- `lint`: `@cargo clippy -- -D warnings`
- `format`: `@cargo fmt`
- `test`: `@cargo nextest run`
- `build`: `@cargo build --release`
- `clean`: `@cargo clean`
**Go:**
- `lint`: `@golangci-lint run`
- `format`: `@gofmt -s -w .`
- `test`: `@go test ./...`
- `build`: `@go build -o bin/{{PROJECT_NAME}}`
- `clean`: `@rm -rf bin/ dist/` + `@go clean`
### Step 6: Update standards tracking
Update `.project-standards.yaml`:
```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](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
```bash
# 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
- `/configure:all` - Run all compliance checks
- `/configure:workflows` - GitHub Actions workflows
- `/configure:dockerfile` - Docker configuration
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.