一键导入
makefile
Use when creating or updating a Makefile for a project. Ensures standard targets exist and asks before modifying any existing target's implementation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when creating or updating a Makefile for a project. Ensures standard targets exist and asks before modifying any existing target's implementation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Check that requirements, designs, and implementation plans are aligned — finds coverage gaps, scope creep, and design mismatches, then rewrites tasks in TDD red/green/refactor format
Check that requirements, designs, and implementation plans are aligned — finds coverage gaps, scope creep, and design mismatches, then rewrites tasks in TDD red/green/refactor format
Push back on specs, PRDs, requirements, and design documents — finds unrelated features, oversized scope, contradictions, feasibility issues, scope imbalance, omissions, ambiguity, and security concerns, with source control reality checks
Safe vibe coding with TDD guardrails — for small fixes and quick changes where you want speed but not recklessness. Enforces red/green/refactor, checks for architecture issues, reusable components, and test infrastructure before diving in.
Guided fixing of architectural flaws from an agentic-architecture report — validates findings, writes tests, applies fixes with developer approval, and tracks status in the report
Guided fixing of architectural flaws from an agentic-architecture report — validates findings, writes tests, applies fixes with developer approval, and tracks status in the report
| name | makefile |
| description | Use when creating or updating a Makefile for a project. Ensures standard targets exist and asks before modifying any existing target's implementation. |
Creates or updates a project Makefile with standard targets. Never modifies an existing target without explicit user approval.
digraph makefile_flow {
"Detect stack" -> "Makefile exists?";
"Makefile exists?" -> "Create from scratch" [label="no"];
"Makefile exists?" -> "Identify missing targets" [label="yes"];
"Create from scratch" -> "Include all required targets";
"Include all required targets" -> "Done";
"Identify missing targets" -> "Add new targets";
"Add new targets" -> "Existing target needs change?";
"Existing target needs change?" -> "Done" [label="no"];
"Existing target needs change?" -> "STOP: ask user for approval" [label="yes"];
"STOP: ask user for approval" -> "Approved?" [shape=diamond];
"Approved?" -> "Apply change" [label="yes"];
"Approved?" -> "Skip change" [label="no"];
"Apply change" -> "Done";
"Skip change" -> "Done";
}
Read project files in this order to understand the technology and available commands:
CLAUDE.md or AGENTS.md — often lists exact commands for test, lint, format, buildREADME.md — frequently documents dev workflowpackage.json, pyproject.toml, Cargo.toml, go.mod, Gemfile, etc.) — reveals available scripts/tasksUse the commands the project already documents. Do not invent commands that aren't confirmed to exist.
Every Makefile must include at minimum:
| Target | Purpose |
|---|---|
help | List all targets with descriptions |
all | Full CI pass (lint + format + test at minimum) |
test | Run test suite |
cover | One-shot coverage report |
lint | Lint (with autofix if available) |
format | Format code |
Add extra targets (e.g. build, dev, preview) only if the project supports them.
Every target gets a ## description. help extracts them with grep + awk:
.PHONY: all test cover lint format help
all: lint format test ## Lint, format, and test
test: ## Run full test suite
<stack-specific command>
cover: ## Generate code coverage report (one-shot)
<stack-specific command, forced one-shot — see below>
lint: ## Lint with autofix
<stack-specific command>
format: ## Format code
<stack-specific command>
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " %-10s %s\n", $$1, $$2}'
All targets must appear in .PHONY.
If an existing target's implementation would change, stop and tell the user:
"The existing
covertarget runsX. I'd change it toYbecause [reason]. Should I make this change?"
Wait for explicit approval. Adding a brand-new target never requires approval.
Coverage tools often default to watch mode. Force one-shot execution:
-- --run-- --watchAll=falsemake test output should be actionable, not overwhelming. Avoid both extremes:
Goal: On success, show a concise summary (total passed/failed/skipped). On failure, show the failing test name, assertion, and enough context to act on it.
Common approaches by stack:
| Stack | Flag / Approach |
|---|---|
| vitest | --reporter=default is usually fine; avoid --reporter=verbose |
| jest | Default is good; avoid --verbose |
| pytest | -q or --tb=short — default is often too verbose |
| cargo test | Default is fine; --quiet if too noisy |
| go test | Default is fine; avoid -v unless debugging |
| prove (Perl) | Default is fine; avoid --verbose |
If the testing tool doesn't support balanced output (e.g., only offers silent vs. firehose), inform the user and ask how they'd like to handle it rather than guessing.