MCPInstall

yaklang-toolchain

Yaklang 工具链与插件验证指南。讲清如何用 yaklang 源码引擎 (go run common/yak/cmd/yak.go) 跑脚本, 以及四个热加载/codec 验证命令 (yak hotpatch-mitm / hotpatch-global / hotpatch-webfuzzer / codec-plugin) 如何用真实 gRPC 同款执行路径验证你写的 MITM / 全局 / Web Fuzzer 热加载与右键 codec 插件;还讲如何 借助 yaklang 仓库源码定位与调试 MITM 问题。当用户问"我写的插件怎么验证 / MITM 行为不对怎么调"时使用。

Installs
121
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 yaklang-toolchain
  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 yaklang-toolchain 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: Yaklang 工具链与插件验证

AI LOAD INSTRUCTION: 写完一个热加载或 codec 插件后,最大的问题是"怎么确认它真的对"。本页给出 两种验证路径:1) YAK_MAIN 自测块(逻辑自证);2) 四个 yak 验证命令,用与 Yakit UI 同款的 gRPC 执行路径 把脚本跑在真实的请求/响应上、打印改写证据。还讲如何用 yaklang 仓库源码反查 Hook 契约、调试 MITM。命令需要用 yaklang 仓库构建的引擎(见下)。

0. 相关路由

  • 总入口:yak
  • 三类热加载写法:mitm-hotpatch / webfuzzer-hotpatch / global-hotpatch
  • 右键 codec 插件编程:yakit-rightclick-plugin
  • 历史数据提取扫描:yakit-data-extract-plugin

1. 用源码引擎跑脚本(go run 工作流)

cd /Users/v1ll4n/Projects/yaklang
# 跑任意 .yak(拿到最新引擎能力)
go run common/yak/cmd/yak.go path/to/script.yak

# 构建一次复用更快
go build -o /tmp/yak ./common/yak/cmd/yak.go
/tmp/yak path/to/script.yak

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

2. 四个验证命令(与 Yakit gRPC 同款执行路径)

这些命令把脚本喂进引擎里真正使用的同一套 Hook 执行链(MixPluginCaller / MutateHookCaller / codec handle),而不是另写一套模拟,所以"命令跑通 == Yakit 里也能跑通"。

命令验证对象底层路径
yak hotpatch-mitmMITM 热加载NewMixPluginCaller().LoadHotPatch + CallHijackRequest/ResponseEx + Mirror + HijackSaveHTTPFlow
yak hotpatch-global全局热加载同上,外加 CallBeforeRequest/AfterRequest(全局管线顺序)
yak hotpatch-webfuzzerWeb Fuzzer 热加载MutateHookCaller 返回的 beforeRequest/afterRequest/mirrorFlow/retryHandler/customFailureChecker + {{yak(...)}} fuzztag
yak codec-plugin右键 codec 插件执行脚本并调用 handle(input)

2.1 hotpatch-mitm / hotpatch-global

# 准备一个原始请求文件
printf 'POST /api/order/create HTTP/1.1\r\nHost: shop.example.com\r\nContent-Type: application/json\r\n\r\n{"amount":100,"product_id":42}' > /tmp/req.txt

yak hotpatch-mitm --script skills/mitm-hotpatch/examples/hijack-request.yak --request /tmp/req.txt

输出会打印 原始请求 / 改写后请求 / drop 状态 / 入库 tag 等证据。带响应验证响应劫持:

yak hotpatch-mitm --script x.yak --request /tmp/req.txt --response /tmp/rsp.txt [--https] [--url URL]

hotpatch-global 参数相同,额外驱动 beforeRequest/afterRequest,适合验证全站透明加解密类脚本。

2.2 hotpatch-webfuzzer

# 验证 beforeRequest/afterRequest/retryHandler/customFailureChecker
yak hotpatch-webfuzzer --script x.yak --request /tmp/req.txt --response /tmp/rsp.txt

# 验证脚本里定义的 {{yak(...)}} fuzztag
yak hotpatch-webfuzzer --script skills/webfuzzer-hotpatch/examples/fuzztag-handle.yak \
    --request /tmp/req.txt --fuzztag '{{yak(hash|md5,hello)}}'
# -> rendered-fuzztag: [5d41402abc4b2a76b9719d911017c592]

2.3 codec-plugin(右键 codec)

yak codec-plugin --script skills/yaklang-toolchain/examples/codec-rot13.yak --input "Hello, Yak!"
# -> output (len=11): Uryyb, Lnx!

# 也支持从文件读 input
yak codec-plugin --script x.yak --input-file /tmp/payload.bin

示例:examples/codec-rot13.yak;右键 codec 插件的编程与使用见 yakit-rightclick-plugin。

3. 用 yaklang 仓库调试 MITM 问题

当 Hook 行为和预期不符、或不确定某个 Hook 的签名/语义时,直接查源码是最快的:

cd /Users/v1ll4n/Projects/yaklang

# 1) 查 Hook 签名与调用方式(MITM/全局都在这里)
grep -n "CallHijackRequest\|CallHijackResponseEx\|hijackSaveHTTPFlow\|MirrorHTTPFlow" \
    common/yak/hook_mixed_plugin_caller.go

