MCPInstall

yak

yak-skills 总入口与路由。当用户要做 Yaklang 编程、Yak 热加载(MITM / Web Fuzzer / 全局)、Yakit 二次开发或 MCP 测试时,先从这里判断该进入哪个专题 skill。本页讲清三层热加载体系、YAKMAIN 调试约定、go run 测试方法,并把请求路由到 yakit-basic / yakit-ui-binding / mitm-hotpatch / webfuzzer-hotpatch / global-hotpatch / yaklang-syntax / yaklang-database / yakit-native-plugin / yakit-rightclick-plugin / yaklang-toolchain / yakit-data-extract-plugin。

Installs
125
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/yaklang/yak-skills --skill yak
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads yak automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

SKILL: yak-skills 总入口

AI LOAD INSTRUCTION: 这是 yak-skills 知识库的总路由。Yaklang 是为安全研究与渗透测试设计的 DSL(文件后缀 .yak),其最核心、最容易出错的机制是"热加载(Hot Patch)"。遇到 Yaklang / Yak 热加载 / Yakit 相关任务,先读本页选定专题,再按需下钻到对应 skill。所有示例都可用 go run common/yak/cmd/yak.go <file> 或 yak <file> 实测。

1. 路由表:什么任务进哪个 skill

任务信号进入 skill
Yakit 是什么、怎么安装、界面各功能区干什么、引擎怎么连、新手怎么上手yakit-basic
yak 脚本怎么让 Yakit 显示表格/图表/进度条/卡片/网站树:yakit.* 库函数与 UI 交互机制yakit-ui-binding
MITM 代理里劫持/修改请求响应、镜像分析流量、入库打标签染色、危险操作 mockmitm-hotpatch
Web Fuzzer 单 Tab 发包加解密、签名注入、智能重试、业务失败判定、fuzztag、关联提参webfuzzer-hotpatch
一处配置让 MITM 与所有 Fuzzer 共享:全站透明加解密、统一签名、动态 challenge、全站染色护栏global-hotpatch
写/读懂 Yaklang 语法:变量、控制流、函数、闭包、f-string、错误处理 ~yaklang-syntax
数据持久化与查询:SQLite、键值存储、Payload 字典、项目配置yaklang-database
写 Yakit 原生插件(yak/mitm 类型)、cli 参数表单、mitm 被动扫描、mitm+cli 交互式加载外部参数yakit-native-plugin
写 Yakit 右键 codec 插件(只需 handle)、History 右键由 flow id 反查提取(进度条)、codec+cli 选提取项、Web Fuzzer 右键编解码/选区变换yakit-rightclick-plugin
怎么验证写的插件:go run 引擎、hotpatch-* / codec-plugin 验证命令、用仓库调试 MITMyaklang-toolchain
从 History 提取域名/URI/Cookie 做路径扫描与 Fuzzyakit-data-extract-plugin

2. 三层热加载体系(核心心智模型)

热加载允许在 不中断服务 的情况下,用 Yaklang 代码动态接管 HTTP 流量的处理阶段。它分三层,执行顺序自上而下:

flowchart TB
    Global["全局热加载 (Global Hot Patch)\nMITM 与所有 Fuzzer 共享, 同时只启用 1 个"] --> Module
    subgraph Module [模块热加载]
        MITM["MITM 热加载\n代理侧: 劫持/镜像/入库/mock"]
        Fuzzer["Web Fuzzer 热加载\n单 Tab: 加解密/签名/重试/fuzztag"]
    end
    Module --> Done["出站 / 回显 / 入库"]
层作用范围典型 Hookskill
全局全系统所有 MITM/Fuzzer 流量,先执行beforeRequest afterRequest hijackSaveHTTPFlowglobal-hotpatch
模块 - MITM当前 MITM 任务hijackHTTPRequest hijackHTTPResponseEx mirror* hijackSaveHTTPFlow mockHTTPRequestmitm-hotpatch
模块 - Fuzzer当前 Fuzzer TabbeforeRequest afterRequest retryHandler customFailureChecker mirrorHTTPFlowwebfuzzer-hotpatch

