mcpField
C
claude-automation-recommender

claude-automation-recommender

github.com/anthropicsAgent 工作流45.1k9.5k 次安装1 天前更新
代码仓库

关于 claude-automation-recommender

这是一个只读的 Claude Code skill,会分析代码库并推荐适用的自动化方案,包括 hooks、subagents、skills、plugins 和 MCP 服务。它帮助团队筛选适合项目的选项,但不会创建或修改文件。

主要功能

  1. 01分析代码库模式
  2. 02推荐五类自动化方案
  3. 03按项目工具定制建议
  4. 04优先列出少量方案

适用场景

  1. 01评估代码库的自动化选项
  2. 02为现有工具寻找适用 hooks
  3. 03查找相关 MCP 集成
  4. 04在不改文件的情况下规划 Claude Code 配置

MCP 相关

它根据代码库特征推荐 MCP 服务,例如数据库、文档查询和团队工具集成;不会创建或配置这些服务。

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/anthropics/claude-plugins-official --skill claude-automation-recommender

安装后在 Claude Code 中输入/claude-automation-recommender确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

references/
hooks-patterns.md
mcp-servers.md
plugins-reference.md
skills-reference.md
subagent-templates.md

详细介绍

Claude Automation Recommender

分析代码库模式,针对所有可扩展性选项推荐量身定制的 Claude Code 自动化方案。

此技能为只读。 它会分析代码库并输出建议,不会创建或修改任何文件。用户需自行实施这些建议,或另行要求 Claude 协助构建。

输出准则

  • 每种类型推荐 1-2 个:不要过度堆砌——每个类别只展示最有价值的 1-2 个自动化方案
  • 如果用户要求特定类型:只聚焦该类型,并提供更多选项(3-5 条建议)
  • 不要局限于参考列表:参考文件包含常见模式,但请使用网络搜索查找针对代码库所用工具、框架和库的特定建议
  • 告知用户可索取更多:结尾时说明他们可以针对任何特定类别索取更多建议

自动化类型概览

类型最适合
Hooks对工具事件自动执行操作(保存时格式化、lint、阻止编辑)
Subagents并行运行的专用审查器/分析器
Skills打包好的专业知识、工作流和可重复任务(由 Claude 或用户通过 /skill-name 调用)
Plugins可安装的技能集合
MCP Servers外部工具集成(数据库、API、浏览器、文档)

工作流

阶段 1:代码库分析

收集项目上下文:

# Detect project type and tools
ls -la package.json pyproject.toml Cargo.toml go.mod pom.xml 2>/dev/null
cat package.json 2>/dev/null | head -50

# Check dependencies for MCP server recommendations
cat package.json 2>/dev/null | grep -E '"(react|vue|angular|next|express|fastapi|django|prisma|supabase|convex|stripe)"'

# Check for existing Claude Code config
ls -la .claude/ CLAUDE.md 2>/dev/null

# Analyze project structure
ls -la src/ app/ lib/ tests/ components/ pages/ api/ 2>/dev/null

需要捕捉的关键指标:

类别要查找的内容影响哪些方面的建议
语言/框架package.json、pyproject.toml、导入模式Hooks、MCP 服务
前端技术栈React、Vue、Angular、Next.jsPlaywright MCP、前端技能
后端技术栈Express、FastAPI、DjangoAPI 文档工具
数据库Prisma、Supabase、Convex、原生 SQL数据库 / 后端 MCP 服务
外部 APIStripe、OpenAI、AWS SDK用于文档的 context7 MCP
测试Jest、pytest、Playwright 配置测试 Hooks、Subagents
CI/CDGitHub Actions、CircleCIGitHub MCP 服务
问题跟踪Linear、Jira 相关引用问题跟踪器 MCP
文档模式OpenAPI、JSDoc、docstrings文档技能
阶段 2:生成建议

基于分析,跨所有类别生成建议:

A. MCP 服务建议

详细模式见 references/mcp-servers.md。

代码库信号推荐的 MCP 服务
使用流行库(React、Express 等)context7 - 实时文档查询
前端且有 UI 测试需求Playwright - 浏览器自动化/测试
使用 SupabaseSupabase MCP - 直接数据库操作
使用 ConvexConvex MCP - 实时部署自省、运行查询/变更、管理环境变量和日志
PostgreSQL/MySQL 数据库Database MCP - 查询和模式工具
GitHub 仓库GitHub MCP - 问题、PR、Actions
使用 Linear 管理问题Linear MCP - 问题管理
AWS 基础设施AWS MCP - 云资源管理
Slack 工作区Slack MCP - 团队通知
记忆/上下文持久化Memory MCP - 跨会话记忆
Sentry 错误跟踪Sentry MCP - 错误调查
Docker 容器Docker MCP - 容器管理
B. Skills 建议

详见 references/skills-reference.md。

在 .claude/skills/<name>/SKILL.md 中创建 skills。部分 skills 也可通过插件获取:

代码库信号Skill插件
构建插件skill-developmentplugin-dev
Git 提交commitcommit-commands
React/Vue/Angularfrontend-designfrontend-design
自动化规则writing-ruleshookify
功能规划feature-devfeature-dev

需要创建的自定义 skills(含模板、脚本、示例):

