A skill that generates DELE B1-level Spanish short reading passages. Designed for a daily morning study routine. Outputs a passage + vocabulary list + comprehension questions in one go. Trigger on keywords like "DELE", "spanish passage", "morning spanish", "dele practice", "spanish reading", etc.
/dele-b1-passage [YYYY-MM-DD]
/dele-b1-passage 2026-04-05): generate a passage for that specific date.currentDate context or system clock).Run once every morning to get a short DELE B1-level reading passage and a complete study set.
Strictly follow these standards when generating a passage:
Prioritize Mexican and Latin American Spanish vocabulary, expressions, and usage throughout the passage. Specific guidance:
Select randomly from the following categories (use a different theme each time):
Use a history.json file in the same directory as the skill to track past outputs.
Before generating a passage, check whether history.json exists.
history.jsonhistory.jsonAfter the passage is generated, append the current run's record to history.json.
{
"entries": [
{
"date": "2026-03-10",
"category": "Travel & tourism",
"subtopic": "Travel mishaps",
"title": "Un problema en el aeropuerto",
"vocab": ["equipaje", "reclamar", "vuelo", "retraso", "mostrador", "embarque", "pasaporte", "aduana"]
}
]
}
File path: history.json inside the skill directory (e.g., dele-b1-passage/history.json)
Write everything to a folder at passages/YYYY-MM-DD/ (using today's date), outputting two files:
passages/YYYY-MM-DD/YYYY-MM-DD.md — Markdown formatpassages/YYYY-MM-DD/YYYY-MM-DD.html — HTML format (styled, self-contained)Do NOT output the passage content to the CLI — only write to the files.
The file should contain the following sections in order:
📖 Pasaje del día — [Theme category]
Título: [Title]
[Passage body (Spanish only)]
A natural English translation of the full passage body.
In the HTML output, Part 1 and Part 2 must be rendered side by side using a two-column flexbox layout (.passage-columns). The Spanish passage goes in the left column and the English translation in the right column. On mobile (max-width: 700px), they stack vertically. Do NOT use a separate <h2> heading for the English section — instead use a small label (<div class="passage-col-label">) above each column.
Text-to-Speech (TTS) button — required in every HTML output:
The Spanish passage container (<div class="passage-box">) must have id="spanish-text". Immediately before the <div class="passage-columns"> block, insert a TTS button. At the end of the file, just before </body>, include the following script (using Web Speech API):
<div style="margin-bottom: 16px;">
<button id="tts-btn" onclick="toggleSpeak()" style="margin: 12px 0; padding: 8px 16px; background: #b8860b; color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 15px;">🔊 スペイン語を読み上げ</button>
</div>
<div class="passage-columns">
<div>
<div class="passage-col-label">🇪🇸 Español</div>
<div class="passage-box" id="spanish-text">
...
<script>
function toggleSpeak() {
var btn = document.getElementById('tts-btn');
if (window.speechSynthesis.speaking) {
window.speechSynthesis.cancel();
btn.textContent = '🔊 スペイン語を読み上げ';
return;
}
var paras = Array.from(document.querySelectorAll('#spanish-text p'));
var text = paras.map(function(p){ return p.textContent.trim(); }).filter(function(t){ return t.length > 0; }).join(' ');
var utterance = new SpeechSynthesisUtterance(text);
utterance.lang = 'es-ES';
utterance.rate = 0.85;
utterance.onend = function() { btn.textContent = '🔊 スペイン語を読み上げ'; };
utterance.onerror = function() { btn.textContent = '🔊 スペイン語を読み上げ'; };
btn.textContent = '⏹ 停止';
window.speechSynthesis.speak(utterance);
}
</script>
</body>
The button toggles between 🔊 スペイン語を読み上げ and ⏹ 停止 while speaking. Uses Web Speech API with lang='es-ES' and rate 0.85.
🇬🇧 English Translation
[English translation of the passage, paragraph by paragraph]
Pick out key B1 vocabulary from the passage.
📝 Vocabulario clave
| Palabra | Significado (ES) | English | Japanese | Example from text |
|---------|------------------|---------|----------|-------------------|
| ... | ... | ... | ... | ... |
Multiple-choice questions modeled after the DELE B1 reading section.
Each option must include its English and Japanese translation on the same line, in parentheses.
❓ Comprensión lectora
1. [Question (in Spanish)]
a) ... (English / 日本語)
b) ... (English / 日本語)
c) ... (English / 日本語)
2. ...
3. ...
✅ Respuestas
1. [Correct answer] — [Brief explanation of why (in Japanese)]
2. ...
3. ...
currentDate context variable or system clock. All subsequent file paths, commit messages, and HTML titles must use this date.passages/YYYY-MM-DD/YYYY-MM-DD.md already exists, stop immediately and output:
⚠️ passages/YYYY-MM-DD/ already exists. To regenerate, delete the folder first.
Do NOT proceed further.history.json (treat as empty if it does not exist)history.json and savepassages/YYYY-MM-DD/ directorypassages/YYYY-MM-DD/YYYY-MM-DD.mdpassages/YYYY-MM-DD/YYYY-MM-DD.htmlindex.html — prepend a new <li> entry at the top of the <ul class="list"> block, using the same format as the existing entries, with the correct date, title, and category tagtoday.html at the repo root:
cp passages/YYYY-MM-DD/YYYY-MM-DD.html today.htmlgit add passages/YYYY-MM-DD/ history.json index.html today.html
git commit -m "passage: YYYY-MM-DD — [Title]"
git push origin main
✅ Saved to passages/YYYY-MM-DD/ and pushed to GitHub Pages
🌐 https://benjamin-taro.github.io/dele-b1-passage/today.htmlVerify the following before output:
history.json)history.json append is complete