``` SKILL.make: Makefile 风格的技能文件 ```
SKILL.make: Makefile Styled Skill File

原始链接: https://github.com/Teaonly/SKILL.make

## SKILL.make:受 Makefile 启发的 Agent 技能 SKILL.make 引入了一种新的 Agent 技能定义格式,利用了 Makefile 的结构和优势。它将传统的、常常模糊不清的 SKILL.md 文件转化为可复现的执行图,具有清晰的依赖关系和步骤。 **主要优势包括:** * **Token 效率:** 减少 SKILL 文件大小约 15%(优化后可能超过 30%),降低成本并节省上下文窗口空间。 * **依赖关系解析:** 通过目标:依赖 + 配方模型自动管理执行顺序,无需依赖 LLM 的“猜测”。 * **可组合性:** 通过调用不同文件的目标,实现模块化的技能构建。 * **可审计性与演进:** 方便跟踪变更并构建可演进的技能实现。 **核心组件:** 变量 (VAR)、Shell 命令 (@)、工具调用 ($)、推理提示 (?) 和条件逻辑 (ifeq) 用于定义技能逻辑。 在“为真实工程师提供的技能”集合上进行的测试表明,文件大小平均减少了 15%,部分技能减少了超过 50%。这个概念验证旨在与现有的 Agent Harness 实现兼容,并提供了一个 `convert.sh` 脚本用于转换。

Hacker News新 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交登录 SKILL.make: Makefile 样式的技能文件 (github.com/teaonly) 7 分,由 teaonly 1 小时前发布 | 隐藏 | 过去 | 收藏 | 1 条评论 帮助 teaonly 1 小时前 [–] 这个项目的核心思想是使用 Makefile 来格式化 SKILL 文档,利用 Makefile 内置的 DAG 功能和定义的语法。优点如下: 1. 减少了原始 MD 格式的 token 消耗; 2. SKILL 文件更易于阅读,更适合 AI 使用,因为固有的 DAG 是一种平面模式; 3. Makefile 非常适合审计(git 追踪、调用统计),为未来的自我进化工程提供了坚实的基础。回复 考虑申请 YC 2026 夏季班!申请截止至 5 月 4 日 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

Specification and reference implementation for Makefile-styled Agent Skills.

SKILL.make brings the declarative, dependency-driven paradigm of Makefiles to the Agent Skills format. It replaces fuzzy prose with structured logic, turning SKILL.md into a reproducible execution graph.

Why Makefile styled SKILL file?

  • Token Efficient: Optimized syntax reduces SKILL file size by ~15%, saving costs and context window space. With manual optimization, context size can be reduced by more than 30%.

  • Dependency Resolution: The harness resolves the DAG (Directed Acyclic Graph) automatically. No more relying on an LLM to "guess" the next logical step.Uses the Target: Dependency + Recipe model to ensure Agents follow a strict execution order without skipping steps.

  • Highly Composable: Modularize skills by calling targets across different files—just like a professional build system.

  • Auditability and evolution — Lays the groundwork for auditable and evolvable SKILL implementations.

Prefix Type Description
VAR = val Variable Define constants to reduce repetition.
@ cmd Shell Direct command-line instructions for execution.
$ tool Invocable Explicit calls to agent-defined tools/functions.
? prompt Reasoning Free-form prompts where the Agent decides the action.
ifeq Logic Conditional branching based on state or env vars.
multi-line string Code snippet Define code snippets using multi-line strings in Makefile syntax.

Below is a typical code-review skill written in SKILL.make format:

---
name: code-review
description: A full code review workflow.
---

```makefile
# Variables
CODE_DIR = src/

# Target: review — run a full code review
review: lint test summary

lint:
	@ cd $(CODE_DIR) && eslint . --format json

test:
	@ cd $(CODE_DIR) && npm test

summary: lint test
	? Based on lint errors and test failures, write a review summary.
```

### Addtional info is also OK.

We tested a complete SKILL collection (from the well-known "Skills for Real Engineers" — https://github.com/mattpocock/skills) using the Makefile format. It not only improves logical structure and readability, but more importantly, these SKILL.make files are well-suited for auditing (git tracking, invocation statistics) and lay a solid foundation for Evolution Engineering.

You can use convert.sh to reproduce this conversion. The comparison statistics are as follows:

File                                       SKILL.md SKILL.make   Change
---------------------------------------- ---------- ---------- --------
caveman                                        1916       1714     -10%
design-an-interface                            3366       2789     -17%
domain-model                                   3512       3376      -3%
edit-article                                    721        692      -4%
git-guardrails-claude-code                     2312       1861     -19%
github-triage                                 10089       8697     -13%
improve-codebase-architecture                  5509       4913     -10%
migrate-to-shoehorn                            2795       1328     -52%
obsidian-vault                                 1511       1233     -18%
qa                                             4965       4781      -3%
request-refactor-plan                          2711       2626      -3%
scaffold-exercises                             3589       2744     -23%
setup-pre-commit                               2261       1703     -24%
tdd                                            4211       3212     -23%
to-issues                                      2737       2027     -25%
to-prd                                         2460       2092     -14%
triage-issue                                   3783       3160     -16%
ubiquitous-language                            4890       4560      -6%
write-a-skill                                  3056       2879      -5%

TOTAL                                         66394      56387     -15%

This is a proof-of-concept specification. This specification is designed to be compatible with most Agent Harness implementations.

MIT

联系我们 contact @ memedata.com