catalog/repos/adrianbrowning--agent-skills.md

59 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

2026-04-07 11:44:56 +08:00
# Claude代理技能集
`Claude Code` `AI代理` `技能插件` `钩子`
# adrianbrowning/agent-skills
我常用工具的代理技能集。
使用以下命令安装:
```sh
pnpm dlx skills add adrianbrowning/agent-skills
```
然后选择你需要的技能。
## 钩子hooks
- https://github.com/anthropics/claude-code/tree/main/plugins/hookify
- /plugin install hookify@claude-code-plugins
- https://paddo.dev/blog/claude-code-hooks-guardrails/
- https://mays.co/optimizing-claude-code#hooks-active-enforcement
`hooks/*` 中的文件复制到本地的 `~/.claude``<项目根目录>/.claude`
### UserPromptSubmit用户提示提交
```json
{
"hooks": {
"UserPromptSubmit": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "node /Users/<home>/.claude/hooks/user-prompt-skill-eval.ts",
"timeout": 5
}
]
}
]
}
}
```
### PreToolUse工具使用前
```JSON
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "~/.claude/hooks/block-dangerous-git.sh"
}
]
}
]
```