# 2) 查 Web Fuzzer 的 6 个 hook 闭包定义
grep -n "beforeRequest\|afterRequest\|retryHandler\|customFailureChecker" \
    common/yak/script_engine_for_fuzz.go

# 3) 找现成测试用例当样例
grep -rn "LoadHotPatch\|hijackHTTPRequest" --include="*_test.go" common/

调试要点:

  • MITM 劫持类 Hook 的 forward/drop 在引擎侧是 func() interface{},由 constClujore 包装(见 common/yakgrpc/grpc_mitm.go);脚本里 forward(pkt) 即写回改写包,drop() 即丢弃。
  • IsPassed(url) 会按过滤器决定是否触发 Hook,默认(无过滤器)放行。
  • 在脚本里用 desc(obj) 打印对象方法/字段,确认 flow.AddTag / flow.Red() 等是否存在。
  • 复现问题:把出问题的请求存成文件,用 yak hotpatch-mitm --script ... --request ... 单步看改写证据, 比在 UI 里反复点更快。

4. 如何验证你写的插件(推荐闭环)

flowchart LR
    W[写 hook + YAK_MAIN 自测] --> S[yak file.yak 自测过]
    S --> C[yak hotpatch-* 命令跑真实请求]
    C --> E[stdout 证据符合预期]
    E --> P[粘回 Yakit 使用]
  1. 先写 if YAK_MAIN { runSelfTest() },yak file.yak 让逻辑自证。
  2. 用对应的 yak hotpatch-* / codec-plugin 命令喂真实请求/响应,核对 stdout 证据。
  3. 证据无误后把脚本粘回 Yakit——YAK_MAIN=false,自测块不执行,安全。

批量验证整库脚本并把证据落地,见 yak-skills/scripts/validate-skills.yak;用 mitm 模块起 真实代理链路的补充证据,见 yak-skills/scripts/mitm-live-demo.yak。

5. 命令实现位置(贡献/排错用)

  • 命令定义:yaklang/common/yak/cmd/yakcmds/hotpatch.go(导出 HotPatchValidatorCommands)。
  • 注册点:yaklang/common/yak/cmd/yak.go(cliGroup("Hot Patch Validators", ...))。
  • 单元测试:yaklang/common/yak/cmd/yakcmds/hotpatch_test.go (go test ./common/yak/cmd/yakcmds/ -run 'HotPatch|Codec')。

FAQ

What does the yaklang-toolchain skill do?

Yaklang 工具链与插件验证指南。讲清如何用 yaklang 源码引擎 (go run common/yak/cmd/yak.go) 跑脚本, 以及四个热加载/codec 验证命令 (yak hotpatch-mitm / hotpatch-global / hotpatch-webfuzzer / codec-plugin) 如何用真实 gRPC 同款执行路径验证你写的 MITM / 全局 / Web Fuzzer 热加载与右键 codec 插件;还讲如何 借助 yaklang 仓库源码定位与调试 MITM 问题。当用户问"我写的插件怎么验证 / MITM 行为不对怎么调"时使用。

How do I install yaklang-toolchain?

Run npx skills add https://github.com/yaklang/yak-skills --skill yaklang-toolchain 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/yaklang-toolchain/ (personal) or .claude/skills/yaklang-toolchain/ (project).

Which AI agents can use yaklang-toolchain?

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 yaklang-toolchain 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 yaklang-toolchain?

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

More from yaklang/yak-skills

View all →

yak

yaklang/yak-skills

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。

Frontend & Design125 installs

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-rightclick-plugin

yaklang/yak-skills

Yakit 右键插件 (codec 插件) 的使用与编程技巧。讲清 codec 插件只需要一个 handle(input) 函数, 配合插件类型 codec + 开关"用于数据包右键" (tag: allow-custom-context-menu-execute) 即可出现在 任意 HTTP 编辑器的右键菜单里; 还讲 History 右键(单选/多选)时 input=flow id 的特殊契约(可由 id 反查数据包提取 host 全部 path/参数名, 带 yakit.SetProgress 进度条与 db Yield 通道), codec 插件 叠加 cli 参数做下拉选择(提取 Path/参数名/Cookie), Web Fuzzer 选区做"奇怪变换", 以及如何用 yak codec-plugin 命令验证。当用户问"怎么写右键插件 / codec 插件怎么用 / History 右键提取数据 / Web Fuzzer 右键变换 / codec 带参数"时使用。右键插件是编写小工具最快的方式。

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

Popular backend & apis skills

View category →

find-skills

vercel-labs/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

OfficialBackend & APIs4.1M installs

entra-app-registration

microsoft/azure-skills

Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.

OfficialBackend & APIs566.7K installs

This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).

Backend & APIs514.8K installs

embedded-captions

heygen-com/hyperframes

Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.

Backend & APIs453.3K installs

entra-agent-id

microsoft/azure-skills

Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).

OfficialBackend & APIs336.6K installs

neon

neondatabase/agent-skills

Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.

Backend & APIs237.1K installs