global-hotpatch

Configure system-wide Yakit hot-patch hooks for transparent encryption, signing, and traffic tagging.

10|1|Updated Jun 16, 2026
One-click install
npx skills add https://github.com/yaklang/yak-skills --skill global-hotpatch-yaklang
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: global-hotpatch
Source: https://github.com/yaklang/yak-skills/tree/main/skills/global-hotpatch
Command: npx skills add https://github.com/yaklang/yak-skills --skill global-hotpatch-yaklang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When testing applications with encrypted or signed traffic, configuring hooks separately for every MITM task and Web Fuzzer tab is repetitive and error-prone. This Skill provides one global hot-patch layer that applies the same hooks across all MITM and Web Fuzzer traffic in Yakit. ## Core Features & Use Cases - Global Hook Layer: Reuses all 12 MITM hooks (beforeRequest, afterRequest, hijackHTTPRequest, hijackSaveHTTPFlow, mockHTTPRequest, mirror* family) with global hooks executing before module-level hooks; only one global patch can be active at a time. - Protocol Normalization Recipes: Includes runnable examples for site-wide SM4-CBC transparent encryption/decryption, dynamic challenge retrieval with HMAC signature injection, unified Authorization header injection, and status-code-based traffic coloring. - Self-Testing Examples: Every example follows the YAK_MAIN guard convention so scripts run standalone with yak xxx.yak for offline assertion-based verification. - Use Case: A target API requires a fresh challenge token and HMAC signature on every request. Write one global beforeRequest hook that fetches the challenge, computes the signature, and injects it—every Fuzzer tab and MITM session now sends valid signed requests automatically. ## Quick Start Ask the AI to write a Yakit global hot-patch script that injects an Authorization Bearer token into every outgoing request using the beforeRequest hook with a YAK_MAIN self-test.

Frequently Asked Questions about global-hotpatch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a Yakit global hot-patch script?▼

Register hook functions like beforeRequest or hijackHTTPRequest at the top level, then guard local tests with if YAK_MAIN { runSelfTest() }. Load the script in Yakit's global template configuration so it applies to all MITM and Web Fuzzer traffic.

What is the difference between global hot-patch and MITM hot-patch in Yakit?▼

Global hot-patch shares the same 12 hooks as MITM hot-patch but executes before module hooks and affects all MITM tasks and Fuzzer tabs. Only one global patch can be active at a time, while module patches are per-task or per-tab.

How do I handle encrypted request signing automatically during fuzzing?▼

Use a global beforeRequest hook to fetch the challenge endpoint, decrypt the nonce, compute an HMAC signature, and inject it as a header. Pair it with afterRequest and hijackSaveHTTPFlow to decrypt responses and store plaintext in the history database.

Can multiple global hot-patch scripts run at the same time?▼

No, only one global hot-patch can be enabled at a time in Yakit. If you need multiple behaviors, combine them into a single script using different hook functions within that one patch.

Why does my global hot-patch crash under concurrent requests?▼

Crashes usually come from writing to shared mutable global variables inside hooks, causing data races. Keep top-level globals read-only and use sync.Map, sync.NewMutex, or db.* APIs for any cross-request state aggregation.