Makefile Linter for Openclaw

A lightweight, dependency-free Python linter for validating Makefile syntax, portability, and best practices.

charlie-morrison
v1.0.1
May 1, 2026
0
755
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install makefile-linter

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install makefile-linter using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Makefile Linter?

The makefile-linter is a specialized tool within the Openclaw Skills ecosystem designed to bring consistency and reliability to your build systems. Built using pure Python 3 with no external dependencies, it provides an efficient way to scan Makefiles for common pitfalls that often lead to subtle build failures or environment-specific bugs.

By integrating this skill into your development workflow, you can automatically detect indentation errors, undefined variables, and shell portability issues. It acts as a gatekeeper for quality, ensuring that every Makefile adheres to industry standards and is easily maintainable by any member of your team.

Makefile Linter Use Cases

  • Validating Makefile syntax in CI/CD pipelines to prevent broken builds.
  • Conducting deep audits of legacy build scripts during refactoring phases.
  • Generating automated Markdown reports for GitHub pull request comments.
  • Ensuring cross-platform shell portability for multi-environment projects.

How Makefile Linter Works

  1. The tool reads the Makefile content either from a file path or via standard input.
  2. A comprehensive set of regex-based rules analyzes the script for structural issues like space-instead-of-tab errors.
  3. Variable and target tracking identifies missing .PHONY declarations or unused parameters.
  4. The results are aggregated based on severity levels such as Info, Warning, or Error.
  5. The tool outputs a structured report in text, JSON, or Markdown format based on user preference.

Makefile Linter Setup

To get started with this linter from the Openclaw Skills collection, ensure you have Python 3.x installed. No additional pip installations are required.

# Basic linting of a local Makefile
python3 scripts/makefile-linter.py lint Makefile

# Perform a full audit with JSON output
python3 scripts/makefile-linter.py audit Makefile --format json

Makefile Linter Data Schema & Taxonomy

The linter provides structured data output especially useful when using Openclaw Skills in automated environments:

Format Usage Description
Text Human-readable console output for quick debugging.
JSON Machine-readable data structure for integration with web dashboards or CI tools.
Markdown Formatted tables and lists ideal for documentation or PR comments.

Key metadata tracked during the audit includes rule identifiers, severity levels, line numbers, and descriptive error messages.

Makefile Linter Advanced Features

  • Strict Mode: Use the --strict flag to force exit code 1 on any finding, perfect for blocking bad commits in a pipeline.
  • Severity Filtering: Customize noise levels using the min-severity option to focus only on critical errors.
  • Rule Exclusion: Granularly ignore specific rules like long-lines or missing-clean to match your project local style guide.
  • Pipe Support: Seamlessly integrate with other CLI tools by piping Makefile content directly into the linter via stdin.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*