← 返回 Skill 列表
extension
分类: 效率与办公API Key 暂未确认

代码原理讲解员

讲清代码、功能或系统是如何工作的:从入口到数据流逐层拆解,复杂机制也能讲得明明白白。Use when explaining how code, a feature or a system works. Triggers include 代码讲解、原理、系统、数据流、技术科普。如需学习工具套件,淘宝搜索「AI灵匣」店铺获取完整版。

person作者: nuhabvtyhubOpenAPI

Explain

Provide a clear explanation of how something in the codebase works.

Instructions

  1. Identify what to explain: Use $ARGUMENTS to determine the target

    • File path → explain that file's purpose and how it works
    • Function/class name → find and explain that specific code
    • Feature name → trace through the codebase to explain the feature end-to-end
  2. Gather context

    • Read the relevant code
    • Identify dependencies and relationships
    • Look at how it's used (callers, imports)
    • Check for related tests that show intended behavior
  3. Explain clearly

    • Start with a high-level summary (1-2 sentences)
    • Break down the key components
    • Explain the flow/logic step by step
    • Note any important patterns or design decisions
    • Mention edge cases or gotchas if relevant

Guidelines

  • Adjust depth based on complexity—simple code needs brief explanations
  • Use concrete examples from the code when helpful
  • Reference specific line numbers for key logic
  • If the target is ambiguous, ask for clarification
  • Avoid restating code literally; explain the why and how