unifiles-mcp: Command for Claude Code

.cursor/commands/explain.md

explain is a command for Claude Code, Cursor from Asheng008/unifiles-mcp. It costs 0 tokens per session (2,770 once invoked), scanned A, original, MIT.

A command that explains selected code, text, files, configuration, or terminal output in Chinese. It describes what the input means, how it works, and possible problems or fixes.

In plain words
What is it for?
Use it to explain code logic, documentation, configuration settings, dependencies, command output, and likely causes of errors.
Why use it?
It turns unfamiliar technical material and error messages into a structured explanation that is easier to understand.

Command for Claude CodeCursor

Written for Cursor and Claude Code: installed under .cursor/, but also a Claude Code command (commands/*.md). Also seen: mentions AGENTS.md.

This is Asheng008/unifiles-mcp's own configuration. It tells Claude Code and Cursor how to work on unifiles-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything unifiles-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Asheng008/unifiles-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Asheng008/unifiles-mcp/main/.cursor/commands/explain.md
Clone the repo
git clone --depth 1 https://github.com/Asheng008/unifiles-mcp

Made for: Claude Code, Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for explain

README.md
[![agentmods](https://agentmods.dev/badge/commands/asheng008/unifiles-mcp/explain.svg)](https://agentmods.dev/commands/asheng008/unifiles-mcp/explain)
Your own site
<a href="https://agentmods.dev/commands/asheng008/unifiles-mcp/explain"><img src="https://agentmods.dev/badge/commands/asheng008/unifiles-mcp/explain.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,770 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.02770
Opus 5 $0.00000 $0.01385
Sonnet 5 $0.00000 $0.00554
Haiku 4.5 $0.00000 $0.00277

Measured 7d ago against content hash e6f89c1ca98c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

explain scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/commands/explain.md · 271 lines

How it starts

The opening of the file, as written. The whole thing — 271 lines — stays where its author put it; the contents beside it link to each section on GitHub.

解释代码/文字/文件

解释用户选择的代码、文字或文件内容,提供清晰、详细的中文说明。

目标

  • 分析并解释用户选择的代码片段、文字内容、文件或终端输出
  • 提供清晰、结构化的中文解释
  • 根据内容类型(代码、文档、配置、终端输出等)采用相应的解释方式
  • 帮助用户理解代码逻辑、设计意图、配置含义、命令/错误输出等

处理流程

1. 识别输入类型

根据用户选择的内容,判断类型:

  • 代码片段:Python、配置文件、Markdown 等代码
  • 文档文字:README、技术文档、注释等
  • 文件路径:用户选择或提及的文件
  • 终端输出:命令执行结果、错误日志、测试输出、构建/安装输出等(来自终端、控制台或 IDE 的终端面板)
  • 混合内容:代码 + 注释、多文件、命令与输出组合等

2. 分析内容

根据内容类型进行相应分析:

代码分析

  • 功能说明:这段代码做什么
  • 逻辑流程:代码执行流程
  • 关键概念:使用的技术、库、模式
  • 参数/返回值:函数签名、类型注解
  • 依赖关系:与其他代码/模块的关系
  • 潜在问题:可能的错误、边界情况

文档分析

  • 主要内容:文档的核心信息
  • 结构组织:章节、层次结构
  • 关键要点:重要概念、规则、约定
  • 使用场景:适用情况、示例

配置文件分析

  • 配置项说明:每个配置的含义
  • 默认值:默认设置及其影响
  • 依赖关系:配置之间的关联
  • 最佳实践:推荐的配置方式

终端输出分析

  • 输出类型:正常输出、错误信息、警告、测试结果、构建/安装日志等
  • 结构解析:命令提示符、标准输出、标准错误、退出码(如有)
  • 关键信息:成功/失败标志、错误堆栈、行号、路径、建议或 hint
  • 原因推断:可能触发该输出的命令或操作、环境或配置因素
  • 解决建议:若是错误/警告,给出排查步骤或修复方向

2.1 查询工具使用(当遇到不确定内容时)

当遇到以下情况时,必须使用查询工具

  • 不熟悉的库、框架、API 用法
  • 不确定的配置项含义
  • 需要最新文档或最佳实践
  • 代码中使用了不常见的模式或技术
  • 需要验证某个概念或实现方式

工具使用优先级

  1. Context7(MCP 工具) - 优先使用

    • 适用场景:查询库的官方文档、API 用法、代码示例
    • 使用方法
      • 先使用 mcp_context7_resolve-library-id 解析库名称
      • 再使用 mcp_context7_query-docs 查询具体文档
    • 示例
      • 代码中使用了 pandas.ExcelWriter → 查询 pandas 官方文档
      • 配置中有 [tool.mypy] → 查询 mypy 配置文档
      • 代码使用了 pathlib.Path → 查询 Python 标准库文档
  2. 联网搜索(Web Search) - 备选方案

    • 适用场景
      • Context7 无法找到相关文档
      • 需要查找最新信息、博客文章、Stack Overflow 解答
      • 查询特定错误信息或解决方案
    • 使用方法:使用 web_search 工具
    • 示例
      • 查询 "pandas ExcelWriter 多工作表写入最佳实践"
      • 查询 "mypy python_version 3.10 配置说明"
      • 查询特定错误信息或警告
  3. RefTools(MCP 工具) - 补充查询

    • 适用场景:搜索通用技术文档、GitHub 文档、PDF 文档
    • 使用方法:使用 mcp_RefTools_ref_search_documentationmcp_RefTools_ref_read_url

查询后的处理

  • 将查询结果整合到解释中
  • 明确标注信息来源(如"根据 pandas 官方文档...")
  • 如果查询结果与代码中的用法不一致,说明可能的问题
  • 如果查询无结果,说明情况并基于现有知识提供解释

3. 提供解释

解释格式

  1. 概述:一句话总结内容的核心
  2. 详细说明
    • 代码:逐行或逐块解释
    • 文档:按章节或要点说明
    • 配置:逐项说明
    • 终端输出:输出类型、各部分含义、错误/警告解读、退出码含义
  3. 关键点:重要概念、设计决策、注意事项
  4. 相关上下文:与项目其他部分的关联
  5. 示例/用法(如适用):如何使用、示例代码;若为错误输出,补充排查或修复建议

Read the full file on GitHub · 271 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 271 lines · 0 tokens per session scan A e6f89c1ca98c

Subscribe to this mod's changes

explain is a command published in the GitHub repository Asheng008/unifiles-mcp (0 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,770 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.