AgentSkillsCN

git-performance-issue-investigator

当用户需要通过查找特定代码变更、识别负责提交的commit,并联系作者,来调查Git仓库中的性能问题时,此技能会因涉及查找包含特定变量或代码模式的commit、识别最早/引入的commit、提取作者信息(姓名、邮箱),以及就性能问题进行沟通而被触发。该技能提供了一系列功能:使用git log -S搜索Git历史中的特定代码模式,通过git show获取完整的commit详情,提取作者元数据,并借助模板生成格式化的沟通内容。

SKILL.md
--- frontmatter
name: git-performance-issue-investigator
description: When the user needs to investigate performance issues in a Git repository by finding specific code changes, identifying responsible commits, and contacting authors. This skill is triggered by requests involving finding commits containing specific variables or code patterns, identifying earliest/introducing commits, extracting author information (name, email), and communicating about performance issues. It provides capabilities for searching Git history for specific code patterns using git log -S, retrieving full commit details with git show, extracting author metadata, and generating formatted communications using templates.

Instructions

Overview

This skill investigates performance issues in Git repositories by tracing code changes to specific commits, identifying responsible authors, and generating communications.

Core Workflow

1. Initialize Investigation

  • Identify the target Git repository path in the workspace
  • Confirm the specific code pattern or variable name to search for (e.g., remove_caching_layer)
  • Locate any communication templates in the workspace (e.g., template.txt)

2. Find Introducing Commit

Use git log with the -S flag to search for the earliest commit containing the specified code pattern: