用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Arete-Consortium/ai-skills --skill explain命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | explain |
| description | Deep Code Explanation |
| lifecycle | experimental |
Provide detailed explanations of code, concepts, or patterns.
/explain path/to/file.py # Explain entire file
/explain function_name # Explain specific function
/explain "async/await" # Explain concept
/explain --level beginner # Adjust explanation depth
# Explanation: [Topic]
## Overview
Brief summary of what this code/concept does.
## Purpose
Why does this exist? What problem does it solve?
## How It Works
### Step-by-Step
1. **Step 1**: Description
```python
relevant_code_snippet()
next_snippet()
Input → Process A → Process B → Output
↓
Side Effect
Explanation of underlying concept.
Explanation of another concept.
# Simple example
result = function(input)
# Advanced example with options
result = function(
input,
option1=True,
option2="value"
)
## Explanation Levels
### Beginner
- Simple vocabulary
- More analogies
- Step-by-step detail
- Avoid jargon
- More code comments
### Intermediate
- Assume basic knowledge
- Focus on patterns
- Discuss trade-offs
- Include edge cases
### Advanced
- Technical depth
- Performance implications
- Implementation details
- Comparison with alternatives
## Example Explanations
### Explaining Decorators
```markdown
## Overview
A decorator is a function that wraps another function to extend its behavior
without modifying the original code.
## How It Works
```python
@log_calls
def greet(name):
return f"Hello, {name}"
Is equivalent to:
def greet(name):
return f"Hello, {name}"
greet = log_calls(greet) # Wrapping happens here
The @ syntax is just syntactic sugar for this wrapping pattern.
@log_calls above greetgreet as normallog_calls(greet)greetgreet("World"), you're calling the wrapped version
### Explaining Async/Await
```markdown
## Overview
`async/await` lets you write non-blocking code that looks synchronous.
## The Problem
```python
# Blocking - waits doing nothing
data1 = fetch_from_api() # 2 seconds
data2 = fetch_from_db() # 2 seconds
# Total: 4 seconds
# Non-blocking - runs concurrently
data1, data2 = await asyncio.gather(
fetch_from_api(), # 2 seconds
fetch_from_db() # 2 seconds
)
# Total: ~2 seconds
While waiting for I/O, Python can do other work.
## Instructions for Claude
When /explain is invoked:
1. **Identify target** - Code, function, or concept
2. **Determine level** - Beginner, intermediate, advanced
3. **Read context** - Surrounding code, usage
4. **Structure explanation** - Overview → details → examples
5. **Use analogies** - For complex concepts
6. **Show execution** - Step-by-step flow
7. **Include examples** - Practical usage
8. **Note pitfalls** - Common mistakes
9. **Suggest alternatives** - When relevant