关于 sc-explain
sc-explain 是用于讲解代码和技术概念的技能,可选择基础、中级或高级深度。它能调整讲解形式和领域背景,并可使用 PAL MCP 验证内容或通过 Rube MCP 研究与分享。
主要功能
- 01讲解代码和技术概念
- 02提供三个讲解层级
- 03支持文本、示例和交互形式
- 04可加入领域背景
- 05可用 PAL MCP 验证讲解
- 06可通过 Rube MCP 研究和分享
适用场景
- 01向初学者解释代码文件
- 02结合背景说明框架概念
- 03拆解系统架构
- 04研究或分享技术讲解
MCP 相关
该技能可使用 PAL MCP 进行共识评估、澄清、深入探索、API 查询和准确性挑战;Rube MCP 可用于网络研究和分享讲解内容。
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ tony363/ superclaude --skill sc-explain安装后在 Claude Code 中输入/sc-explain确认已加载。
详细介绍
代码与概念讲解技能
提供可调整深度和形式的教学讲解。
快速开始
# Basic code explanation
/sc:explain authentication.js --level basic
# Framework concept
/sc:explain react-hooks --level intermediate --context react
# System architecture
/sc:explain microservices-system --level advanced --format interactive
行为流程
- 分析 - 检查目标代码或概念
- 评估 - 确定受众水平和讲解深度
- 构建 - 按渐进复杂度规划讲解
- 生成 - 编写清晰的讲解并提供示例
- 验证 - 核实准确性和教学效果
标志
| 标志 | 类型 | 默认值 | 描述 |
|---|---|---|---|
--level | string | intermediate | basic、intermediate、advanced |
--format | string | text | text、examples、interactive |
--context | string | - | 领域上下文(react、security 等) |
激活的角色
- communicator - 针对学习优化的讲解
- architect - 系统设计背景
- guardian - 安全实践讲解
MCP 集成
PAL MCP(多视角讲解)
| 工具 | 适用场景 | 用途 |
|---|---|---|
mcp__pal__consensus | 复杂主题 | 多视角交叉验证 |
mcp__pal__chat | 澄清说明 | 获取不同的讲解方式 |
mcp__pal__thinkdeep | 深层概念 | 多阶段探索 |
mcp__pal__apilookup | 当前 API | 获取最新文档 |
mcp__pal__challenge | 验证准确性 | 检验讲解是否正确 |
PAL 使用模式
# Multi-perspective explanation for complex topic
mcp__pal__consensus(
models=[
{"model": "gpt-5.2", "stance": "neutral"},
{"model": "gemini-3-pro", "stance": "neutral"}
],
step="Explain: How does React's reconciliation algorithm work?"
)
# Get alternative explanation approach
mcp__pal__chat(
prompt="Explain React hooks to someone familiar with Vue composition API",
model="gpt-5.2",
thinking_mode="medium"
)
# Deep dive into complex concept
mcp__pal__thinkdeep(
step="Understanding Kubernetes pod scheduling algorithm",
hypothesis="Priority-based scheduling with resource constraints",
confidence="medium",
focus_areas=["scheduling", "resource_management", "affinity"]
)
# Verify explanation accuracy
mcp__pal__challenge(
prompt="Is my explanation of OAuth2 refresh tokens technically accurate?"
)
# Get current API/framework documentation
mcp__pal__apilookup(
prompt="Get current React 19 documentation for use hook"
)
Rube MCP(研究与分享)
| 工具 | 适用场景 | 用途 |
|---|---|---|
mcp__rube__RUBE_SEARCH_TOOLS | 网络研究 | 查找教程、文档和示例 |
mcp__rube__RUBE_MULTI_EXECUTE_TOOL | 分享讲解 | 发布到 Notion、Slack 等 |
Rube 使用模式
# Research current best practices
mcp__rube__RUBE_SEARCH_TOOLS(queries=[
{"use_case": "web search", "known_fields": "query:React 19 new features explained"}
])
# Share explanation with team
mcp__rube__RUBE_MULTI_EXECUTE_TOOL(tools=[
{"tool_slug": "NOTION_CREATE_PAGE", "arguments": {
"title": "Understanding: React Concurrent Mode",
"content": "## Overview\n..."
}},
{"tool_slug": "SLACK_SEND_MESSAGE", "arguments": {
"channel": "#learning",
"text": "New explainer: React Concurrent Mode fundamentals"
}}
])
标志(扩展)
| 标志 | 类型 | 默认值 | 描述 |
|---|---|---|---|
--pal-consensus | bool | false | 使用 PAL 进行多视角验证 |
--pal-deep | bool | false | 使用 PAL thinkdeep 探索复杂主题 |
--research | bool | false | 使用 Rube 进行网络研究 |
--share | string | - | 通过 Rube 分享(notion、slack、confluence) |
证据要求
此技能不要求提供硬性证据。请重点关注:
- 清晰、准确的讲解
- 恰当的示例
- 渐进的复杂度
讲解级别
基础(--level basic)
- 基础概念
- 简单示例
- 适合初学者的语言
中级(--level intermediate)
- 实现细节
- 常见模式
- 最佳实践
高级(--level advanced)
- 深入的技术细节
- 边界情况和权衡
- 性能影响
格式选项
文本(--format text)
- 书面讲解
- 分步解析
- 概念概述
示例(--format examples)
- 代码示例
- 前后对比
- 实际应用
交互式(--format interactive)
- 渐进式呈现
- 后续建议
- 探索路径
示例
代码讲解
/sc:explain src/auth/jwt.js --level basic
# What the code does, how it works, why it's structured this way
框架概念
/sc:explain useEffect --level intermediate --context react
# Hook lifecycle, dependency arrays, cleanup patterns
架构讲解
/sc:explain event-driven-architecture --level advanced
# Patterns, trade-offs, implementation strategies
安全概念
/sc:explain oauth2-flow --level basic --context security
# Authorization flow, tokens, security considerations
工具协作
- Read/Grep/Glob - 代码分析
- TodoWrite - 跟踪多部分讲解
- Task - 委派复杂讲解
评论
支持 Markdown