关键区别:MITM 劫持类用 forward(pkt)/drop() 提交;Fuzzer 的 beforeRequest/afterRequest 用 返回值 提交。Fuzzer 的 mirrorHTTPFlow(req, rsp, params) 与 MITM 的 mirrorHTTPFlow(isHttps, url, req, rsp, body) 签名不同。

3. 统一写法:hook 函数 + YAK_MAIN 自测

所有热加载脚本都遵循同一个结构——把 hook 注册为函数变量,再用 if YAK_MAIN { runSelfTest() } 守卫本地自测:

// 1) 注册 hook (yakit 加载时只做这件事)
hijackHTTPRequest = func(isHttps, url, req, forward, drop) {
    forward(req)
}

// 2) 本地自测 (命令行运行时才跑)
func runSelfTest() {
    // 用 mock 数据 + 自定义 callback + assert 验证 hook 行为
}

if YAK_MAIN {
    runSelfTest()
}

重要:yak 不会自动调用 func main()。脚本执行时只有顶层语句会从上到下运行,func main(){} 只是普通函数,必须被显式调用。所以入口约定是顶层写 if YAK_MAIN { main() }(或 if YAK_MAIN { runSelfTest() }),而不是直接 main()。直接 main() 会导致脚本被当作模块/插件加载时也执行自测逻辑。

YAK_MAIN 是 yaklang 引擎注入的全局布尔变量:

  • yak xxx.yak / go run common/yak/cmd/yak.go xxx.yak 命令行运行:引擎走 ExecuteMain,注入 YAK_MAIN = true → 跑 runSelfTest()。
  • yakit MITM / Fuzzer / 全局热加载窗口加载:YAK_MAIN = false → 只注册 hook,自测块不执行。

因此:把含自测块的完整脚本粘贴回 yakit 是绝对安全的——yakit 不会跑你的 mock 数据。这就是"先在命令行一键自测,再粘回 yakit 使用"的安全调试闭环。

4. 测试约定

# 推荐: 用 yaklang 源码引擎跑 (拿到最新能力)
cd /Users/v1ll4n/Projects/yaklang
go run common/yak/cmd/yak.go <path-to>.yak

# 或用已安装的引擎
yak <path-to>.yak

合格标准:脚本 10 秒内完成、所有 assert 通过、log 输出全英文、末尾出现 ... self test passed。

5. 工程化原则(贡献本库时遵循)

  • 注释可用中文,但 log 输出、字符串内容、payload 全部用英文。
  • 错误处理优先用 ~ 波浪号;关键结果用 assert 验证。
  • 在关键代码位置加 // 关键词: ... 注释,便于 grep 与 AI 检索。
  • 不使用 emoji,只用 ASCII、中文与必要标点。
  • 以认真查阅为荣,以暗猜接口为耻;不确定就 desc(obj) 或直接 go run 试。
  • 并发安全:热加载 hook 会被 并发 调用。顶层全局只放 只读常量(密钥/IV/规则),绝不在 hook 内写共享可变全局(裸 append 全局 slice、改全局 map 会 data race 崩溃);需聚合用 sync.Map/sync.NewMutex() 或 db.*/risk.*。
  • 前端加密各种 HACK / 让用户看到明文:见 webfuzzer-hotpatch 第 5 节组合配方(examples/combo-*.yak)。

参考来源

本库内容蒸馏自 Yak Project 公众号文章(yak-project-public)与 yaklang.github.io 官方文档,所有 Hook 签名以 yaklang 源码 (common/yak/hook_mixed_plugin_caller.go、common/yak/script_engine_for_fuzz.go) 为准。

FAQ

What does the yak skill do?

yak-skills 总入口与路由。当用户要做 Yaklang 编程、Yak 热加载(MITM / Web Fuzzer / 全局)、Yakit 二次开发或 MCP 测试时,先从这里判断该进入哪个专题 skill。本页讲清三层热加载体系、YAKMAIN 调试约定、go run 测试方法,并把请求路由到 yakit-basic / yakit-ui-binding / mitm-hotpatch / webfuzzer-hotpatch / global-hotpatch / yaklang-syntax / yaklang-database / yakit-native-plugin / yakit-rightclick-plugin / yaklang-toolchain / yakit-data-extract-plugin。

How do I install yak?

Run npx skills add https://github.com/yaklang/yak-skills --skill yak in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/yak/ (personal) or .claude/skills/yak/ (project).

