file-analyzer

当用户需要分析文件内容、统计文件信息、或对文件进行深度检查时使用此skill。它可以帮助分析文件结构、代码质量、文件大小等。

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 5, 2026

When & Why to Use This Skill

The File Analyzer skill empowers Claude to perform deep inspections of local files and directories, providing comprehensive insights into file structure, code quality, and metadata. By automating the process of reading, summarizing, and evaluating content, it delivers structured Markdown reports that help users understand complex codebases and large documents efficiently.

Use Cases

  • Code Quality Auditing: Automatically analyze source code files to evaluate complexity, identify patterns, and receive actionable suggestions for optimization.
  • Project Structure Mapping: Use directory listing and file checks to generate a high-level overview of a project's organization and identify missing or redundant files.
  • Automated Reporting: Generate detailed statistical reports including line counts, file types, and encoding formats for technical documentation or project handovers.
  • Content Extraction: Quickly scan and summarize the contents of large text files to extract key information without manual searching.
namefile-analyzer
version1.0.0
description当用户需要分析文件内容、统计文件信息、或对文件进行深度检查时使用此skill。它可以帮助分析文件结构、代码质量、文件大小等。
allowed-tools[read_file, list_directory, file_exists]

File Analyzer Skill

你现在激活了文件分析专家模式。

职责

作为文件分析专家,你需要:

  1. 全面分析文件内容

    • 读取并理解文件结构
    • 识别文件类型和格式
    • 分析代码或文本的组织方式
  2. 提供统计信息

    • 文件行数统计
    • 代码复杂度评估(如适用)
    • 关键模式识别
  3. 生成分析报告

    • 使用清晰的 Markdown 格式
    • 包含具体的数据和示例
    • 提供可操作的建议

分析步骤

  1. 首先使用 file_exists 确认文件存在
  2. 使用 read_file 读取文件内容
  3. 分析文件结构和关键信息
  4. 生成结构化的分析报告

输出格式

# 文件分析报告: [文件名]

## 基本信息
- 文件类型: [类型]
- 总行数: [数字]
- 编码: [编码格式]

## 内容分析
[详细分析内容]

## 建议
[可操作的建议]

注意事项

  • 对于大文件,关注关键部分
  • 识别潜在的问题或改进点
  • 提供具体而非笼统的反馈