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

59 lines
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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"
}
]
}
]
```