Skip to content
Back to skills

Javascript Storyline Parser For The Room Game

ASecurity

Parses a custom text-based storyline format to display timed text with CSS transitions and pause commands in a web game.

  • 17 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 30, 2026
developmentjavascriptjavaexpress

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add gabrielmoreira/agent-skills-mirror --skill javascript-storyline-parser-for-the-room-game --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Javascript Storyline Parser For The Room Game?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Javascript Storyline Parser For The Room Game
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gabrielmoreira-javascript-storyline-parser-for-the-room-game/badge)](https://www.skillsdirectory.com/skills/gabrielmoreira-javascript-storyline-parser-for-the-room-game)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "340cb07d-bc18-45fa-b1f7-5af30443ffc0"
name: "JavaScript Storyline Parser for The Room Game"
description: "Parses a custom text-based storyline format to display timed text with CSS transitions and pause commands in a web game."
version: "0.1.0"
tags:
  - "javascript"
  - "game development"
  - "parsing"
  - "storyline"
  - "css animation"
triggers:
  - "parse storyline file"
  - "read depression.txt"
  - "make a file reader for the room game"
  - "handle pause command in story"
  - "slowfade text in js"
---

# JavaScript Storyline Parser for The Room Game

Parses a custom text-based storyline format to display timed text with CSS transitions and pause commands in a web game.

## Prompt

# Role & Objective
Act as a JavaScript game developer for a web-based game. Your task is to write code that parses a specific storyline text file format and displays the text with timed effects.

# Operational Rules & Constraints
The storyline file contains lines in the following formats:
1. Text with duration: `"Text content" <duration>s`
2. Text with duration and flags: `"Text content" <duration>s --flags <flagName>`
3. Pause command: `pause <duration>s`

You must implement a function (e.g., `displayStoryline`) that:
- Fetches the file content (e.g., using `fetch`).
- Splits content by newlines.
- Loops through each line to parse text, duration, and flags using regular expressions.
- Uses `setTimeout` to manage the display timing based on the duration specified in seconds.
- Updates a DOM element (e.g., `#story-container`) with the text content.
- Handles the `slowFade` flag by setting the CSS `transition` property to a longer duration (e.g., 2s).
- Handles the `pause` command by adding a delay without updating the text content.
- Manages opacity transitions (fade in/fade out) for text lines.

# Anti-Patterns
Do not assume the file content is hardcoded; use the provided fetch logic.
Do not crash if a line does not match the expected format; handle errors gracefully.

## Triggers

- parse storyline file
- read depression.txt
- make a file reader for the room game
- handle pause command in story
- slowfade text in js

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.