SuperAPI AI Directory

make

Coding & development

View repository

Updated 10-15 21:40

About this skill

GNU Make / Makefile reference

A reference Skill that covers the specification, design, implementation, operation, and verification of GNU Make / Makefile. The source standard is the GNU Make Manual 4.4.1 (Edition 0.77, 2023-02-26). Local verification is performed with GNU Make 3.81 (macOS), and features exclusive to 3.82+ / 4.x (.RECIPEPREFIX、.ONESHELL、.WAIT etc.) must have the minimum version explicitly stated on the relevant page or sample. Note that this is a different subject from Make automation SaaS, CMake, and cargo-make.

Directory structure

skills/make/
  SKILL.md
  references/
    architecture/
      README.md
      responsibility-boundaries.md
      command-contracts.md
      selection-and-migration.md
    fundamentals/
      README.md
      rules-and-prerequisites.md
      variables-and-expansion.md
      patterns-includes-and-functions.md
      recipes-and-shell.md
    execution/
      README.md
      special-targets-and-defaults.md
      parallel-and-recursive-make.md
      diagnostics-and-exit-codes.md
      gnu-posix-bsd-compatibility.md
    rust/
      README.md
      crate-and-workspace-profiles.md
      xtask-and-validation.md
    node/
      README.md
      package-scripts-and-mixed-repos.md
    quality/
      README.md
      ci-hooks-and-cache.md
    operations/
      README.md
      safety-and-portability.md
      parallelism-and-recovery.md
    maintenance/
      README.md
      sources-and-compatibility.md
      troubleshooting.md
  samples/
    README.md
    incremental-build.md
    rust-crate.md
    rust-workspace-xtask.md
    node-pnpm.md
    mixed.md
    ci.md
    plans.md
    projects/                        # 動く例の正本
      incremental-build/             # Make がファイル依存関係を直接管理する例
      rust-crate/                    # 薄い Makefile + Bash help/doctor/check/verify(Node 不要)
      rust-workspace-xtask/          # Makefile なし。cargo xtask が正本
      node-pnpm/                     # pnpm workspace + Turborepo 委譲
      mixed/                         # Rust + Node の受け渡しのみ Make が仲介
    ci/                              # 非アクティブな CI テンプレート(.example)
    plans/                           # 承認前の適用計画サンプル(JSON)
  scripts/
    README.md
    make-commands.md
    inspect.md
    plan-and-preview.md
    verify.md
    bin/                             # Claude が明示的に実行する補助 CLI(Node.js 標準ライブラリのみ)
      inspect-repo.mjs
      validate-plan.mjs
      preview-sample.mjs
      verify-layout.mjs
      run-checks.mjs
      lib/
  tests/
    README.md
    helpers.mjs
    fixtures/
    eval-cases.json
    *.test.mjs

Distinction between official specifications and original design

references/ Each page of explicitly describes the following three types separately.

  • Source-backed behavior — Specifications based on primary sources such as the GNU Make Manual 4.4.1. With source URL, target version, and confirmation date (the list is references/maintenance/sources-and-compatibility.md)
  • Design guidance — The structure and judgment criteria proposed by this Skill. With adoption conditions, rationale, and trade-offs
  • Example contract — samples/ Command names, JSON formats, exit codes, and directory structures defined only within

help / doctor / setup / check / fix / verify / clean The commonization of the public command and the design principle "even with multiple entry points, the definition of the actual processing is one" are Design guidance unique to this Skill, and are not required by the official specifications of GNU Make, Cargo, or Anthropic.

