claude-automation-recommender
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseClaude Automation Recommender
Claude自动化推荐工具
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.
分析代码库模式,针对所有可扩展选项推荐定制化的Claude Code自动化方案。
本Skill为只读模式。 它仅分析代码库并输出推荐内容,不会创建或修改任何文件。用户可自行实施推荐方案,或单独请求Claude协助构建。
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
- 每个类型推荐1-2个:不要过度推荐,只列出每个类别中最有价值的1-2个自动化方案
- 如果用户指定特定类型:仅聚焦该类型并提供更多选项(3-5个推荐)
- 超越参考列表:参考文件包含常见模式,但需通过网络搜索找到针对代码库所用工具、框架和库的专属推荐
- 告知用户可请求更多:结尾需注明用户可针对任何特定类别请求更多推荐
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 |
| Plugins | Collections of skills that can be installed |
| MCP Servers | External tool integrations (databases, APIs, browsers, docs) |
| 类型 | 适用场景 |
|---|---|
| Hooks | 工具事件触发的自动操作(保存时格式化、代码检查、阻止编辑) |
| Subagents | 并行运行的专业评审/分析器 |
| Skills | 打包的专业能力、工作流和可重复任务(由Claude或用户通过 |
| Plugins | 可安装的Skills集合 |
| MCP Servers | 外部工具集成(数据库、API、浏览器、文档) |
Workflow
工作流
Phase 1: Codebase Analysis
阶段1:代码库分析
Gather project context:
bash
undefined收集项目上下文:
bash
undefinedDetect 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
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
检查依赖以推荐MCP服务器
cat package.json 2>/dev/null | grep -E '"(react|vue|angular|next|express|fastapi|django|prisma|supabase|stripe)"'
cat package.json 2>/dev/null | grep -E '"(react|vue|angular|next|express|fastapi|django|prisma|supabase|stripe)"'
Check for existing Claude Code config
检查现有Claude Code配置
ls -la .claude/ CLAUDE.md 2>/dev/null
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 | Documentation skills |ls -la src/ app/ lib/ tests/ components/ pages/ api/ 2>/dev/null
**需捕获的关键指标:**
| 类别 | 关注内容 | 为哪些推荐提供依据 |
|----------|------------------|----------------------------|
| 语言/框架 | package.json、pyproject.toml、导入模式 | Hooks、MCP服务器 |
| 前端技术栈 | React、Vue、Angular、Next.js | Playwright MCP、前端Skills |
| 后端技术栈 | 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服务器 |
| 问题追踪 | Linear、Jira引用 | 问题追踪MCP |
| 文档模式 | OpenAPI、JSDoc、文档字符串 | 文档Skills |Phase 2: Generate Recommendations
阶段2:生成推荐
Based on analysis, generate recommendations across all categories:
基于分析结果,为所有类别生成推荐:
A. MCP Server Recommendations
A. MCP服务器推荐
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 |
详情请参考references/mcp-servers.md。
| 代码库信号 | 推荐的MCP服务器 |
|---|---|
| 使用流行库(React、Express等) | context7 - 实时文档查询 |
| 前端有UI测试需求 | Playwright - 浏览器自动化/测试 |
| 使用Supabase | Supabase 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 Recommendations
B. Skills推荐
See references/skills-reference.md for details.
Create skills in . Some are also available via plugins:
.claude/skills/<name>/SKILL.md| 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 |
详情请参考references/skills-reference.md。
可在中创建Skills,部分也可通过插件安装:
.claude/skills/<name>/SKILL.md| 代码库信号 | Skill | 插件 |
|---|---|---|
| 构建插件 | skill-development | plugin-dev |
| Git提交 | commit | commit-commands |
| React/Vue/Angular | frontend-design | frontend-design |
| 自动化规则 | writing-rules | hookify |
| 功能规划 | feature-dev | feature-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 Recommendations
C. Hooks推荐
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 |
| PreToolUse: block |
| Lock files present | PreToolUse: block lock file edits |
| Security-sensitive code | PreToolUse: require confirmation |
配置详情请参考references/hooks-patterns.md。
| 代码库信号 | 推荐的Hook |
|---|---|
| 已配置Prettier | PostToolUse: 编辑后自动格式化 |
| 已配置ESLint/Ruff | PostToolUse: 编辑后自动代码检查 |
| TypeScript项目 | PostToolUse: 编辑后自动类型检查 |
| 存在tests目录 | PostToolUse: 运行相关测试 |
存在 | PreToolUse: 阻止编辑 |
| 存在锁文件 | PreToolUse: 阻止编辑锁文件 |
| 安全敏感代码 | PreToolUse: 需确认后操作 |
D. Subagent Recommendations
D. Subagents推荐
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 |
模板详情请参考references/subagent-templates.md。
| 代码库信号 | 推荐的Subagent |
|---|---|
| 大型代码库(>500个文件) | code-reviewer - 并行代码评审 |
| 认证/支付代码 | security-reviewer - 安全审计 |
| API项目 | api-documenter - OpenAPI生成 |
| 性能关键型项目 | performance-analyzer - 瓶颈检测 |
| 前端主导项目 | ui-reviewer - 可访问性评审 |
| 需要更多测试 | test-writer - 测试生成 |
E. Plugin Recommendations
E. Plugins推荐
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 |
可用插件详情请参考references/plugins-reference.md。
| 代码库信号 | 推荐的Plugin |
|---|---|
| 通用生产力提升 | anthropic-agent-skills - 核心Skills集合 |
| 文档工作流 | 安装docx、xlsx、pdf相关Skills |
| 前端开发 | frontend-design插件 |
| 构建AI工具 | mcp-builder用于MCP开发 |
Phase 3: Output Recommendations Report
阶段3:输出推荐报告
Format recommendations clearly. Only include 1-2 recommendations per category - the most valuable ones for this specific codebase. Skip categories that aren't relevant.
markdown
undefined清晰格式化推荐内容。每个类别仅包含1-2个推荐——针对该特定代码库最有价值的方案。跳过不相关的类别。
markdown
undefinedClaude Code Automation Recommendations
Claude Code自动化推荐
I've analyzed your codebase and identified the top automations for each category. Here are my top 1-2 recommendations per type:
我已分析您的代码库,并确定了每个类别的顶级自动化方案。以下是每个类型的1-2个首选推荐:
Codebase Profile
代码库概况
- Type: [detected language/runtime]
- Framework: [detected framework]
- Key Libraries: [relevant libraries detected]
- 类型:[检测到的语言/运行时]
- 框架:[检测到的框架]
- 核心库:[检测到的相关库]
🔌 MCP Servers
🔌 MCP服务器
context7
context7
Why: [specific reason based on detected libraries]
Install:
claude mcp add context7原因:[基于检测到的库的具体原因]
安装:
claude mcp add context7🎯 Skills
🎯 Skills
[skill name]
[Skill名称]
Why: [specific reason]
Create:
Invocation: User-only / Both / Claude-only
Also available in: [plugin-name] plugin (if applicable)
.claude/skills/[name]/SKILL.mdyaml
---
name: [skill-name]
description: [what it does]
disable-model-invocation: true # for user-only
---原因:[具体原因]
创建路径:
调用方式:仅用户 / 两者均可 / 仅Claude
也可通过以下插件获取:[插件名称](如适用)
.claude/skills/[name]/SKILL.mdyaml
---
name: [skill-name]
description: [功能描述]
disable-model-invocation: true # 仅用户调用时设置
---⚡ Hooks
⚡ Hooks
[hook name]
[Hook名称]
Why: [specific reason based on detected config]
Where:
.claude/settings.json原因:[基于检测到的配置的具体原因]
配置位置:
.claude/settings.json🤖 Subagents
🤖 Subagents
[agent name]
[Agent名称]
Why: [specific reason based on codebase patterns]
Where:
.claude/agents/[name].mdWant 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.
undefined原因:[基于代码库模式的具体原因]
配置位置:
.claude/agents/[name].md需要更多推荐? 可针对任何特定类别请求更多推荐(例如:"显示更多MCP服务器选项"或"还有哪些Hooks有帮助?")。
需要协助实施? 随时告知,我可以帮您设置上述任何推荐方案。
undefinedDecision Framework
决策框架
When to Recommend MCP Servers
何时推荐MCP服务器
- External service integration needed (databases, APIs)
- Documentation lookup for libraries/SDKs
- Browser automation or testing
- Team tool integration (GitHub, Linear, Slack)
- Cloud infrastructure management
- 需要集成外部服务(数据库、API)
- 需要查询库/SDK的文档
- 浏览器自动化或测试
- 团队工具集成(GitHub、Linear、Slack)
- 云基础设施管理
When to Recommend Skills
何时推荐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:
- — User-only (for side effects: deploy, commit, send)
disable-model-invocation: true - — Claude-only (for background knowledge)
user-invocable: false - Default (omit both) — Both can invoke
- 文档生成(docx、xlsx、pptx、pdf — 也可通过插件获取)
- 频繁重复的提示或工作流
- 带参数的项目特定任务
- 将模板或脚本应用于任务(Skills可捆绑支持文件)
- 通过调用的快速操作
/skill-name - 需要隔离运行的工作流()
context: fork
调用控制:
- — 仅用户调用(适用于有副作用的操作:部署、提交、发送)
disable-model-invocation: true - — 仅Claude调用(适用于背景知识类任务)
user-invocable: false - 默认(不设置以上两项) — 两者均可调用
When to Recommend Hooks
何时推荐Hooks
- Repetitive post-edit actions (formatting, linting)
- Protection rules (block sensitive file edits)
- Validation checks (tests, type checks)
- 重复的编辑后操作(格式化、代码检查)
- 保护规则(阻止敏感文件编辑)
- 验证检查(测试、类型检查)
When to Recommend Subagents
何时推荐Subagents
- Specialized expertise needed (security, performance)
- Parallel review workflows
- Background quality checks
- 需要专业领域能力(安全、性能)
- 并行评审工作流
- 后台质量检查
When to Recommend Plugins
何时推荐Plugins
- Need multiple related skills
- Want pre-packaged automation bundles
- Team-wide standardization
- 需要多个相关Skills
- 希望使用预打包的自动化集合
- 团队范围内的标准化
Configuration Tips
配置技巧
MCP Server Setup
MCP服务器设置
Team sharing: Check into repo so entire team gets same MCP servers
.mcp.jsonDebugging: Use flag to identify configuration issues
--mcp-debugPrerequisites to recommend:
- GitHub CLI () - enables native GitHub operations
gh - Puppeteer/Playwright CLI - for browser MCP servers
团队共享:将提交到仓库,确保整个团队使用相同的MCP服务器
.mcp.json调试:使用标志识别配置问题
--mcp-debug推荐的前置依赖:
- GitHub CLI () - 支持原生GitHub操作
gh - Puppeteer/Playwright CLI - 用于浏览器MCP服务器
Headless Mode (for CI/Automation)
无头模式(适用于CI/自动化)
Recommend headless Claude for automated pipelines:
bash
undefined推荐在自动化流水线中使用无头Claude:
bash
undefinedPre-commit hook example
提交前Hook示例
claude -p "fix lint errors in src/" --allowedTools Edit,Write
claude -p "修复src/中的代码检查错误" --allowedTools Edit,Write
CI pipeline with structured output
带结构化输出的CI流水线
claude -p "<prompt>" --output-format stream-json | your_command
undefinedclaude -p "<prompt>" --output-format stream-json | your_command
undefinedPermissions for Hooks
Hooks权限
Configure allowed tools in :
.claude/settings.jsonjson
{
"permissions": {
"allow": ["Edit", "Write", "Bash(npm test:*)", "Bash(git commit:*)"]
}
}在中配置允许的工具:
.claude/settings.jsonjson
{
"permissions": {
"allow": ["Edit", "Write", "Bash(npm test:*)", "Bash(git commit:*)"]
}
}