← 返回 Skills 市场
charlie-morrison

Makefile Linter

作者 charlie-morrison · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
87
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install makefile-linter
功能描述
Lint Makefiles for common issues — tabs, .PHONY, unused vars, portability, and best practices.
使用说明 (SKILL.md)

makefile-linter

A pure-Python 3 (stdlib only) Makefile linter. Detects common issues including tab/space errors, missing .PHONY declarations, unused/undefined variables, hardcoded paths, shell portability problems, and more.

Commands

lint FILE

Lint a Makefile and report issues.

python3 scripts/makefile-linter.py lint Makefile
python3 scripts/makefile-linter.py lint /path/to/Makefile
echo -e "all:\
	echo hello" | python3 scripts/makefile-linter.py lint /dev/stdin

targets FILE

List all targets with line numbers, phony status, prerequisites, and inline comment descriptions.

python3 scripts/makefile-linter.py targets Makefile
python3 scripts/makefile-linter.py targets Makefile --format json

vars FILE

List all variable definitions with line numbers and values.

python3 scripts/makefile-linter.py vars Makefile
python3 scripts/makefile-linter.py vars Makefile --format markdown

audit FILE

Full audit combining lint results, targets list, and variables summary.

python3 scripts/makefile-linter.py audit Makefile
python3 scripts/makefile-linter.py audit Makefile --format json

Options

Flag Description
--format text|json|markdown Output format (default: text)
--strict Exit code 1 on any reported issue
--ignore RULE Ignore a specific rule (repeatable)
--min-severity error|warning|info Minimum severity to report (default: info)

Lint Rules

Rule Severity Description
spaces-not-tabs error Recipe lines must use tabs, not spaces
duplicate-targets error Same target defined more than once
missing-phony warning Common phony target not in .PHONY
unused-variables warning Variable defined but never referenced
undefined-variables warning Variable referenced but never defined
hardcoded-paths warning Absolute paths in recipes
trailing-whitespace warning Lines ending with spaces or tabs
shell-portability warning Bash-specific syntax without SHELL := /bin/bash
recursive-make info $(MAKE) -C or make -C detected
missing-default-target info No all target defined
long-lines info Lines over 120 characters
missing-clean info No clean target defined

Examples

# Report only errors and warnings
python3 scripts/makefile-linter.py lint Makefile --min-severity warning

# JSON output for CI integration
python3 scripts/makefile-linter.py lint Makefile --format json

# Fail CI on any issue
python3 scripts/makefile-linter.py lint Makefile --strict

# Ignore specific rules
python3 scripts/makefile-linter.py lint Makefile --ignore recursive-make --ignore missing-clean

# Full audit in Markdown (for PR comments)
python3 scripts/makefile-linter.py audit Makefile --format markdown

# Pipe from stdin
cat Makefile | python3 scripts/makefile-linter.py lint /dev/stdin
安全使用建议
This skill appears coherent and limited to linting Makefiles, but you should still take basic precautions before installing: review the full scripts/makefile-linter.py file yourself (look for subprocess, socket, open(..., 'w') or other file-write/network calls not visible in the truncated excerpt), run it in a sandbox or CI worker with limited privileges, and avoid pointing it at sensitive system files. Also note metadata has no homepage and the publisher is unknown — if provenance matters, prefer packages with a traceable upstream or repo.
功能分析
Type: OpenClaw Skill Name: makefile-linter Version: 1.0.0 The skill bundle is a legitimate Makefile linter implemented in pure Python using only standard libraries. The script `scripts/makefile-linter.py` performs static analysis on Makefiles to detect common issues such as indentation errors, missing .PHONY declarations, and unused variables without executing any shell commands or accessing external networks. No evidence of malicious intent, data exfiltration, or prompt injection was found.
能力评估
Purpose & Capability
The name/description (Makefile linter) match the included Python script and SKILL.md examples. No unrelated binaries, cloud creds, or config paths are requested.
Instruction Scope
SKILL.md only instructs invoking the included Python script against Makefiles (paths or /dev/stdin) and describes flags/outputs. There are no instructions to read unrelated system state, exfiltrate data, or call external endpoints.
Install Mechanism
No install spec; code is provided inline (pure stdlib Python). Nothing is downloaded or extracted at install time.
Credentials
The skill requires no environment variables, credentials, or config paths. The code parses files provided by the user and does not declare or appear to need secrets.
Persistence & Privilege
The skill is not always-enabled and does not request elevated persistence or modify other skills. Autonomous invocation is allowed by default (normal).
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install makefile-linter
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /makefile-linter 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release
元数据
Slug makefile-linter
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Makefile Linter 是什么?

Lint Makefiles for common issues — tabs, .PHONY, unused vars, portability, and best practices. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 87 次。

如何安装 Makefile Linter?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install makefile-linter」即可一键安装,无需额外配置。

Makefile Linter 是免费的吗?

是的,Makefile Linter 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Makefile Linter 支持哪些平台?

Makefile Linter 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Makefile Linter?

由 charlie-morrison(@charlie-morrison)开发并维护,当前版本 v1.0.0。

💬 留言讨论