360 Secure SkillHub
360 安全技能中心

Repo Tour

核心功能是生成包含滚动教学模块、代码+通俗解释、架构图、数据流追踪、交互式测验、术语提示的单文件HTML课程,支持离线使用与键盘导航。典型场景包括开发者入职培训、代码库整体/局部讲解、向非技术利益相关方演示逻辑。输入为代码库,输出为独立HTML文件,不适用于常规代码审查、重构或调试。

leostehlik
leostehlik
热度 32.46
最近更新 2026-05-24 18:00:06
分类:知识依赖:读写文件 / 内部调用大模型应用场景:教学辅导 / 测验 / 概念解释 / 摘要总结 ...

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add code-decoded
Metadata
name
code-decoded
description
Turn a codebase into a self-contained interactive HTML course for onboarding, walkthroughs, or stakeholder explanation.
metadata
{"version":"0.2.1"}

Code Decoded

Turn a codebase into a self-contained interactive HTML course. One file. No setup. Host it, share it, or open it locally.

Read references/html-structure.md for the HTML output spec. Read references/design-principles.md for visual and content rules.

Activation and Data Boundary

Use this skill only when the user explicitly asks for Code Decoded, a repo tour, onboarding course, codebase walkthrough, or stakeholder explanation. Do not activate it for routine code review, refactoring, or debugging.

The skill reads repository files and writes one HTML output file. Confirm or choose an output path before writing, and do not overwrite an existing file without user approval. Generated HTML can contain real source snippets, internal file paths, and architecture details; review it before sharing outside the project.

What to Build

A single HTML file that teaches how the codebase works through:

  • Scroll-based modules — one concept per section, progress indicator
  • Code + plain English side by side — real code from the repo on the left, what it means on the right. Never modify or simplify the code.
  • Architecture overview — visual diagram of how the main components connect
  • Data flow walkthrough — trace what happens during a key user action (login, submit, search — whatever is most representative)
  • Interactive quizzes — application-focused, not memorization. "A user reports stale data after switching pages. Where would you look first?" Not "What does API stand for?"
  • Glossary tooltips — hover any technical term for a plain-English definition
  • Keyboard navigation — arrow keys to move between sections

Before Starting

Ask the user (or infer from context):

  1. Audience — non-technical (product users, stakeholders), developer onboarding, or power users?
  2. Focus — full codebase tour, or a specific area (auth, data layer, a specific feature)?
  3. Key action to trace — what is the most important thing the code does? This becomes the data flow module.

If the user says "just do it" — infer from the codebase and proceed.

How to Generate

  1. Read the codebase structure (directory tree, key files)
  2. Identify: entry points, main modules, data models, key user flows
  3. Pick 5-8 concepts to teach — ordered from "what is this?" to "how does it work?" to "how do I use/change it?"
  4. Write the HTML course following references/html-structure.md and references/design-principles.md
  5. Output as a single .html file

Output

Name the file: [repo-name]-tour.html

It must:

  • Work offline (no external CDN, no network requests)
  • Be self-contained (all CSS and JS inline)
  • Render correctly in Chrome, Firefox, Safari
  • Be hostable as a static page with no build step