Token导航 LogoToken导航TokenDH.com
开发只读github未标认证来源可访问许可证需确认审计异常

analyzing-git-sessions分析 git 会话

Agent Skill

analyzing-git-sessions 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

808

周安装

34

GitHub Stars

84

下载量

283
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:analyzing-git-sessions(分析 git 会话)
来源仓库:https://github.com/bitwarden/ai-plugins
仓库路径:skills/analyzing-git-sessions
安装命令:
npx skills add https://github.com/bitwarden/ai-plugins --skill analyzing-git-sessions
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/bitwarden/ai-plugins --skill analyzing-git-sessions

简介

用于生成指定时间范围内 Git 提交活动的结构化分析。

  • 支持按作者、路径或文件类型过滤变更内容。analyzing-git-sessions 属于开发类 Skill,可作为该场景下的辅助能力补充。
  • 输出包含统计信息和可选 diff 的详细报告。
  • 适用于代码审查、团队协作审计和发布前检查。
  • 需本地 Git 仓库访问权限和有效范围定义。

SKILL.md

Analyzing Git Sessions

Core Responsibility

Generate structured analysis of git activity for specified timeframe or commit range, including commit history, file changes, statistics, and optional diffs.

Inputs

Accept from user:

  • Time range: "last 2 hours", "since 10am", "today", "since 2025-10-23 14:00"
  • Commit range: "abc123..def456", "HEAD~5..HEAD", "feature-branch..main"
  • Optional filters: Specific paths, authors, or file types
  • Output depth: Concise (default), Detailed, or Code Review format

Working Process

Step 1: Parse and Validate Input

  1. Determine range type:

- Time-based: Parse relative or absolute time - Commit-based: Validate commit references exist - Branch-based: Resolve branch names to commits

  1. Validate git repository: git rev-parse --git-dir
  2. Check range has commits: git log <range> --oneline | head -1 If empty, inform user and exit.

Step 2: Extract Commit History

# Get all commits in range
git log <range> --oneline --no-decorate

# Get detailed commit info
git log <range> --format="%h|%an|%ar|%s" --no-decorate

# Count commits
git log <range> --oneline | wc -l

Store commit data for summary.

Step 3: Generate Statistics

Overall change statistics:

# Summary stats (insertions/deletions by file)
git diff <start>..<end> --stat

# Numeric stats for parsing
git diff <start>..<end> --numstat

# Count total changes
git diff <start>..<end> --shortstat

Author breakdown (if multiple authors):

git shortlog <start>..<end> -sn

File categorization:

  • Identify new files (show in status "A")
  • Identify deleted files (show in status "D")
  • Identify renamed files (show in status "R")
  • Modified files with change magnitude

Step 4: Identify Key Files for Detailed Analysis

Prioritization rules:

  1. Large changes (>100 lines modified): Always include
  2. New files: Include (especially if >50 lines)
  3. Deleted files: Note but don't diff
  4. Architecture files: build.gradle.kts, AndroidManifest.xml, module configs
  5. Test files: Flag separately for test coverage assessment

Extract key file list:

# Files changed with line counts
git diff <start>..<end> --numstat | sort -rn -k1 -k2

Limit to top 10 files by default to avoid context overflow.

Step 5: Generate Selective Diffs (Based on Depth)

Concise mode: No diffs, stats only

Detailed mode: Diffs for top 3-5 key files

git diff <start>..<end> -- path/to/key/file.kt

Code Review mode: Diffs for all modified files, grouped by module

# Group by directory
git diff <start>..<end> --name-only | cut -d'/' -f1-2 | sort -u

# Generate diffs per module
for module in modules; do
  git diff <start>..<end> -- $module/
done

Context overflow protection:

  • If >10 files changed significantly, limit to top 5 diffs
  • Warn user: "Showing top 5 files by change size. Request specific files for full diffs."

Step 6: Present Structured Summary

Format based on depth:

Concise Summary

## Git Session Summary

**Range**: <start-commit> to <end-commit> (<timeframe>)
**Commits**: X commits by Y author(s)
**Files Changed**: A modified, B added, C deleted
**Net Changes**: +X -Y lines

### Commits

- abc123 Commit message 1
- def456 Commit message 2
  ...

### Top Files Changed

1. path/to/file1.kt (+50 -20)
2. path/to/file2.kt (+30 -15)
   ...

Detailed Summary

Includes:

  • Full commit list with authors and timestamps
  • Complete file list with change stats
  • Author breakdown
  • Top 3-5 diffs for review

Code Review Format

## Code Review Summary

### Overview

- **PR Title**: [Suggested from commit messages]
- **Changes**: X files across Y modules
- **Scope**: [Inferred from changed files]

### Commits

[Formatted commit list suitable for PR description]

### Changes by Module

**Module: app**

- file1.kt: Description of changes
- file2.kt: Description of changes

**Module: core**
...

### Key Changes

[Diffs for significant modifications]

### Test Coverage

- Test files modified: X
- New tests added: ~Y

Output Guidelines

Commit Messages

  • Show short hash (7 chars)
  • Show first line of commit message only
  • Truncate long messages to 80 chars
  • Group by author if multiple contributors

File Paths

  • Use relative paths from repo root
  • Format as code: path/to/file.kt
  • Include line change magnitude: (+X -Y)
  • Highlight file type (source, test, config)

Statistics

Present in clear tables:

| Metric        | Count |
| ------------- | ----- |
| Commits       | 15    |
| Files Changed | 23    |
| Insertions    | +450  |
| Deletions     | -180  |

Diffs

  • Include file path as header: ### path/to/file.kt
  • Use code blocks with syntax highlighting
  • Show context lines (git default: 3 lines before/after)
  • Truncate very large diffs (>200 lines) with summary

Context Budget Management

Monitor diff sizes:

  • Small session (<10 files, <500 lines): Safe for detailed mode
  • Medium session (10-30 files, 500-2000 lines): Use selective diffs
  • Large session (>30 files, >2000 lines): Concise mode with warnings

Progressive disclosure:

  1. Always start with concise summary
  2. Ask user: "Would you like detailed diffs for specific files?"
  3. Generate diffs on demand rather than upfront

Fallback for large sessions: "This session modified 45 files with 5000+ line changes. Showing concise summary. Request specific files or modules for detailed diffs."

Anti-Patterns to Avoid

Don't:

  • Generate diffs for all files in large sessions (context overflow)
  • Include full diffs without asking (waste context on unneeded details)
  • Ignore file types (treat test changes same as source changes)
  • Lose context on what user wants to know
  • Use generic summaries ("modified 10 files") without specifics

Do:

  • Ask user what level of detail they need
  • Prioritize key files by change magnitude
  • Categorize files (source, test, config, docs)
  • Provide actionable summaries
  • Offer to drill down on specific files

Success Criteria

A good git session analysis should:

  1. Inform: User understands scope of changes at a glance
  2. Focus: Highlights most significant changes first
  3. Actionable: Provides paths and diffs for deeper review
  4. Efficient: Doesn't waste context on unnecessary details
  5. Adaptable: Adjusts depth based on session size and user needs

Example Outputs

See contexts/example-outputs.md for detailed examples of concise summaries and code review formats.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.75%
按下载量换算101

Claude

30.06%
按下载量换算85

Cursor

19.13%
按下载量换算54

Gemini CLI

8.35%
按下载量换算24

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

未通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills