Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计通过

makefile-validator生成文件验证器

Agent Skill

makefile-validator 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

3,144

周安装

131

GitHub Stars

197

下载量

1,048
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:makefile-validator(生成文件验证器)
来源仓库:https://github.com/akin-ozer/cc-devops-skills
仓库路径:skills/makefile-validator
安装命令:
npx skills add https://github.com/akin-ozer/cc-devops-skills --skill makefile-validator
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/akin-ozer/cc-devops-skills --skill makefile-validator

简介

用于查找、检索和筛选相关信息。makefile-validator 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

  • 适合根据关键词或任务场景定位内容。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 支持 Codex、Claude 等宿主环境。
  • 通过 npx 命令从 GitHub 仓库安装。
  • 建议核实数据来源与访问权限后再使用。

SKILL.md

Makefile Validator

Overview

Use this skill to validate Makefiles with a local-first, deterministic flow.

Default validator entrypoint:

bash scripts/validate_makefile.sh <makefile-path>

Validation layers:

  1. Dependency preflight (python3, pip3, make)
  2. GNU make syntax check (make -n --dry-run) when make is available
  3. mbake validate
  4. mbake format --check
  5. Custom security, best-practice, and optimization checks
  6. Optional checkmake and unmake checks when installed

Trigger Guidance

Use this skill when the request includes Makefile quality, linting, validation, hardening, or troubleshooting.

Trigger Phrases

  • "Validate this Makefile"
  • "Lint my .mk file"
  • "Find issues in this build Makefile"
  • "Check Makefile security problems"
  • "Review this Makefile before CI"

Non-Trigger Examples

  • Creating a brand new Makefile from scratch (use makefile-generator)
  • Running build targets as part of delivery
  • General shell scripting work unrelated to Makefiles

Deterministic Execution Model

Run from this skill directory for shortest commands:

cd devops-skills-plugin/skills/makefile-validator

Step 1: Preflight

  1. Confirm target file exists and is readable.
  2. Confirm whether file edits are allowed (writable) or only suggestions can be returned (read-only).
  3. Prefer the default validator path first; use fallbacks only when blocked by environment constraints.

Step 2: Baseline Validation (Default Path)

# From skill directory
bash scripts/validate_makefile.sh <makefile-path>

# From repository root
bash devops-skills-plugin/skills/makefile-validator/scripts/validate_makefile.sh <makefile-path>

Always record:

  • command executed
  • exit code
  • summary counts (Errors, Warnings, Info)
  • issue locations reported by tools

Step 3: Interpret Output and Exit Code

Exit codeMeaningExpected summary lineAction
0no blocking findingsValidation PASSEDoptional improvements only
1warning-only resultValidation PASSED with warningsfix recommended; merge policy dependent
2error resultValidation FAILED - errors must be fixedfix required, then rerun

Step 4: Progressive Reference Loading

Open only the docs required by the current findings.

Finding typeReference doc
.PHONY, .DELETE_ON_ERROR, .ONESHELL, variable usage, performance structuredocs/best-practices.md
tabs vs spaces, dependency mistakes, credential patterns, anti-patternsdocs/common-mistakes.md
mbake behavior, formatter flags, known mbake caveatsdocs/bake-tool.md

Step 5: Fix + Rerun Loop

After applying fixes, rerun:

bash scripts/validate_makefile.sh <makefile-path>

Loop rules:

  1. Stop only when no new errors are introduced.
  2. If warnings remain intentionally, document why they are accepted.
  3. Always report the latest rerun exit code.

How to Open Docs

Use explicit file-open commands so paths are unambiguous.

From repository root:

