一键导入
yolop-hooks
Configure Yolop hooks from natural-language self-configuration requests, especially block, allow, mutate, or audit rules around tool calls.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Configure Yolop hooks from natural-language self-configuration requests, especially block, allow, mutate, or audit rules around tool calls.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | yolop-hooks |
| description | Configure Yolop hooks from natural-language self-configuration requests, especially block, allow, mutate, or audit rules around tool calls. |
| user-invocable | false |
Use this skill when the user asks Yolop to configure its own behavior with hooks, for example:
Hooks are real configuration. Do not treat these requests as memory or as a
soft preference. Use the hooks capability tools:
validate_hook.upsert_hook after validation succeeds.list_hooks to inspect current state or confirm effective config.remove_hook when the user asks to remove or disable a hook.Choose the narrowest scope that matches the request.
workspace when the user says "this repo", "this project",
"workspace", or references project policy.global when the user says "yolop", "your", "always", "everywhere",
or frames the rule as a personal preference.Block any Bash command that invokes git:
{
"id": "block-git",
"event": "pre_tool_use",
"matcher": {
"tool_name": "bash",
"args_jsonpath": "$.command",
"match_regex": "(^|[;&|()[:space:]])git([[:space:]]|$)"
},
"executor": {
"type": "bash",
"command": "printf '%s\\n' '{\"decision\":\"block\",\"reason\":\"git command blocked by hook\",\"user_message\":\"Blocked by your Yolop hook: git commands are disabled.\"}'"
},
"timeout_ms": 1000,
"on_error": "block",
"description": "Block bash commands that invoke git"
}
Block mutating git commands but allow read-only status/log/diff:
{
"id": "block-mutating-git",
"event": "pre_tool_use",
"matcher": {
"tool_name": "bash",
"args_jsonpath": "$.command",
"match_regex": "(^|[;&|()[:space:]])git[[:space:]]+(add|am|apply|bisect|branch|checkout|cherry-pick|clean|commit|fetch|merge|mv|pull|push|rebase|reset|restore|revert|rm|switch|tag)([[:space:]]|$)"
},
"executor": {
"type": "bash",
"command": "printf '%s\\n' '{\"decision\":\"block\",\"reason\":\"mutating git command blocked by hook\",\"user_message\":\"Blocked by your Yolop hook: mutating git commands are disabled.\"}'"
},
"timeout_ms": 1000,
"on_error": "block",
"description": "Block mutating git commands"
}
Block publishing commands:
{
"id": "block-publish",
"event": "pre_tool_use",
"matcher": {
"tool_name": "bash",
"args_jsonpath": "$.command",
"match_regex": "(^|[;&|()[:space:]])(cargo publish|npm publish|pnpm publish)([[:space:]]|$)"
},
"executor": {
"type": "bash",
"command": "printf '%s\\n' '{\"decision\":\"block\",\"reason\":\"publish command blocked by hook\",\"user_message\":\"Blocked by your Yolop hook: publish commands are disabled.\"}'"
},
"timeout_ms": 1000,
"on_error": "block",
"description": "Block package publishing commands"
}
Audit Bash commands without blocking:
{
"id": "audit-bash",
"event": "pre_tool_use",
"matcher": {
"tool_name": "bash"
},
"executor": {
"type": "bash",
"command": "printf '%s\\n' \"$EVERRUNS_HOOK_PAYLOAD_JSON\" >> .agents/hook-audit.jsonl && printf '%s\\n' '{\"decision\":\"allow\"}'"
},
"timeout_ms": 1000,
"on_error": "warn",
"description": "Append Bash tool calls to .agents/hook-audit.jsonl"
}
block-git, block-mutating-git, or
audit-bash; stable ids make overrides and removal possible.pre_tool_use for blocking or mutating model-authored tool calls.on_error: "block" for safety-critical hooks and on_error: "warn"
for audit hooks.hooks.json; hook scripts can read environment
variables at runtime.Cut a new yolop release. Prepares the release PR, runs publish-readiness checks, monitors CI publish to crates.io and the everruns Homebrew tap. Use when the user asks to release, cut a version, publish, or ship to crates.io / brew.
Write effective ast-grep patterns for the built-in `ast_grep` structural-search tool. Use when searching code by shape rather than text — call expressions, function/struct declarations, wrappers, imports — or when `grep_files` is too noisy, and when a pattern returns nothing or the wrong nodes.
Generate an original, clean joke on demand. Use when the user asks for a joke, wants something funny, or says they need cheering up.
Install, inspect, update, or search for Yolop skills in workspace and global scopes. Use when the user asks to manage skills, import a skill from a registry or GitHub, or upgrade skills.
View and change yolop's own configuration — default provider and model, per-provider API tokens and models, endpoint base URLs, attribution, and harness capabilities. Use when the user asks to configure yolop, set a default provider/model, store an API key, point at a custom endpoint, enable/disable capabilities, or asks "what is your config / what can you configure".
Built-in guide to using yolop — slash commands, keyboard shortcuts, CLI flags, tools, and session controls. Use when the user asks how yolop works, what commands or shortcuts are available, what yolop can do, or wants help using the terminal UI.