代码库信号要创建的 Skill调用方式
API 路由api-doc(含 OpenAPI 模板)两者均可
数据库项目create-migration(含校验脚本)仅用户
测试套件gen-test(含示例测试)仅用户
组件库new-component(含模板)仅用户
PR 工作流pr-check(含检查清单)仅用户
发布release-notes(含 git 上下文)仅用户
代码风格project-conventions仅 Claude
上手引导setup-dev(含前置依赖脚本)仅用户
C. Hooks 建议

配置详见 references/hooks-patterns.md。

代码库信号推荐的 Hook
已配置 PrettierPostToolUse:编辑时自动格式化
已配置 ESLint/RuffPostToolUse:编辑时自动 lint
TypeScript 项目PostToolUse:编辑时类型检查
存在 tests 目录PostToolUse:运行相关测试
存在 .env 文件PreToolUse:阻止 .env 编辑
存在 lock 文件PreToolUse:阻止 lock 文件编辑
安全敏感代码PreToolUse:要求确认
D. Subagent 建议

模板详见 references/subagent-templates.md。

代码库信号推荐的 Subagent
大型代码库(>500 个文件)code-reviewer - 并行代码审查
认证/支付代码security-reviewer - 安全审计
API 项目api-documenter - 生成 OpenAPI
性能关键performance-analyzer - 瓶颈检测
前端为主ui-reviewer - 无障碍审查
需要更多测试test-writer - 生成测试
E. 插件建议

可用插件详见 references/plugins-reference.md。

代码库信号推荐的插件
通用效率提升anthropic-agent-skills - 核心 skills 合集
文档工作流安装 docx、xlsx、pdf skills
前端开发frontend-design 插件
构建 AI 工具用 mcp-builder 进行 MCP 开发
阶段 3:输出建议报告

清晰地组织建议格式。每个类别只包含 1-2 条建议 - 即对此特定代码库最有价值的建议。跳过不相关的类别。

## Claude Code Automation Recommendations

I've analyzed your codebase and identified the top automations for each category. Here are my top 1-2 recommendations per type:

### Codebase Profile
- **Type**: [detected language/runtime]
- **Framework**: [detected framework]
- **Key Libraries**: [relevant libraries detected]

---

### 🔌 MCP Servers

#### context7
**Why**: [specific reason based on detected libraries]
**Install**: `claude mcp add context7`

---

### 🎯 Skills

#### [skill name]
**Why**: [specific reason]
**Create**: `.claude/skills/[name]/SKILL.md`
**Invocation**: User-only / Both / Claude-only
**Also available in**: [plugin-name] plugin (if applicable)
```yaml
---
name: [skill-name]
description: [what it does]
disable-model-invocation: true  # for user-only
---

⚡ Hooks
[hook 名称]

原因:[基于检测到的配置的具体原因] 位置:.claude/settings.json


🤖 Subagents
[agent 名称]

原因:[基于代码库模式的具体原因] 位置:.claude/agents/[name].md


想要更多? 可针对任意特定类别索取更多建议(例如,“给我展示更多 MCP 服务选项”或“还有哪些 hooks 会有帮助?”)。

需要帮助实施这些建议? 只需开口,我可以帮你设置上述任何建议。


## Decision Framework

### When to Recommend MCP Servers
- External service integration needed (databases, APIs)
- Documentation lookup for libraries/SDKs
- Browser automation or testing
- Team tool integration (GitHub, Linear, Slack)
- Cloud infrastructure management

### When to Recommend Skills

- Document generation (docx, xlsx, pptx, pdf — also in plugins)
- Frequently repeated prompts or workflows
- Project-specific tasks with arguments
- Applying templates or scripts to tasks (skills can bundle supporting files)
- Quick actions invoked with `/skill-name`
- Workflows that should run in isolation (`context: fork`)

**Invocation control:**
- `disable-model-invocation: true` — User-only (for side effects: deploy, commit, send)
- `user-invocable: false` — Claude-only (for background knowledge)
- Default (omit both) — Both can invoke

### When to Recommend Hooks
- Repetitive post-edit actions (formatting, linting)
- Protection rules (block sensitive file edits)
- Validation checks (tests, type checks)

### When to Recommend Subagents
- Specialized expertise needed (security, performance)
- Parallel review workflows
- Background quality checks

### When to Recommend Plugins
- Need multiple related skills
- Want pre-packaged automation bundles
- Team-wide standardization

---

## Configuration Tips

### MCP Server Setup

**Team sharing**: Check `.mcp.json` into repo so entire team gets same MCP servers

**Debugging**: Use `--mcp-debug` flag to identify configuration issues

**Prerequisites to recommend:**
- GitHub CLI (`gh`) - enables native GitHub operations
- Puppeteer/Playwright CLI - for browser MCP servers

### Headless Mode (for CI/Automation)

Recommend headless Claude for automated pipelines:

```bash
# Pre-commit hook example
claude -p "fix lint errors in src/" --allowedTools Edit,Write

# CI pipeline with structured output
claude -p "<prompt>" --output-format stream-json | your_command
Hooks 的权限

在 .claude/settings.json 中配置允许的工具:

{
  "permissions": {
    "allow": ["Edit", "Write", "Bash(npm test:*)", "Bash(git commit:*)"]
  }
}

评论

支持 Markdown