sed -n '1,220p' devops-skills-plugin/skills/makefile-validator/docs/best-practices.md
sed -n '1,220p' devops-skills-plugin/skills/makefile-validator/docs/common-mistakes.md
sed -n '1,220p' devops-skills-plugin/skills/makefile-validator/docs/bake-tool.md
rg -n "PHONY|DELETE_ON_ERROR|ONESHELL|tab|credential|mbake" devops-skills-plugin/skills/makefile-validator/docs/*.md

From devops-skills-plugin/skills/makefile-validator:

sed -n '1,220p' docs/best-practices.md
sed -n '1,220p' docs/common-mistakes.md
sed -n '1,220p' docs/bake-tool.md
rg -n "PHONY|DELETE_ON_ERROR|ONESHELL|tab|credential|mbake" docs/*.md

If shell commands are unavailable, use the environment's file-open/read actions on the same paths.

Fallback Behavior

Use these only when the default validator path cannot run fully.

ConstraintFallback actionReporting requirement
python3 or pip3 unavailableRun limited checks (make -f <file> -n --dry-run if make exists, plus focused grep checks)State that mbake stages were skipped and coverage is reduced
pip3 install mbake fails (offline/proxy/index issue)Keep syntax/custom checks that still work; defer formatter/linter stagesReport install failure and request rerun in a network-enabled environment
make unavailableContinue with non-syntax stages; script already downgrades syntax stageExplicitly note syntax coverage was skipped
checkmake or unmake unavailableContinue; these are optional stagesNote optional lint/portability coverage not executed
target file is read-onlyProvide patch suggestions onlyMark response as advisory only
command execution unavailableProvide static review from file contents and docsMark result as non-executed analysis

Minimal fallback commands:

# Syntax only (when make exists)
make -f <makefile-path> -n --dry-run

# Focused quick checks
grep -n "^\\.DELETE_ON_ERROR:" <makefile-path>
grep -n "^\\.PHONY:" <makefile-path>
grep -nE "^(  |    |        )[a-zA-Z@\\$\\(]" <makefile-path>

Example Outcomes Mapped to Exit Codes

Clean Result (exit 0)

Errors:   0
Warnings: 0
Info:     2
✓ Validation PASSED

Warning-Only Result (exit 1)

Errors:   0
Warnings: 3
Info:     1
⚠ Validation PASSED with warnings

Error Result (exit 2)

Errors:   2
Warnings: 1
Info:     0
⚠ Validation FAILED - errors must be fixed

Troubleshooting Quick Start

  1. Verify required tools:
command -v python3 pip3 make
  1. Isolate GNU make syntax failures:
make -f <makefile-path> -n --dry-run
  1. Check likely tab-indentation violations:
grep -nE "^(  |    |        )[a-zA-Z@\\$\\(]" <makefile-path>
  1. Rerun validator with plain output and capture log:
NO_COLOR=1 bash scripts/validate_makefile.sh <makefile-path> > /tmp/makefile-validator.log 2>&1
echo "exit=$? log=/tmp/makefile-validator.log"
  1. If mbake install keeps failing, validate in a network-enabled shell or with an internal PyPI mirror, then rerun the full validator.

Skill Paths

makefile-validator/
├── SKILL.md
├── scripts/
│   └── validate_makefile.sh
├── docs/
│   ├── best-practices.md
│   ├── common-mistakes.md
│   └── bake-tool.md
└── examples/
    ├── good-makefile.mk
    └── bad-makefile.mk

Done Criteria

This skill update is complete when all are true:

  1. Trigger guidance is explicit and easy to identify.
  2. Execution flow is deterministic (preflight -> run -> interpret -> docs -> rerun).
  3. "How to open docs" instructions include exact commands and paths.
  4. Example outcomes are explicitly tied to exit codes (0, 1, 2).
  5. Fallback behavior is documented for missing tools and constrained environments.
  6. Troubleshooting quick-start is concise and runnable.
  7. Frontmatter name and description remain unchanged.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.21%
按下载量换算369

Claude

31.81%
按下载量换算333

Cursor

18.57%
按下载量换算195

Gemini CLI

9.73%
按下载量换算102

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/akin-ozer/cc-devops-skills --skill makefile-validator 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills