بنقرة واحدة
walkthrough
Generate interactive code walkthroughs in Virgil markdown format
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Generate interactive code walkthroughs in Virgil markdown format
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | walkthrough |
| description | Generate interactive code walkthroughs in Virgil markdown format |
| disable-model-invocation | true |
| argument-hint | <pr-number|tour|keyword|incident|guide> |
Generate interactive code walkthroughs in Virgil markdown format for the Virgil VS Code extension.
Determine the walkthrough mode from $ARGUMENTS:
| Pattern | Mode | Description |
|---|---|---|
Number (e.g. 123) | PR review (diff) | Walk through PR changes with diff mode |
tour | Codebase tour | High-level architecture walkthrough |
Keyword (e.g. auth) | Focused subsystem tour | Deep dive into a specific subsystem |
incident or debug | Incident trace | Investigation/debugging narrative |
guide or setup | Implementation guide | Step-by-step setup or implementation |
If $ARGUMENTS is ambiguous, ask with AskUserQuestion: "What type of walkthrough?" with options matching the modes above.
YAML between --- delimiters at the start of the file:
---
remote: <git remote URL>
commit: <full HEAD commit SHA>
# For diff mode, add ONE of (priority: baseCommit > baseBranch > pr):
baseCommit: <base commit SHA>
baseBranch: main
pr: 123
# Any additional key-value pairs become metadata
---
Always include remote and commit. The extension uses remote to filter walkthroughs to the matching workspace. A warning is shown if multiple base references are specified.
# heading becomes the walkthrough title## heading (optional)## through ###### heading creates a stepHeader level determines hierarchy:
| Header | Relationship |
|---|---|
## | Top-level step |
### | Child of nearest ## |
#### | Child of nearest ### |
##### | Child of nearest #### |
###### | Child of nearest ##### |
Navigation traverses all steps in depth-first order.
Place location links in the step body (typically right after the heading or explanation).
View code (head/current file): [View code (startLine-endLine)](/path/from/repo/root)
Base (diff mode, base file): [Base (startLine-endLine)](/path/from/repo/root)
Rules:
/ (repo root-relative)[View code (10-20,33-45)](/src/file.ts)[View code (10)](/src/file.ts)View code | Base | Mode | Display |
|---|---|---|---|
| Yes | No | Point-in-time | Standard code highlight |
| No | Yes | Base-only | Base file highlight |
| Yes | Yes | Diff | 3-way toggle: diff view / head / base |
| No | No | Informational | No code view (overview/summary steps) |
Full markdown is supported in step bodies: headers, bold/italic, code blocks (with language identifier), inline code, lists, links, blockquotes.
Link to other steps using anchor syntax: [link text](#step-title-as-anchor)
Anchor rules (GitHub/CommonMark): lowercase, spaces to hyphens, strip special chars.
Example: ## JWT Validation → [see validation](#jwt-validation)
These steps apply to all walkthrough modes:
Gather repository info
git remote get-url origin 2>/dev/null || echo "no-remote"
git rev-parse HEAD
Explore the codebase — Use Glob for structure, Grep for patterns, Read for content. Map out the relevant execution flow or architecture.
Design walkthrough structure — Plan 5-15 steps. Determine hierarchy (## for major areas, ### for details). Map each step to a file path and line range.
Write the walkthrough — Use the Write tool to create walkthroughs/<name>.md. Do NOT use cat heredoc or Bash for output.
Verify accuracy — Read each referenced file and confirm:
After determining the mode from Mode Routing, Read the corresponding mode file for detailed instructions:
| Mode | File to Read |
|---|---|
| PR review (diff) | modes/pr-review.md |
| Codebase tour | modes/codebase-tour.md |
| Focused subsystem tour | modes/subsystem-tour.md |
| Incident/debugging trace | modes/incident-trace.md |
| Setup/implementation guide | modes/implementation-guide.md |
Read the file path relative to this skill's directory. Only read the one mode file that applies — do not read all of them.
remote and commit in frontmatter#anchor) to cross-reference related stepsUse the Write tool to create the walkthrough file at:
walkthroughs/<name>.md
Naming conventions:
pr-<number>.mdarchitecture.md<keyword>.mdincident-<id>.md<guide-name>.mdCreate the walkthroughs/ directory if it doesn't exist.
After writing, tell the user: "Walkthrough generated! Open in VS Code/Cursor with the Virgil extension, then use Convert Markdown to Walkthrough to view it."