Install
$ agentstack add skill-olshansk-agent-skills-cmd-makefile ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ● Network access Used
- ● Filesystem access Used
- ● Shell / process execution Used
- ● Environment & secrets Used
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Makefile Helper
Create Makefiles that are simple, discoverable, and maintainable.
Core Principles
- Default to rich help - Use categorized help with emoji headers unless user requests minimal
- Default Chrome extensions to modular - Use the modular
makefiles/*.mklayout with shared colors/help for Chrome extension projects unless the repo is truly tiny - Ask about structure upfront - For new Makefiles, ask: "Flat or modular? Rich help or minimal?"
- Follow existing conventions - Match the project's style if Makefile already exists
- Don't over-engineer - Solve the immediate need, not hypothetical futures
- Use
uv run- Always run Python commands viauv runfor venv context - Explain decisions - If choosing flat/minimal, explain why before generating
When to Use This Skill
- Creating a new Makefile for a project
- Adding specific targets to an existing Makefile
- Improving/refactoring an existing Makefile
- Setting up CI/CD make targets
- Distributing pre-built binaries via GitHub Releases
Quick Start
For new projects, use the appropriate template:
| Project Type | Template | Complexity | Asks upfront | |-------------|----------|------------|------| | Any project | templates/base.mk | Minimal | — | | Python with uv | templates/python-uv.mk | Standard | — | | Python FastAPI | templates/python-fastapi.mk | Full-featured | test split? prod target? HEALTH_PATH? | | PostgreSQL + Alembic | templates/postgres.mk | Standard | PG_PORT (5433 default)? soft vs HARD reset? | | Node.js | templates/nodejs.mk | Standard | — | | Go | templates/go.mk | Standard | — | | Chrome Extension | templates/chrome-extension.mk | Modular | — | | Flutter App | templates/flutter.mk | Modular | — | | Electron App | templates/electron.mk | Modular | — | | Static Site (HTML/CSS/JS) | templates/static-site.mk | Standard | DEPLOY_MODE (rsync/gh-pages/netlify/vercel/none)? |
For templates in the "Asks upfront" column, run the Phase 2 interactive questions in §"Interaction Pattern" before scaffolding. Companion files:
templates/python-fastapi-env/.template.env→ project's.template.envtemplates/python-fastapi-scripts/export_openapi_spec.py→scripts/export_openapi_spec.pytemplates/postgres-env/.template.env→ merge into project's.template.env(don't ship two)
Chrome Extension Structure
The chrome extension template uses a modular structure:
Makefile # Main file with help + includes
makefiles/
colors.mk # ANSI colors & print helpers
common.mk # Shell flags, VERBOSE mode, guards
build.mk # Build zip, version bump, releases
dev.mk # Lint, clean, install
test.mk # Unit tests, E2E tests, coverage
env.mk # Environment setup, dependency checks
Copy from templates/chrome-extension-modules/ to your project's makefiles/ directory.
Key features:
- Use
makefiles/colors.mkfor ANSI color output and header helpers. - Use
makefiles/common.mkfor shell flags, guard rails, and shared variables. - Use
makefiles/env.mkfor environment checks and dependency sanity. - Use
makefiles/build.mkfor build/package/release targets. - Use
makefiles/dev.mkfor install, watch, clean, and other local workflows. - Use
makefiles/test.mkfor typecheck, unit, and E2E targets when present. build-release- Version bump menu (major/minor/patch) + zip for Chrome Web Storebuild-beta- (Optional) GitHub releases withghCLItest-unit/test-e2e- Vitest + Playwright testingtest-unit-/test-e2e-- Per-module test targetsVERBOSE=1 make- Show commands for debugging
Flutter App Structure
Makefile # Main file with help + includes
makefiles/
colors.mk # ANSI colors & print helpers
common.mk # Shell flags, VERBOSE mode, guards
dev.mk # Setup, run simulator/device, devices, clean
build.mk # iOS/Android builds (IPA, APK, AAB)
deploy.mk # TestFlight upload
lint.mk # Dart analyze & format
Copy from templates/flutter-modules/ to your project's makefiles/ directory.
Key features:
flutter-run-iosauto-boots simulator and waits for itflutter-run-androidauto-launches emulator and waits for itflutter-run-deviceauto-detects or usesFLUTTER_IOS_DEVICE/FLUTTER_ANDROID_DEVICEflutter-build-ipa+flutter-export-ipa+flutter-deploy-testflightfull iOS release workflowflutter-export-ipare-exports IPA from existing archive without rebuilding_check-asc-apppre-flight App Store Connect validation (with ASCAPIKEY/ASCAPIISSUER)flutter-lint FIX=trueDart formatting with FIX patternVERBOSE=1 makeshow commands for debugging
Electron App Structure
Makefile # Main file with help + includes
makefiles/
colors.mk # ANSI colors & print helpers
common.mk # Shell flags, VERBOSE mode, guards
dev.mk # Setup, dev server, debug, clean
build.mk # Pack-check, dist (mac/win/linux), publish
lint.mk # ESLint, Prettier, TypeScript, tests
Copy from templates/electron-modules/ to your project's makefiles/ directory.
Key features:
electron-devstarts dev mode with hot-reloadelectron-debuglaunches with DevTools openelectron-cleansingle target that removes artifacts, node_modules, and lock fileelectron-pack-checksmoke-tests that the app loads without errorselectron-dist-mac/electron-dist-win/electron-dist-linuxcross-platform buildselectron-dist-allbuilds for all platforms in one shotelectron-publishpublishes to GitHub Releases (requiresGH_TOKEN)electron-lint FIX=trueESLint + Prettier with auto-fix patternelectron-typecheckTypeScript type checkingVERBOSE=1 makeshow commands for debugging
Static Site (HTML/CSS/JS)
Plain static sites — landing pages, marketing pages, docs — with no bundler or SSR. Uses npx --yes for tooling so contributors don't need a local package.json or node_modules.
Copy templates/static-site.mk to your project root as Makefile.
Targets use site-* and dev-* prefixes (per §"Naming Conventions"). The template is deliberately slim — lint/link-check/image-optimization targets were cut because they're rarely run locally on a marketing page and collapse under the "too many granular dev-* quality targets" pitfall. Add them back only if a specific project needs them.
Key features:
site-serve- local HTTP server viapython3 -m http.server(falls back tonpx serve). Override withmake site-serve PORT=9000 HOST=0.0.0.0.site-open- open$(ENTRY)(defaultindex.html) in the default browser (macOSopen/ Linuxxdg-open).site-status- print site dir, entry, detected HTML pages, and tooling availability.dev-format- prettier--writeacross HTML/CSS/JS vianpx --yes. No global install required, noFIX=truegate — always writes (formatting check-only is CI's job, not a local ergonomic).dev-asset-report- top 20 largest files (finds accidentally-committed hero images, uncompressed GIFs).dev-build- copies site into$(BUILD_DIR)(defaultdist/) via rsync with sensible excludes, then optionally minifies HTML/CSS/JS viahtml-minifier-terser(silently skipped if unavailable).dev-deploy- depends ondev-build; dispatches onDEPLOY_MODE(rsync|gh-pages|netlify|vercel|none). Fails fast with install hint if the selected tool is missing.dev-clean- removes$(BUILD_DIR)/.
Config knobs (?= — override on command line): SITE_DIR, PORT, HOST, ENTRY, BUILD_DIR, DEPLOY_MODE, RSYNC_DEST.
PostgreSQL + Alembic
Standalone template for database operations. Use alongside python-fastapi.mk for a full stack, or independently for any Python project with PostgreSQL.
Copy templates/postgres.mk to your project root (or include it from your main Makefile).
Key features:
db-start/db-stop/db-cleanvia plaindocker run(default) with health-check wait loop. Docker Compose variant is commented at the bottom of the template for multi-service setups.db-initcomposite target (start + migrate).db-resethas two flavors viaHARDflag:HARD=false(default): kill connections → DROP DATABASE → CREATE → migrate. Fast, preserves container+volume.HARD=true:docker rm -fcontainer +docker volume rm -f+ re-init. Use when container/volume itself is in a broken state.db-migrate/db-revisionAlembic migrations viauv run alembic; all Alembic recipes inline-source.env(via_check-envguard) so a stale shellDATABASE_URLcan't override the configured value.db-migration-current/db-migration-history/db-migration-checkintrospection.db-shell(psql) /db-pgcli/db-pgwebshell access.db-pgclistrips the SQLAlchemy+psycopgdialect marker before handing the URL to pgcli (pgcli doesn't understand dialect markers).env-templatebootstrap target that copies.template.env→.envwithout overwriting.db-logs/db-seedutilities.- All config via
?=variables (PG_CONTAINER,PG_DB,PG_USER,PG_PASSWORD,PG_PORT=5433,PG_IMAGE). - Port 5433 by default to dodge host Homebrew Postgres on 5432. Override with
make db-start PG_PORT=5432if your machine is clean. - Driver: template targets
psycopg[binary]>=3(psycopg3). SQLAlchemy needs thepostgresql+psycopg://dialect marker; add a pydantic-settings validator that normalizespostgres:///postgresql://→postgresql+psycopg://so Render's managed DB URL works verbatim.
Interaction Pattern (Phased)
Run these phases top-to-bottom on any Makefile scaffolding / refactor request. Do Phase 2 (Interactive questions) BEFORE writing any file — the answers drive which template variants to emit.
Phase 1 — Discovery
- Is there already a Makefile? Read it first — match its conventions.
- What stack / language? (Python+uv, FastAPI+Postgres, Node, Go, …)
- What's the deployment target? (Render, Fly, Vercel, self-hosted, …) — affects
run-api-prod. - How big is the project today, and how big will it reasonably grow? (≥5 targets expected → modular.)
Phase 2 — Interactive questions (ask in ONE batch via AskUserQuestion)
Ask up front rather than iterating. Typical questions:
- Structure: flat single file or modular (
makefiles/*.mk)? - Help style: rich categorized help with emoji headers, or minimal?
- Postgres port (if Postgres used):
5433(default, dodges host Homebrew Postgres on 5432) or5432? - Test granularity: single
dev-test(small/medium projects) or splittest-unit/test-integration/test-e2e(larger projects)? - Prod runtime: need a
run-api-prodtarget against a remote DB (Render/Fly/etc.)? - OpenAPI spec export (FastAPI): always include
api-export-specunless user declines — enables client SDK generation and spec-diff in CI.
Skip questions whose answer is already implied by an existing Makefile or strong project signal.
Phase 3 — Scaffold
Emit (in this order):
Makefile+makefiles/*.mk(if modular)..template.envat repo root (committed)..envis NOT created — leave that tomake env-template. Add.envto.gitignoreif not already there..env.prod— ifrun-api-prodwas requested, confirm.env.prodis in.gitignore(it MUST be — production credentials).scripts/export_openapi_spec.py(if FastAPI + api-export-spec).
Phase 4 — Verify
make help— clean categorized output.make help-unclassified— should be empty or minimal.make -n run-api-local db-migrate api-export-spec— dry-run the critical paths.- Grep for any
_check-env/_check-postgresguards you added to confirm they fire when expected.
Naming Conventions
Use kebab-case with consistent prefix-based grouping:
# Good - consistent prefixes (hyphens, not underscores)
build-release, build-zip, build-clean # Build tasks
dev-run, dev-clean # Development tasks
db-start, db-stop, db-migrate # Database tasks
env-local, env-prod, env-show # Environment tasks
# Internal targets - prefix with underscore to hide from help
_build-zip-internal, _prompt-version # Not shown in make help
# Bad - inconsistent
run-dev, localEnv, test_net
build_release, dev_test # Underscores - don't use
Exception — universal unprefixed names. A handful of names are so de-facto standard across ecosystems (npm, cargo, go, make itself) that prefixing them with dev- adds noise without adding signal. Keep these unprefixed:
test(notdev-test)build(notdev-build) — only if the project has no competingbuild-*grouprun(notdev-run) — same caveatformat/lint— same caveat; if you havedev-formatalready, stay consistent within the project
Rule of thumb: if the unprefixed name would collide with a prefix group you already have (e.g., already have build-release, build-zip), keep the dev- prefix for consistency. Otherwise, drop it.
Name targets after the action, not the tool:
# Good - describes what it does
remove-bg # Removes background from image
format-code # Formats code
lint-check # Runs linting
# Bad - names the tool
rembg # What does this do?
prettier # Is this running prettier or configuring it?
eslint # Unclear
Key Patterns
Binary Distribution
For projects distributed as pre-built binaries via GitHub Releases:
GITHUB_REPO ?= owner/repo
OS := $(shell uname -s | tr '[:upper:]' '[:lower:]')
ARCH := $(shell uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')
.PHONY: install-cli
install-cli: ## Download and install CLI from latest GitHub release
@RELEASE=$$(curl -fsSL https://api.github.com/repos/$(GITHUB_REPO)/releases/latest | grep tag_name | cut -d'"' -f4); \
echo "Installing $$RELEASE for $(OS)/$(ARCH)..."; \
curl -fsSL -o ~/.local/bin/cli \
"https://github.com/$(GITHUB_REPO)/releases/download/$$RELEASE/cli-$(OS)-$(ARCH)"; \
chmod +x ~/.local/bin/cli
Key considerations:
- Detect OS and architecture automatically
- Download from GitHub Releases (no Python/uv required)
- Install to
~/.local/bin(user-writable, in PATH) - Preserve existing config files during updates
Always Use uv run for Python
# Good - uses uv run with ruff (modern tooling)
dev-check:
uv run ruff check src/ tests/
uv run ruff format --check src/ tests/
uv run mypy src/
dev-format:
uv run ruff check --fix src/ tests/
uv run ruff format src/ tests/
# Bad - relies on manual venv activation
dev-format:
ruff format .
Use uv sync (not pip install)
For Python projects, treat pyproject.toml and uv.lock as the source of truth. Do not add pip install or requirements.txt fallback guidance to uv-based templates.
env-install:
uv sync # Uses pyproject.toml + lock file
Categorized Help (for 5+ targets)
help:
@printf "$(BOLD)=== 🚀 API ===$(RESET)\n"
@printf "$(CYAN)%-25s$(RESET) %s\n" "api-run" "Start server"
@printf "%-25s $(GREEN)make api-run [--reload]$(RESET)\n" ""
Makefile ordering rule - help targets go LAST, just before catch-all:
- Configuration (
?=variables) HELP_PATTERNSdefinition- Imports (
include ./makefiles/*.mk) - Main targets (grouped by function)
help:andhelp-unclassified:targets- Catch-all
%:rule (absolute last)
Preflight Checks
_che
…
## Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- **Author:** [Olshansk](https://github.com/Olshansk)
- **Source:** [Olshansk/agent-skills](https://github.com/Olshansk/agent-skills)
- **License:** MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.