---
name: class-script-writing
description: Guides writing weekly class script files (.svx) for the Coding the News syllabus. Use this when asked to write, draft, or create a new week's script content.
---
# Class Script Writing
Write weekly class script files (`.svx`) that match the established patterns, tone, and formatting conventions of the "Coding the News" course at CUNY Craig Newmark Graduate School of Journalism.
## When to Use
Use this skill when asked to:
- Write a new week's script content
- Draft or outline a class session
- Create tutorial content for the syllabus
- Expand bullet points from OUTLINE.md into full scripts
## Reference Materials
Before writing, consult:
- **`src/content/OUTLINE.md`** - Topic outline for each week
- **`src/content/scripts/week-1.svx`** - Example of foundational tools introduction
- **`src/content/scripts/week-2.svx`** - Example of framework/deployment topics
## File Structure
### Location
Save scripts to `src/content/scripts/week-{N}.svx`
### Frontmatter (Required)
```yaml
---
title: "Descriptive Title"
summary: "Brief description of what students will learn"
date: "Mon. DD, YYYY"
week: N
locked: false
---
```
- **title**: Short, memorable title (not "Week N" - use a descriptive phrase)
- **summary**: One sentence describing the main skills/concepts
- **date**: Format as "Mon. DD, YYYY" (e.g., "Feb. 9, 2026")
- **week**: Integer week number
- **locked**: Set to `false` for published content, `true` for future weeks
### Script Block (Required)
```svelte
```
Always include this even if screenshots aren't used yet—they will be added later.
## Content Structure
### Parts
Use `## Part N: Title` for major sections. Typically 3-4 parts per week.
```markdown
## Part 1: Introduction to [Topic]
## Part 2: Setting Up [Tool]
## Part 3: Building [Thing]
## Part 4: Publishing and Sharing
```
### Subheadings
Use `### Subtopic` for steps within parts.
```markdown
## Part 2: Introduction to Node.js
### Check if Node.js is already installed
### Install nvm
### Install Node.js with nvm
```
### Homework Section
Always end with `## Homework Assignments` containing 2-3 tasks following this pattern:
```markdown
## Homework Assignments
### Task 1: Creating
[Hands-on practice creating something - repositories, projects, components, etc.]
### Task 2: Exploring
[Research or exploration with Copilot assistance - cloning repos, studying code, etc.]
### Task 3: Presenting
[Prepare to share findings with class - be ready to present, write a summary, etc.]
```
## Writing Style
### Voice
- **Conversational but instructional** - Write in second person
- **Direct commands** - "Open your browser", "Click the button", "Type this command"
- **Encouraging** - "Congratulations!", "Don't worry about that one"
### UI Element References
**Use quotes, not bold**, for UI elements:
- ✅ `Click the "Clone repository" button`
- ✅ `Select "Create a new repository" from the dropdown`
- ✅ `Go to the "Settings" tab`
- ❌ `Click the **Clone repository** button`
### Code Formatting
**Inline code** for file names, commands, and short code:
```markdown
Open the `README.md` file and run `npm install`.
```
**Fenced code blocks** with language hints:
````markdown
```bash
npm run dev
```
```js
let headline = 'Breaking News';
```
```svelte
```
````
### Links
Use standard Markdown link syntax:
```markdown
See [GitHub's guide to Markdown](https://docs.github.com/...) for more options.
```
For external sites you want to highlight inline, you can use `` tags with `target="_blank"`:
```markdown
Visit nodejs.org to learn more.
```
### MDsveX Parsing Pitfalls
Since `.svx` files are processed by MDsveX (Markdown + Svelte), certain characters are interpreted as Svelte syntax rather than plain text.
**Avoid `<` and `>` characters in prose.** MDsveX interprets these as Svelte component tags, causing parsing errors like:
```
Error: < is not a valid component name
```
Instead of comparison operators, use words:
- ✅ `under 600px` or `less than 600px`
- ✅ `over 900px` or `greater than 900px`
- ❌ `< 600px`
- ❌ `> 900px`
This applies everywhere in the content—paragraphs, lists, tables, and code comments outside of fenced code blocks.
**Fenced code blocks are safe.** Inside triple-backtick code blocks, `<` and `>` are treated as literal characters:
```markdown
\`\`\`css
@media (max-width: 600px) { /* This is fine */ }
\`\`\`
```
**Style blocks need special handling.** When showing SCSS/CSS code with `