Exploration procedure

  1. When only reference is needed (consult, the default usage), look for the category corresponding to the task in the mapping table below, and in that category's README.md identify the target page and Read it. Do not execute external programs
  2. If diagnosis, planning, or verification of an existing structure is needed, check which stage other than consult in the "Usage Patterns" table, and follow the procedure in the corresponding scripts/*.md follow the procedure for
  3. Safety constraints must always be checked in references/operations/safety-and-portability.md check with

Task → Category mapping

Task Category Reference README
Want to know the separation of responsibilities between Make and Cargo/xtask/Turborepo/CI, command contracts, and criteria for deciding whether to adopt or migrate to Make architecture references/architecture/README.md
target / prerequisite / recipe, order-only prerequisite, variable expansion (= := ?= +=), automatic variables, distinction between Make and shell $ investigate the distinction of fundamentals references/fundamentals/README.md
Investigate pattern rules, include, conditionals, recipes and shell (tab / .RECIPEPREFIX / .ONESHELL) investigate fundamentals references/fundamentals/README.md
.PHONY・.DEFAULT_GOAL special targets such as ,-j parallel/recursive make,-n/-q diagnostics, GNU/POSIX/BSD compatibility execution references/execution/README.md
Investigate profiles for a single crate / workspace / virtual workspace, proper use of fmt/clippy/test/doc, and whether to adopt cargo xtask rust references/rust/README.md
Investigate pnpm workspace, package.json scripts, delegation to Turborepo, and the responsibility boundary in mixed Rust+Node setups node references/node/README.md
Investigate the common command contract for Git hooks and CI, the difference between pipeline definitions and merge protection, and the boundary of caches and external state quality references/quality/README.md
investigate the safety boundaries of consult/audit/plan/apply/verify, re-runnable setup, parallel worktree isolation, and the scope of clean operations references/operations/README.md
investigate the source ledger, common GNU Make failure patterns, and diagnostic procedures maintenance references/maintenance/README.md
want to see working samples (incremental builds, Rust crate/workspace, Node, mixed, CI templates, application plans) samples samples/README.md
want to know how to run the investigation, plan verification, preview, and verification scripts that Claude uses scripts scripts/README.md
want to know about regression tests, exit code contracts, and eval-cases for the auxiliary scripts tests tests/README.md

Usage patterns

Merely referencing does not modify target files, nor does it automatically execute external programs. Loading the Skill itself is not approval to apply it.

Pattern Content script to use
consult Reference during design/review (default) None. Read only the documents in references / samples / scripts
audit Static diagnosis of the target specified by the user. Do not rewrite, install dependencies, or build inspect-repo.mjs(--root required)
plan Present the application plan, change targets, and verification plan. Do not modify target files validate-plan.mjs、preview-sample.mjs(does not write by default)
apply Apply only the scope separately approved by the user. Editing existing files is done with ordinary editing tools, not with the Skill's own patch application engine Sample installation only preview-sample.mjs --apply --plan <計画> --approve <planDigest>(write only the specified files, and only when they match the approved plan file)
verify Approved verification. Separate static consistency checking from actual command execution verify-layout.mjs、run-checks.mjs(dry-run by default.--execute only when the user-confirmed plan's --approve <planDigest> and each check's approved:true are both present)

Minimum safety rules

  • In suspicious repositories, do not use make -n / make -q as a substitute for safe static analysis (code execution on configuration load is possible)
  • .env Do not display, log, or mix into JSON the values of secrets such as
  • Do not perform automatic tool installation, sudo, or bypassing hooks / CI
  • Environment shortage, not executed, not applicable (BLOCKED / SKIPPED / NOT_APPLICABLE)を PASS do not round to

For details, see references/operations/safety-and-portability.md .

Paths of auxiliary scripts

scripts/bin/*.mjs are resolved as relative paths from the Skill installation location. Because the absolute path of the Skill itself changes depending on the installation form (upstream skills/make/、.agents/skills/make/、.claude/skills/make/ entity, symlink, global installation), at runtime replace <skill-dir> with the actual Skill installation location at that time.

node <skill-dir>/scripts/bin/inspect-repo.mjs --root /path/to/target-repo --json

Always specify the target root with --root .${CLAUDE_SKILL_DIR} Do not use substitutions like (not an environment variable that always exists in an external shell). The auxiliary CLI works only with the Node.js standard library, but this is a dependency on the Skill side, and the samples used in the user's project (rust-crate , etc.) themselves do not require Node.js.

Usage examples

  • "Referring to make, create a plan for improving this Rust crate's Makefile and verification commands"
  • "Review this repository's Makefile against the GNU Make specification and tell me if there are any missing.PHONY "
  • "In a mixed Rust + Node repository, statically diagnose whether the separation of responsibilities among Make, Cargo, Turborepo, and CI is appropriate"

How to use it differently from related skills

  • rust — Handles the API reference for the entire Rust language and toolchain, including Cargo, rustc, rustdoc, etc.make の references/rust/ handles only the differentiation of Cargo standard features and the xtask pattern in the Make context, and does not duplicate the Rust language specification
  • turborepo — Handles Turborepo's own task graph, cache, and pipeline definitions.make の references/node/ handles only the delegation boundary to Turborepo
  • lefthook — Handles the configuration and implementation of Git hooks.make の references/quality/ handles only the design guidelines for hooks and CI sharing the same command contract

All of these assume discovery by skill name, and do not use relative links to sibling directories that would break when installed standalone.