AgentSkillsCN

suggest-automations

分析近期的 Git 历史记录与 Claude Code 的各项功能,为您推荐能够自动执行重复性工作的全新钩子、技能、智能体或插件。

SKILL.md
--- frontmatter
name: suggest-automations
description: Analyzes recent git history and Claude Code features to suggest new hooks, skills, agents, or plugins that could automate repetitive work.
allowed-tools:
  - Read
  - Bash
  - Grep
  - Glob
  - WebSearch
  - WebFetch
  - Task

/suggest-automations

Reviews your recent work patterns and Claude Code capabilities to suggest automation opportunities. Run periodically (weekly/monthly) to continuously improve your workflow.


Step 1: Analyze Recent Git History

Get the last 50 commits with file changes:

bash
git log --oneline --stat -50 | head -200

Look for patterns:

  • Repetitive file edits (same files touched multiple times)
  • Batch operations (many similar changes in one commit)
  • Manual fixes (commits mentioning "fix", "update", "correct")
  • Review cycles (multiple review/refinement commits)

Step 2: Categorize Work Patterns

Group commits into categories:

CategoryAutomation Potential
Content editing (wording, tone)Medium - LLM review skills
Parameter/variable updatesHigh - Automated validation
Image managementHigh - Generation scripts
Link/reference fixesHigh - Validation hooks
Structural changesLow - Needs human judgment
Publication workflowHigh - CI/CD automation

Step 3: Review Existing Automation

Check what's already automated:

bash
# List existing skills
ls -la .claude/skills/*/SKILL.md

# List hooks
cat .claude/settings.json

# List scripts
ls scripts/*.py scripts/*.ts | head -30

Identify gaps between work patterns and existing automation.


Step 4: Research Claude Code Features

Search for new Claude Code features that could help:

Use WebSearch to find:

  • "Claude Code hooks 2026 new features"
  • "Claude Code plugins marketplace"
  • "Claude Code MCP servers"
  • "Claude Code background tasks automation"

Check official docs:


Step 5: Generate Recommendations

For each work pattern, suggest specific automations:

Hook Opportunities

TriggerPattern to MatchAction
PostToolUseEdit|Write on *.qmdRun pre-render validation
PostToolUseEdit on parameters.pyRegenerate _variables.yml
PreToolUseWrite to sensitive filesRequire confirmation

Skill Opportunities

Skill NamePurposeWhen to Use
/batch-fix-XFix all instances of pattern XWeekly maintenance
/chapter-polishFull review of single chapterBefore publication
/sync-configsUpdate all _quarto-*.yml filesAfter metadata changes

Agent Opportunities

AgentToolsPurpose
citation-finderWebSearch, Read, EditFind and add missing citations
image-auditorRead, Glob, BashCheck image quality/metadata
link-checkerRead, WebFetchValidate all external links

MCP Server Opportunities

ServerCapabilityUse Case
Reference managerQuery Zotero/MendeleyAuto-import citations
Image generatorDirect API accessGenerate images without scripts
Task queuePersistent task listCross-session work tracking

Step 6: Prioritize Recommendations

Rank by:

  1. Frequency - How often does this work happen?
  2. Time savings - How much time would automation save?
  3. Error reduction - Would automation prevent mistakes?
  4. Implementation effort - How hard is it to build?

Focus on high-frequency, high-savings, low-effort automations first.


Step 7: Create Implementation Plan

For top 3 recommendations, provide:

  1. What: Specific hook/skill/agent to create
  2. Why: Work pattern it addresses
  3. How: Implementation steps
  4. Code: Draft implementation

Output Format

Generate a report:

markdown
# Automation Recommendations

## Work Pattern Analysis
[Summary of recent git activity]

## Current Automation Coverage
[List of existing skills/hooks and what they cover]

## Gaps Identified
[Work patterns not covered by automation]

## Recommendations

### 1. [Highest Priority]
- **Type**: Hook/Skill/Agent/MCP
- **Pattern**: [What work it automates]
- **Savings**: [Estimated time/effort saved]
- **Implementation**: [Steps to build]

### 2. [Second Priority]
...

### 3. [Third Priority]
...

## Next Steps
[Actionable items to implement recommendations]

Example Findings

From analyzing a typical book project:

High-value automations found:

  1. PostToolUse hook for QMD edits - Auto-run pre-render validation after every edit
  2. Citation finder agent - When writing claims, auto-search for supporting sources
  3. Image metadata skill - Batch update alt text and metadata for accessibility
  4. Stale content alert - Weekly report of files not updated in 30+ days

Already well-automated:

  • Parameter generation
  • PDF validation
  • Section image generation

Needs human judgment:

  • Chapter restructuring
  • Tone/voice decisions
  • Strategic content choices