makefile-generation
Generates Makefiles with testing, linting, formatting, and automation targets. Use when starting a project or standardizing build automation.
Works with
---
name: makefile-generation
description: Generates Makefiles with testing, linting, formatting, and automation targets. Use when starting a project or standardizing build automation.
license: MIT
---
## Table of Contents
- [When To Use](#when-to-use)
- [Standard Targets](#standard-targets)
- [Python Makefile](#python-makefile)
- [Rust Makefile](#rust-makefile)
- [TypeScript Makefile](#typescript-makefile)
- [Workflow](#workflow)
- [1. Detect Language](#1-detect-language)
- [2. Load Template](#2-load-template)
- [3. Collect Project Info](#3-collect-project-info)
- [4. Render Template](#4-render-template)
- [5. Verify](#5-verify)
- [Customization](#customization)
- [Related Skills](#related-skills)
# Makefile Generation Skill
Generate a Makefile with standard development targets for Python, Rust, or TypeScript projects.
## When To Use
- Need a Makefile for a project without one
- Want to update Makefile with new targets
- Standardizing build automation across projects
- Setting up development workflow commands
- Creating language-specific build targets
## When NOT To Use
- Makefile already exists and is current
- Project uses alternative build system exclusively (e.g., npm scripts only)
- Complex custom build process that doesn't fit standard patterns
- Use `/attune:upgrade-project` instead for updating existing Makefiles
## Standard Targets
### Python Makefile
**Common targets**:
- `help` - Show available targets
- `install` - Install dependencies with uv
- `lint` - Run ruff linting
- `format` - Format code with ruff
- `typecheck` - Run mypy type checking
- `test` - Run pytest
- `test-coverage` - Run tests with coverage report
- `check-all` - Run all quality checks
- `clean` - Remove generated files and caches
- `build` - Build distribution packages
- `publish` - Publish to PyPI
### Rust Makefile
**Common targets**:
- `help` - Show available targets
- `fmt` - Format with rustfmt
- `lint` - Run clippy
- `check` - Cargo check
- `test` - Run tests
- `build` - Build release binary
- `clean` - Clean build artifacts
### TypeScript Makefile
**Common targets**:
- `help` - Show available targets
- `install` - Install npm dependencies
- `lint` - Run ESLint
- `format` - Format with Prettier
- `typecheck` - Run tsc type checking
- `test` - Run Jest tests
- `build` - Build for production
- `dev` - Start development server
## Workflow
### 1. Detect Language
```bash
# Check for language indicators
if [ -f "pyproject.toml" ]; then
LANGUAGE="python"
elif [ -f "Cargo.toml" ]; then
LANGUAGE="rust"
elif [ -f "package.json" ]; then
LANGUAGE="typescript"
fi
```
**Verification:** Run the command with `--help` flag to verify availability.
### 2. Load Template
```python
from pathlib import Path
template_path = Path("plugins/attune/templates") / language / "Makefile.template"
```
**Verification:** Run the command with `--help` flag to verify availability.
### 3. Collect Project Info
```python
metadata = {
"PROJECT_NAME": "my-project",
"PROJECT_MODULE": "my_project",
"PYTHON_VERSION": "3.10",
}
```
**Verification:** Run the command with `--help` flag to verify availability.
### 4. Render Template
```python
from template_engine import TemplateEngine
engine = TemplateEngine(metadata)
engine.render_file(template_path, Path("Makefile"))
```
**Verification:** Run the command with `--help` flag to verify availability.
### 5. Verify
```bash
make help
```
**Verification:** Run `make --dry-run` to verify build configuration.
## Customization
Users can add custom targets after the generated ones:
```makefile
# ============================================================================
# CUSTOM TARGETS
# ============================================================================
deploy: build ## Deploy to production
./scripts/deploy.sh
```
**Verification:** Run the command with `--help` flag to verify availability.
## Related Skills
- `Skill(attune:project-init)` - Full project initialization
- `/abstract:make-dogfood` command - Makefile testing and validation
## Exit Criteria
- [ ] A `Makefile` is created at the project root containing at minimum a `help` target and
all standard targets for the detected language (Python: install/lint/format/typecheck/test;
Rust: fmt/lint/check/test/build; TypeScript: install/lint/format/typecheck/test/build).
- [ ] `make help` runs without error and lists all generated targets with descriptions.
- [ ] `make --dry-run <target>` exits 0 for each standard target, confirming recipe syntax
is valid.
- [ ] If no language is detected (no `pyproject.toml`, `Cargo.toml`, or `package.json`), the
skill reports the detection failure and stops rather than generating a blank Makefile.More Testing skills
tdd
mattpocock/skills
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
setup-pre-commit
mattpocock/skills
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
agent-browser
vercel-labs/agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.

