claude-automation-recommender by anthropics/claude-plugins-official
npx skills add https://github.com/anthropics/claude-plugins-official --skill claude-automation-recommender分析代码库模式,为所有可扩展选项推荐定制的 Claude Code 自动化方案。
此技能为只读。 它会分析代码库并输出推荐,但不会创建或修改任何文件。用户需自行实施推荐方案,或另行请求 Claude 帮助构建。
| 类型 | 最适合 |
|---|---|
| Hooks | 在工具事件上自动执行操作(保存时格式化、代码检查、阻止编辑) |
| Subagents | 并行运行的专用审查器/分析器 |
| Skills | 打包的专业知识、工作流和可重复任务(由 Claude 或用户通过 /技能名称 调用) |
| Plugins | 可安装的技能集合 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 外部工具集成(数据库、API、浏览器、文档) |
收集项目上下文:
# 检测项目类型和工具
ls -la package.json pyproject.toml Cargo.toml go.mod pom.xml 2>/dev/null
cat package.json 2>/dev/null | head -50
# 检查依赖项以获取 MCP 服务器推荐
cat package.json 2>/dev/null | grep -E '"(react|vue|angular|next|express|fastapi|django|prisma|supabase|stripe)"'
# 检查现有的 Claude Code 配置
ls -la .claude/ CLAUDE.md 2>/dev/null
# 分析项目结构
ls -la src/ app/ lib/ tests/ components/ pages/ api/ 2>/dev/null
需要捕获的关键指标:
| 类别 | 寻找什么 | 为以下推荐提供依据 |
|---|---|---|
| 语言/框架 | package.json, pyproject.toml, import 模式 | Hooks, MCP servers |
| 前端技术栈 | React, Vue, Angular, Next.js | Playwright MCP, 前端技能 |
| 后端技术栈 | Express, FastAPI, Django | API 文档工具 |
| 数据库 | Prisma, Supabase, 原始 SQL | 数据库 MCP 服务器 |
| 外部 API | Stripe, OpenAI, AWS SDKs | context7 MCP 用于文档 |
| 测试 | Jest, pytest, Playwright 配置 | 测试 hooks, subagents |
| CI/CD | GitHub Actions, CircleCI | GitHub MCP server |
| 问题跟踪 | Linear, Jira 引用 | 问题跟踪器 MCP |
| 文档模式 | OpenAPI, JSDoc, 文档字符串 | 文档技能 |
基于分析,为所有类别生成推荐:
详细模式请参见 references/mcp-servers.md。
| 代码库信号 | 推荐的 MCP 服务器 |
|---|---|
| 使用流行库(React, Express 等) | context7 - 实时文档查找 |
| 有 UI 测试需求的前端 | Playwright - 浏览器自动化/测试 |
| 使用 Supabase | Supabase MCP - 直接数据库操作 |
| PostgreSQL/MySQL 数据库 | Database MCP - 查询和模式工具 |
| GitHub 仓库 | GitHub MCP - 问题、PR、操作 |
| 使用 Linear 处理问题 | Linear MCP - 问题管理 |
| AWS 基础设施 | AWS MCP - 云资源管理 |
| Slack 工作区 | Slack MCP - 团队通知 |
| 内存/上下文持久化 | Memory MCP - 跨会话内存 |
| Sentry 错误跟踪 | Sentry MCP - 错误调查 |
| Docker 容器 | Docker MCP - 容器管理 |
在 .claude/skills/<名称>/SKILL.md 中创建技能。部分技能也可通过插件获得:
| 代码库信号 | 技能 | 插件 |
|---|---|---|
| 构建插件 | skill-development | plugin-dev |
| Git 提交 | commit | commit-commands |
| React/Vue/Angular | frontend-design | frontend-design |
| 自动化规则 | writing-rules | hookify |
| 功能规划 | feature-dev | feature-dev |
需要创建的自定义技能(包含模板、脚本、示例):
| 代码库信号 | 要创建的技能 | 调用方式 |
|---|---|---|
| API 路由 | api-doc(包含 OpenAPI 模板) | 两者皆可 |
| 数据库项目 | create-migration(包含验证脚本) | 仅用户 |
| 测试套件 | gen-test(包含示例测试) | 仅用户 |
| 组件库 | new-component(包含模板) | 仅用户 |
| PR 工作流 | pr-check(包含检查清单) | 仅用户 |
| 发布 | release-notes(包含 git 上下文) | 仅用户 |
| 代码风格 | project-conventions | 仅 Claude |
| 环境设置 | setup-dev(包含先决条件脚本) | 仅用户 |
配置信息请参见 references/hooks-patterns.md。
| 代码库信号 | 推荐的 Hook |
|---|---|
| 配置了 Prettier | PostToolUse: 编辑后自动格式化 |
| 配置了 ESLint/Ruff | PostToolUse: 编辑后自动检查 |
| TypeScript 项目 | PostToolUse: 编辑后类型检查 |
| 存在测试目录 | PostToolUse: 运行相关测试 |
存在 .env 文件 | PreToolUse: 阻止 .env 文件编辑 |
| 存在锁文件 | PreToolUse: 阻止锁文件编辑 |
| 安全敏感代码 | PreToolUse: 需要确认 |
| 代码库信号 | 推荐的 Subagent |
|---|---|
| 大型代码库(>500 文件) | code-reviewer - 并行代码审查 |
| 身份验证/支付代码 | security-reviewer - 安全审计 |
| API 项目 | api-documenter - OpenAPI 生成 |
| 性能关键 | performance-analyzer - 瓶颈检测 |
| 前端密集型 | ui-reviewer - 可访问性审查 |
| 需要更多测试 | test-writer - 测试生成 |
可用插件列表请参见 references/plugins-reference.md。
| 代码库信号 | 推荐的插件 |
|---|---|
| 通用生产力 | anthropic-agent-skills - 核心技能包 |
| 文档工作流 | 安装 docx, xlsx, pdf 技能 |
| 前端开发 | frontend-design 插件 |
| 构建 AI 工具 | mcp-builder 用于 MCP 开发 |
清晰地格式化推荐。每类别仅包含 1-2 项推荐——针对此特定代码库最有价值的那些。跳过不相关的类别。
## Claude Code 自动化推荐
我已分析您的代码库,并为每个类别确定了顶级的自动化方案。以下是我为每种类型推荐的 1-2 项最佳方案:
### 代码库概况
- **类型**: [检测到的语言/运行时]
- **框架**: [检测到的框架]
- **关键库**: [检测到的相关库]
---
### 🔌 MCP 服务器
#### context7
**理由**: [基于检测到的库的具体原因]
**安装**: `claude mcp add context7`
---
### 🎯 技能
#### [技能名称]
**理由**: [具体原因]
**创建**: `.claude/skills/[名称]/SKILL.md`
**调用方式**: 仅用户 / 两者皆可 / 仅 Claude
**也可通过**: [插件名称] 插件获得(如果适用)
```yaml
---
name: [技能名称]
description: [功能描述]
disable-model-invocation: true # 用于仅用户调用
---
理由: [基于检测到的配置的具体原因]
位置: .claude/settings.json
理由: [基于代码库模式的具体原因]
位置: .claude/agents/[名称].md
想要更多? 可以请求任何特定类别的额外推荐(例如,“给我看更多 MCP 服务器选项”或“还有什么 hooks 会有帮助?”)。
需要帮助实施这些方案吗? 只需提出,我可以帮助您设置上述任何推荐。
## 决策框架
### 何时推荐 MCP 服务器
- 需要外部服务集成(数据库、API)
- 需要库/SDK 的文档查找
- 浏览器自动化或测试
- 团队工具集成(GitHub、Linear、Slack)
- 云基础设施管理
### 何时推荐技能
- 文档生成(docx、xlsx、pptx、pdf——也包含在插件中)
- 频繁重复的提示或工作流
- 具有参数的项目特定任务
- 将模板或脚本应用于任务(技能可以捆绑支持文件)
- 通过 `/技能名称` 调用的快速操作
- 应在隔离环境中运行的工作流(`context: fork`)
**调用控制:**
- `disable-model-invocation: true` — 仅用户(用于副作用:部署、提交、发送)
- `user-invocable: false` — 仅 Claude(用于背景知识)
- 默认(两者都省略)— 两者皆可调用
### 何时推荐 Hooks
- 重复的编辑后操作(格式化、代码检查)
- 保护规则(阻止敏感文件编辑)
- 验证检查(测试、类型检查)
### 何时推荐 Subagents
- 需要专业知识(安全、性能)
- 并行审查工作流
- 后台质量检查
### 何时推荐插件
- 需要多个相关技能
- 想要预打包的自动化捆绑包
- 团队范围内的标准化
---
## 配置技巧
### MCP 服务器设置
**团队共享**:将 `.mcp.json` 提交到仓库,以便整个团队获得相同的 MCP 服务器
**调试**:使用 `--mcp-debug` 标志来识别配置问题
**推荐的先决条件:**
- GitHub CLI (`gh`) - 启用原生 GitHub 操作
- Puppeteer/Playwright CLI - 用于浏览器 MCP 服务器
### 无头模式(用于 CI/自动化)
为自动化流水线推荐无头 Claude:
```bash
# 预提交钩子示例
claude -p "修复 src/ 中的代码检查错误" --allowedTools Edit,Write
# 带有结构化输出的 CI 流水线
claude -p "<提示>" --output-format stream-json | your_command
在 .claude/settings.json 中配置允许的工具:
{
"permissions": {
"allow": ["Edit", "Write", "Bash(npm test:*)", "Bash(git commit:*)"]
}
}
每周安装次数
817
仓库
GitHub 星标
9.6K
首次出现
2026年1月21日
安全审计
安装于
claude-code694
codex657
opencode598
gemini-cli581
github-copilot533
cursor523
Analyze codebase patterns to recommend tailored Claude Code automations across all extensibility options.
This skill is read-only. It analyzes the codebase and outputs recommendations. It does NOT create or modify any files. Users implement the recommendations themselves or ask Claude separately to help build them.
| Type | Best For |
|---|---|
| Hooks | Automatic actions on tool events (format on save, lint, block edits) |
| Subagents | Specialized reviewers/analyzers that run in parallel |
| Skills | Packaged expertise, workflows, and repeatable tasks (invoked by Claude or user via /skill-name) |
| Plugins | Collections of skills that can be installed |
| MCP Servers | External tool integrations (databases, APIs, browsers, docs) |
Gather project context:
# 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|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
Key Indicators to Capture:
| Category | What to Look For | Informs Recommendations For |
|---|---|---|
| Language/Framework | package.json, pyproject.toml, import patterns | Hooks, MCP servers |
| Frontend stack | React, Vue, Angular, Next.js | Playwright MCP, frontend skills |
| Backend stack | Express, FastAPI, Django | API documentation tools |
| Database | Prisma, Supabase, raw SQL | Database MCP servers |
| External APIs | Stripe, OpenAI, AWS SDKs | context7 MCP for docs |
| Testing | Jest, pytest, Playwright configs | Testing hooks, subagents |
| CI/CD | GitHub Actions, CircleCI | GitHub MCP server |
| Issue tracking | Linear, Jira references | Issue tracker MCP |
| Docs patterns | OpenAPI, JSDoc, docstrings |
Based on analysis, generate recommendations across all categories:
See references/mcp-servers.md for detailed patterns.
| Codebase Signal | Recommended MCP Server |
|---|---|
| Uses popular libraries (React, Express, etc.) | context7 - Live documentation lookup |
| Frontend with UI testing needs | Playwright - Browser automation/testing |
| Uses Supabase | Supabase MCP - Direct database operations |
| PostgreSQL/MySQL database | Database MCP - Query and schema tools |
| GitHub repository | GitHub MCP - Issues, PRs, actions |
| Uses Linear for issues | Linear MCP - Issue management |
| AWS infrastructure | AWS MCP - Cloud resource management |
| Slack workspace | Slack MCP - Team notifications |
| Memory/context persistence | Memory MCP - Cross-session memory |
| Sentry error tracking |
See references/skills-reference.md for details.
Create skills in .claude/skills/<name>/SKILL.md. Some are also available via plugins:
| Codebase Signal | Skill | Plugin |
|---|---|---|
| Building plugins | skill-development | plugin-dev |
| Git commits | commit | commit-commands |
| React/Vue/Angular | frontend-design | frontend-design |
| Automation rules | writing-rules | hookify |
| Feature planning | feature-dev | feature-dev |
Custom skills to create (with templates, scripts, examples):
| Codebase Signal | Skill to Create | Invocation |
|---|---|---|
| API routes | api-doc (with OpenAPI template) | Both |
| Database project | create-migration (with validation script) | User-only |
| Test suite | gen-test (with example tests) | User-only |
| Component library | new-component (with templates) | User-only |
| PR workflow | pr-check (with checklist) | User-only |
| Releases | release-notes (with git context) | User-only |
| Code style | project-conventions | Claude-only |
| Onboarding | (with prereq script) |
See references/hooks-patterns.md for configurations.
| Codebase Signal | Recommended Hook |
|---|---|
| Prettier configured | PostToolUse: auto-format on edit |
| ESLint/Ruff configured | PostToolUse: auto-lint on edit |
| TypeScript project | PostToolUse: type-check on edit |
| Tests directory exists | PostToolUse: run related tests |
.env files present | PreToolUse: block .env edits |
| Lock files present | PreToolUse: block lock file edits |
| Security-sensitive code | PreToolUse: require confirmation |
See references/subagent-templates.md for templates.
| Codebase Signal | Recommended Subagent |
|---|---|
| Large codebase (>500 files) | code-reviewer - Parallel code review |
| Auth/payments code | security-reviewer - Security audits |
| API project | api-documenter - OpenAPI generation |
| Performance critical | performance-analyzer - Bottleneck detection |
| Frontend heavy | ui-reviewer - Accessibility review |
| Needs more tests | test-writer - Test generation |
See references/plugins-reference.md for available plugins.
| Codebase Signal | Recommended Plugin |
|---|---|
| General productivity | anthropic-agent-skills - Core skills bundle |
| Document workflows | Install docx, xlsx, pdf skills |
| Frontend development | frontend-design plugin |
| Building AI tools | mcp-builder for MCP development |
Format recommendations clearly. Only include 1-2 recommendations per category - the most valuable ones for this specific codebase. Skip categories that aren't relevant.
## 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
---
Why : [specific reason based on detected config] Where : .claude/settings.json
Why : [specific reason based on codebase patterns] Where : .claude/agents/[name].md
Want more? Ask for additional recommendations for any specific category (e.g., "show me more MCP server options" or "what other hooks would help?").
Want help implementing any of these? Just ask and I can help you set up any of the recommendations above.
## 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
Configure allowed tools in .claude/settings.json:
{
"permissions": {
"allow": ["Edit", "Write", "Bash(npm test:*)", "Bash(git commit:*)"]
}
}
Weekly Installs
817
Repository
GitHub Stars
9.6K
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
claude-code694
codex657
opencode598
gemini-cli581
github-copilot533
cursor523
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装
| Documentation skills |
| Sentry MCP - Error investigation |
| Docker containers | Docker MCP - Container management |
| User-only |