makefile-generation
Generates Makefiles with testing, linting, formatting, and automation targets. Use when starting a project or standardizing build automation.
它会碰到什么
这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。
技能内容
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-projectinstead for updating existing Makefiles
Standard Targets
Python Makefile
Common targets:
help- Show available targetsinstall- Install dependencies with uvlint- Run ruff lintingformat- Format code with rufftypecheck- Run mypy type checkingtest- Run pytesttest-coverage- Run tests with coverage reportcheck-all- Run all quality checksclean- Remove generated files and cachesbuild- Build distribution packagespublish- Publish to PyPI
Rust Makefile
Common targets:
help- Show available targetsfmt- Format with rustfmtlint- Run clippycheck- Cargo checktest- Run testsbuild- Build release binaryclean- Clean build artifacts
TypeScript Makefile
Common targets:
help- Show available targetsinstall- Install npm dependencieslint- Run ESLintformat- Format with Prettiertypecheck- Run tsc type checkingtest- Run Jest testsbuild- Build for productiondev- Start development server
Workflow
1. Detect Language
# 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
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
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
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
make help
Verification: Run make --dry-run to verify build configuration.
Customization
Users can add custom targets after the generated ones:
# ============================================================================
# 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-dogfoodcommand - Makefile testing and validation
Exit Criteria
- [ ] A
Makefileis created at the project root containing at minimum ahelptarget 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 helpruns 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, orpackage.json), the
skill reports the detection failure and stops rather than generating a blank Makefile.
想直接用这个技能?
本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。
它属于哪个仓库
plugins/attune/skills/makefile-generation/SKILL.md同一个仓库里的其他技能
- claude-code-plugin-reference
- night-market-architecture-contract
- night-market-build-and-env
- night-market-change-control
- night-market-collective-memory
- night-market-completion-integrity-campaign
- night-market-config-catalog
- night-market-debugging-playbook
- night-market-diagnostics-toolkit
- night-market-docs-and-writing
- night-market-failure-archaeology
- night-market-model-and-harness-updates