Claude Automation Recommender
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.
Output Guidelines
- - Recommend 1-2 of each type: Don't overwhelm - surface the top 1-2 most valuable automations per category
- If user asks for a specific type: Focus only on that type and provide more options (3-5 recommendations)
- Go beyond the reference lists: The reference files contain common patterns, but use web search to find recommendations specific to the codebase's tools, frameworks, and libraries
- Tell users they can ask for more: End by noting they can request more recommendations for any specific category
Automation Types Overview
| 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) |
Workflow
Phase 1: Codebase Analysis
Gather project context:
CODEBLOCK0
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 | Documentation skills |
Phase 2: Generate Recommendations
Based on analysis, generate recommendations across all categories:
A. MCP Server Recommendations
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 |
Sentry MCP - Error investigation |
| Docker containers |
Docker MCP - Container management |
B. Skills Recommendations
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 |
setup-dev (with prereq script) | User-only |
C. Hooks Recommendations
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 |
D. Subagent Recommendations
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 |
E. Plugin Recommendations
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 |
Phase 3: Output Recommendations Report
Format recommendations clearly. Only include 1-2 recommendations per category - the most valuable ones for this specific codebase. Skip categories that aren't relevant.
CODEBLOCK1 yaml
name: [skill-name]
description: [what it does]
disable-model-invocation: true # for user-only
CODEBLOCK2
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 INLINECODE4
- Workflows that should run in isolation (
context: fork)
Invocation control:
- -
disable-model-invocation: true — User-only (for side effects: deploy, commit, send) - INLINECODE7 — 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:
CODEBLOCK3
Permissions for Hooks
Configure allowed tools in .claude/settings.json:
CODEBLOCK4
Claude 自动化推荐器
分析代码库模式,为所有可扩展性选项推荐量身定制的 Claude Code 自动化方案。
此技能为只读。 它分析代码库并输出建议。它不会创建或修改任何文件。用户自行实施建议,或单独要求 Claude 帮助构建。
输出指南
- - 每种类型推荐 1-2 个:不要让人应接不暇——每类只展示最有价值的 1-2 个自动化方案
- 如果用户要求特定类型:仅关注该类型并提供更多选项(3-5 个建议)
- 超越参考列表:参考文件包含常见模式,但应使用网络搜索查找针对代码库工具、框架和库的特定建议
- 告知用户可要求更多:最后说明他们可以要求任何特定类别的更多建议
自动化类型概览
| 类型 | 最适合 |
|---|
| 钩子 | 工具事件上的自动操作(保存时格式化、代码检查、阻止编辑) |
| 子代理 |
并行运行的专业审查员/分析员 |
|
技能 | 打包的专业知识、工作流和可重复任务(由 Claude 或用户通过 /skill-name 调用) |
|
插件 | 可安装的技能集合 |
|
MCP 服务器 | 外部工具集成(数据库、API、浏览器、文档) |
工作流程
阶段 1:代码库分析
收集项目上下文:
bash
检测项目类型和工具
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, 导入模式 | 钩子, MCP 服务器 |
| 前端技术栈 |
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 配置 | 测试钩子, 子代理 |
| CI/CD | GitHub Actions, CircleCI | GitHub MCP 服务器 |
| 问题跟踪 | Linear, Jira 引用 | 问题跟踪器 MCP |
| 文档模式 | OpenAPI, JSDoc, 文档字符串 | 文档技能 |
阶段 2:生成建议
基于分析,在所有类别中生成建议:
A. MCP 服务器建议
详见 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 - 容器管理 |
B. 技能建议
详见 references/skills-reference.md。
在 .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(含前置条件脚本) | 仅用户 |
C. 钩子建议
详见 references/hooks-patterns.md 中的配置。
| 代码库信号 | 推荐的钩子 |
|---|
| 已配置 Prettier | PostToolUse:编辑时自动格式化 |
| 已配置 ESLint/Ruff |
PostToolUse:编辑时自动代码检查 |
| TypeScript 项目 | PostToolUse:编辑时类型检查 |
| 存在测试目录 | PostToolUse:运行相关测试 |
| 存在 .env 文件 | PreToolUse:阻止编辑 .env |
| 存在锁定文件 | PreToolUse:阻止编辑锁定文件 |
| 安全敏感代码 | PreToolUse:要求确认 |
D. 子代理建议
详见 references/subagent-templates.md 中的模板。
| 代码库信号 | 推荐的子代理 |
|---|
| 大型代码库(>500 个文件) | code-reviewer - 并行代码审查 |
| 认证/支付代码 |
security-reviewer - 安全审计 |
| API 项目 |
api-documenter - OpenAPI 生成 |
| 性能关键 |
performance-analyzer - 瓶颈检测 |
| 前端为主 |
ui-reviewer - 无障碍审查 |
| 需要更多测试 |
test-writer - 测试生成 |
E. 插件建议
详见 references/plugins-reference.md 中的可用插件。
| 代码库信号 | 推荐的插件 |
|---|
| 通用生产力 | anthropic-agent-skills - 核心技能包 |
| 文档工作流 |
安装 docx, xlsx, pdf 技能 |
| 前端开发 |
frontend-design 插件 |
| 构建 AI 工具 |
mcp-builder 用于 MCP 开发 |
阶段 3:输出建议报告
清晰格式化建议。每类仅包含 1-2 个建议——针对此特定代码库最有价值的。跳过不相关的类别。
markdown
Claude Code 自动化建议
我已分析您的代码库,并为每个类别确定了最佳自动化方案。以下是每种类型的 1-2 个最佳建议:
代码库概况
- - 类型:[检测到的语言/运行时]
- 框架:[检测到的框架]
- 关键库:[检测到的相关库]
🔌 MCP 服务器
context7
原因:[基于检测到的库的特定原因]
安装:claude mcp add context7
🎯 技能
[技能名称]
原因:[特定原因]
创建:.claude/skills/[name]/SKILL.md
调用方式:仅用户 / 两者均可 / 仅 Claude
也可在:[插件名称] 插件中获取(如适用)
yaml
name: [技能名称]
description: [功能描述]
disable-model-invocation: true # 仅用户
⚡ 钩子
[钩子名称]
原因:[基于检测到的配置的特定原因