mcpField
C
claude-automation-recommender

claude-automation-recommender

github.com/secondskyAgent 工作流480585 次安装4 周前更新
代码仓库

关于 claude-automation-recommender

这是一个只读的 Claude Code Skill,会分析代码库,并为 Hooks、子 Agent、Skills、插件和 MCP 服务推荐相关自动化方案。它帮助团队筛选适合项目的选项,但不会更改文件。

主要功能

  1. 01分析代码库模式
  2. 02推荐五类自动化
  3. 03优先展示重点建议
  4. 04结合项目工具定制建议
  5. 05不会修改文件

适用场景

  1. 01评估代码库的自动化方案
  2. 02为项目依赖查找 MCP 集成
  3. 03规划测试和 lint Hooks

MCP 相关

它根据代码库线索推荐 MCP 服务,例如数据库、文档、浏览器和团队工具,但不会配置或运行这些服务。

安装

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

$npx skills add https://github.com/secondsky/sap-skills --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 自动化推荐器

分析代码库中的模式,为 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|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、原始 SQL数据库 MCP 服务
外部 APIStripe、OpenAI、AWS SDK用于查阅文档的 context7 MCP
测试Jest、pytest、Playwright 配置测试 Hooks、Subagents
CI/CDGitHub Actions、CircleCIGitHub MCP 服务
问题跟踪Linear、Jira 引用问题跟踪器 MCP
文档模式OpenAPI、JSDoc、文档字符串文档技能
阶段 2:生成推荐

根据分析结果,生成涵盖所有类别的推荐:

A. MCP 服务推荐

详细模式请参阅 references/mcp-servers.md。

代码库信号推荐的 MCP 服务
使用热门库(React、Express 等)context7 - 实时查询文档
前端项目有 UI 测试需求Playwright - 浏览器自动化/测试
使用 SupabaseSupabase MCP - 直接执行数据库操作
PostgreSQL/MySQL 数据库Database MCP - 查询和架构工具
GitHub 仓库GitHub MCP - Issue、PR、Actions
使用 Linear 跟踪 IssueLinear MCP - Issue 管理
AWS 基础设施AWS MCP - 云资源管理
Slack 工作区Slack MCP - 团队通知
记忆/上下文持久化Memory MCP - 跨会话记忆
Sentry 错误跟踪Sentry MCP - 错误调查
Docker 容器Docker MCP - 容器管理
B. 技能建议

详情请参阅 references/skills-reference.md。

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

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

要创建的自定义技能(包含模板、脚本和示例):

代码库信号要创建的技能调用方式
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:编辑后进行类型检查
存在测试目录PostToolUse:运行相关测试
存在 .env 文件PreToolUse:阻止编辑 .env 文件
存在锁文件PreToolUse:阻止编辑锁文件
安全敏感代码PreToolUse:要求确认
D. 子 Agent 建议

模板请参阅 references/subagent-templates.md。

代码库信号推荐的子 Agent
大型代码库(>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 开发的 mcp-builder
第 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 name]

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


🤖 子 Agent
[agent name]

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


想了解更多? 可针对任何特定类别请求其他建议(例如,“展示更多 MCP 服务选项”或“还有哪些 Hook 会有帮助?”)。

需要帮助实现其中任何一项吗? 只需提出请求,我可以帮助你设置上述任何建议。

相关技能

  • dependency-upgrade:检测到依赖管理器、锁文件或 CI 升级工具时,建议并启用依赖加固工作流

## 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