360 Secure SkillHub
360 安全技能中心

makefile-generation

核心功能为生成Python、Rust、TypeScript项目专属的标准Makefile,包含帮助、安装、测试、lint、构建等自动化目标。典型场景:新项目搭建无Makefile时、统一多项目构建流程、需更新Makefile目标时(已有适配的Makefile或用替代构建工具则不适用)。通过识别项目配置文件确定语言,输出可添加自定义目标的Makefile,可通过make help验证。

athola
athola
热度 62.74
最近更新 2026-08-26 21:07:41
分类:开发依赖:纯提示词应用场景:代码生成 / 自动化脚本 / 模板 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add nm-attune-makefile-generation
Metadata
name
makefile-generation
description
Generates Makefiles with testing, linting, formatting, and automation targets
version
1.9.8
triggers
["makefile","automation","build-tools","development-workflow","starting a project or standardizing build automation"]
metadata
{"openclaw":{"homepage":"https://github.com/athola/claude-night-market/tree/master/plugins/attune","emoji":"🦞"}}
source
claude-night-market
source_plugin
attune

Night Market Skill — ported from claude-night-market/attune. For the full experience with agents, hooks, and commands, install the Claude Code plugin.

Table of Contents

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

# 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-dogfood command - Makefile testing and validation