# 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//.claude/hooks/user-prompt-skill-eval.ts", "timeout": 5 } ] } ] } } ``` ### PreToolUse(工具使用前) ```JSON "PreToolUse": [ { "matcher": "Bash", "hooks": [ { "type": "command", "command": "~/.claude/hooks/block-dangerous-git.sh" } ] } ] ```