File contents 核心任务
生成符合初学者需求的入门指南类教程 (.rmd/.qmd),强调 "概念 → 流程 → 代码 → 解释" 结构,确保 70% 文字 + 30% 代码比例。
快速启动 (Quick Start)
确定主题 : 如 "R 语言数据结构 (Data Structures)"。
加载模板 : 阅读 content-structure.md 获取 YAML 和标题结构。
生成内容 : 遵循 "目标 -> 路线 -> 概念 -> 实践 -> 错误纠偏" 流程。
视觉设计 : 参考 visual-templates.md 生成封面图和学习路径图。
质量检查 : 验证文字比例与导航更新。
完整工作流程
步骤1: 生成教程内容与封面
按 content-structure.md 结构生成文件。
必须包含 : ## 教程目标与适用场景 到 ## 进阶扩展 的标准结构。
文字比例 : 必须确保文字解释占 70% 以上,假设读者是零基础。
封面图 (MANDATORY) : 必须生成 doc/images/00[number]-[topic]-cover.svg。
原理图 : 复杂逻辑,结构图,代码不好展现的,必须AI生图生成 doc/images/diagrams/stat-*.svg(或者png),由AI直接生成,比如一些思维导图,可视化内容,使用md语法在文章内引用
步骤2: 验证渲染 (CRITICAL)
在提交前必须进行本地渲染验证,确保代码可运行且格式正确。
# 渲染单文件验证内容
quarto render doc/00[number]-[topic].rmd
# 确保无报错、包缺失或格式问题
步骤3: 更新导航系统 (CRITICAL)
必须执行以下步骤,否则新文章无法在网站侧边栏和分类页显示。
更新 doc/_quarto.yml :
更新 doc/0001-guide.rmd :
运行自动生成脚本 (MANDATORY) :
此脚本会根据 _quarto.yml 更新 sections/guide.qmd 等分类索引页。
# 在项目根目录下运行
workdir="doc" Rscript doc/generate_sections.R
更新 README.md :
在 🧭 内容导航 -> 🏗️ 开发环境 或相关折叠块中添加链接。
步骤4: 最终渲染与提交
重新渲染受影响页面 :
quarto render doc/sections/guide.qmd
quarto render doc/index.qmd
提交代码 :
git add doc/00xx-*.rmd doc/images/00xx-*-cover.svg
git add doc/_quarto.yml doc/0001-guide.rmd README.md doc/sections/guide.qmd
git commit -m "feat(guide): 新增[教程标题]入门教程"
写作规范
内容标准 :
详细度 : 内容必须详尽,起到深入教程的作用。
篇幅 : 不少于 300 行 (Not less than 300 lines)。
比例 : 文字说明约占 70%,代码约占 30% (70% text, 30% code)。
结构 : 必须提前构建全面的内容框架,然后根据框架填充详细内容。
语言 : 客观、科学、结构清晰,以段落叙述为主。
代码 : 优先使用 pkg::fn();随机过程设置 set.seed(2026)。
标题 : 使用中文标题,层级清晰(一级到三级)。
参考资源
content-structure.md: 详细内容模板与标题规范。
visual-templates.md: SVG 封面与示意图模板库。
learning-roadmap.md: R 语言学习路线参考。
1 --- 2 name: section-intro-guide-2 3 description: 核心任务 4 --- 5 ## 核心任务 6 7 生成符合初学者需求的入门指南类教程 (.rmd/.qmd),强调 "概念 → 流程 → 代码 → 解释" 结构,确保 70% 文字 + 30% 代码比例。 8 9 ## 快速启动 (Quick Start) 10 11 1. **确定主题**: 如 "R 语言数据结构 (Data Structures)"。 12 2. **加载模板**: 阅读 [content-structure.md](references/content-structure.md) 获取 YAML 和标题结构。 13 3. **生成内容**: 遵循 "目标 -> 路线 -> 概念 -> 实践 -> 错误纠偏" 流程。 14 4. **视觉设计**: 参考 [visual-templates.md](references/visual-templates.md) 生成封面图和学习路径图。 15 5. **质量检查**: 验证文字比例与导航更新。 16 17 ## 完整工作流程 18 19 ### 步骤1: 生成教程内容与封面 20 21 按 [content-structure.md](references/content-structure.md) 结构生成文件。 22 23 - **必须包含**: `## 教程目标与适用场景` 到 `## 进阶扩展` 的标准结构。 24 - **文字比例**: 必须确保文字解释占 70% 以上,假设读者是零基础。 25 - **封面图 (MANDATORY)**: 必须生成 `doc/images/00[number]-[topic]-cover.svg`。 26 - **原理图**: 复杂逻辑,结构图,代码不好展现的,必须AI生图生成 `doc/images/diagrams/stat-*.svg(或者png),由AI直接生成`,比如一些思维导图,可视化内容,使用md语法在文章内引用 27 28 ### 步骤2: 验证渲染 (CRITICAL) 29 30 在提交前必须进行本地渲染验证,确保代码可运行且格式正确。 31 32 ```bash 33 # 渲染单文件验证内容 34 quarto render doc/00[number]-[topic].rmd 35 36 # 确保无报错、包缺失或格式问题 37 ``` 38 39 ### 步骤3: 更新导航系统 (CRITICAL) 40 41 必须执行以下步骤,否则新文章无法在网站侧边栏和分类页显示。 42 43 1. **更新 `doc/_quarto.yml`**: 44 45 - 找到 `sidebar` -> `contents` -> `入门指南` 部分。 46 - 添加新条目,**注意缩进**: 47 ```yaml 48 - text: "文章标题" 49 href: "00xx-filename.rmd" 50 ``` 51 2. **更新 `doc/0001-guide.rmd`**: 52 53 - 在对应分类的表格中添加一行: 54 ```markdown 55 | [主题名] | [文章标题](00xx-filename.html) | [简短说明] | 56 ``` 57 3. **运行自动生成脚本 (MANDATORY)**: 58 59 - 此脚本会根据 `_quarto.yml` 更新 `sections/guide.qmd` 等分类索引页。 60 61 ```bash 62 # 在项目根目录下运行 63 workdir="doc" Rscript doc/generate_sections.R 64 ``` 65 4. **更新 `README.md`**: 66 67 - 在 `🧭 内容导航` -> `🏗️ 开发环境` 或相关折叠块中添加链接。 68 69 ### 步骤4: 最终渲染与提交 70 71 1. **重新渲染受影响页面**: 72 73 ```bash 74 quarto render doc/sections/guide.qmd 75 quarto render doc/index.qmd 76 ``` 77 2. **提交代码**: 78 79 ```bash 80 git add doc/00xx-*.rmd doc/images/00xx-*-cover.svg 81 git add doc/_quarto.yml doc/0001-guide.rmd README.md doc/sections/guide.qmd 82 git commit -m "feat(guide): 新增[教程标题]入门教程" 83 ``` 84 85 ## 写作规范 86 87 - **内容标准**: 88 - **详细度**: 内容必须详尽,起到深入教程的作用。 89 - **篇幅**: 不少于 300 行 (Not less than 300 lines)。 90 - **比例**: 文字说明约占 70%,代码约占 30% (70% text, 30% code)。 91 - **结构**: 必须提前构建全面的内容框架,然后根据框架填充详细内容。 92 - **语言**: 客观、科学、结构清晰,以段落叙述为主。 93 - **代码**: 优先使用 `pkg::fn()`;随机过程设置 `set.seed(2026)`。 94 - **标题**: 使用中文标题,层级清晰(一级到三级)。 95 96 ## 参考资源 97 98 - [content-structure.md](references/content-structure.md): 详细内容模板与标题规范。 99 - [visual-templates.md](references/visual-templates.md): SVG 封面与示意图模板库。 100 - [learning-roadmap.md](references/learning-roadmap.md): R 语言学习路线参考。
kangwang42/r_note_for_epidemiology/tree/main/.opencode/skills/section-intro-guide commit 443af2dda3
Frequently asked questions How do I install the Section Intro Guide skill? Run npx skillmds@latest add kangwang42/section-intro-guide-2 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the Section Intro Guide skill do? 核心任务 It is listed under Coding & Dev Tools on SkillMD.
Is Section Intro Guide safe to use? This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with Section Intro Guide? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is Section Intro Guide free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published Section Intro Guide? kangwang42 (@kangwang42) published this skill. Their other Agent Skills are listed on their SkillMD profile.