Which AI agents can use yak?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is yak safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains yak?

It is published by yaklang in yaklang/yak-skills. It has 125 recorded installs.

More from yaklang/yak-skills

View all →

mitm-hotpatch

yaklang/yak-skills

Yakit MITM 热加载 (Hot Patch) 专题。当用户需要在 MITM 中间人代理中用代码动态劫持/修改请求与响应、镜像分析流量、入库前打标签染色、或对危险操作做 mock 护栏时使用。覆盖 hijackHTTPRequest / hijackHTTPResponseEx / mirror 系列 / hijackSaveHTTPFlow / mockHTTPRequest 全部 Hook 与 forward/drop 语义。

125 installs

global-hotpatch

yaklang/yak-skills

Yakit 全局热加载 (Global Hot Patch) 专题。当用户需要一处配置、让 MITM 与所有 Web Fuzzer Tab 共享同一套 hook 时使用:全站透明加解密、统一签名/认证注入、动态 challenge 应答、全站染色脱敏、危险操作护栏。全局 hook 先于模块 hook 执行,同时只能启用一个。复用 beforeRequest / afterRequest / hijackHTTPRequest / hijackSaveHTTPFlow / mockHTTPRequest。

124 installs

webfuzzer-hotpatch

yaklang/yak-skills

Yakit Web Fuzzer 热加载 (Hot Patch) 专题。当用户需要在 Web Fuzzer 单 Tab 发包时用代码自动加解密请求/响应、注入签名、智能重试、自定义业务失败判定、用 fuzztag 动态生成 payload、或从响应提取参数做关联测试时使用。覆盖 beforeRequest / afterRequest / retryHandler / customFailureChecker / mirrorHTTPFlow / mockHTTPRequest 与 {{yak(...)}} fuzztag。

123 installs

yakit-native-plugin

yaklang/yak-skills

Yakit 原生插件(yak / mitm 类型)与 cli 参数体系。讲清原生插件与热加载的区别、cli. 如何变成 Yakit 执行页的参数表单(String/Int/Bool/Urls/Ports/StringSlice 下拉/File 等 + setRequired/ setDefault/setVerboseName/setCliGroup), 以及三个优秀案例: yak 原生插件用 cli 收用户输入、 mitm 原生插件被动扫描复杂内容并产出 risk、mitm + cli 交互式插件加载外部参数(关键词字典/作用域) 驱动扫描。当用户问"怎么写带参数表单的 yak/mitm 插件、cli 怎么用、mitm 插件怎么做被动扫描"时使用。

121 installs

yakit-data-extract-plugin

yaklang/yak-skills

解决一个高频实战痛点:在 Yakit History 里积累了某站点大量流量后,如何一键按域名捞取所有唯一 路径、拿到登录 Cookie,并把这些路径沉淀成可复用的 Payload 字典,再带着登录态逐路径发包扫描/Fuzz。 覆盖 db.QueryHTTPFlowsByKeyword 捞 History、URI 去重、Cookie 提取、db.SavePayload/YieldPayload 字典管理、poc.HTTP 登录态发包。当用户想"从历史流量提取数据驱动后续扫描"时使用。

121 installs

yaklang-database

yaklang/yak-skills

Yaklang 数据库操作 (db 库) 专题。当用户需要在脚本/插件里持久化或查询数据时使用:临时 SQLite 建表与增删改查 (db.OpenTempSqliteDatabase / db.ScanResult / Exec)、跨脚本共享配置的键值存储 (db.SetKey/GetKey/DelKey/SetKeyWithTTL)、爆破字典统一管理 (db.SavePayload/YieldPayload)、以及项目级配置 (db.SetProjectKey/GetProjectKey)。

Data & Databases121 installs

Popular frontend & design skills

View category →

setup-matt-pocock-skills

mattpocock/skills

Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

Frontend & Design1.1M installs

frontend-design

anthropics/skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

OfficialFrontend & Design1M installs

hyperframes-animation

heygen-com/hyperframes

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

prototype

mattpocock/skills

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

Frontend & Design999.2K installs

hyperframes-core

heygen-com/hyperframes

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Frontend & Design930.5K installs

vercel-react-best-practices

vercel-labs/agent-skills

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

OfficialFrontend & Design843.1K installs