streaming-output
БесплатноЗапускает вложенные скриптыНе проверенStream long-form content to markdown files with resume capability. Writes content incrementally with section markers, enabling recovery if context limits are…
от ddunnock★ 15 звёзд на GitHubОб этом скилле
Streaming Output
Write long-form content incrementally to markdown files with automatic resume capability. If context limits are hit mid-generation, work persists and can be continued.
⚠️ MANDATORY USE CASES
ALWAYS use this skill when:
- Generating B-SPEC documents (typically 1,500-4,000 lines)
- Writing any document expected to exceed 1,000 lines
- Creating multi-section specifications or reports
- Context compaction has already occurred in the conversation
- The continuation prompt mentions streaming-output
DO NOT use manual heredoc appends (cat >> file << 'EOF') for long documents. This pattern fails silently when context compaction occurs mid-write, causing content corruption that is difficult to detect and repair.
Commands
| Command | Purpose |
|---|---|
/stream.init |
Initialize output file with section plan |
/stream.write |
Write next section to file |
/stream.status |
Show progress, detect resume point, check integrity |
/stream.resume |
Continue from last completed section |
/stream.repair |
Fix corrupted/partial sections |
/stream.finalize |
Strip markers, validate completeness |
Quick Start
# 1. Initialize with a plan
/stream.init report.md --sections "intro,methodology,findings,conclusion"
# 2. Write sections (repeat for each)
/stream.write intro
/stream.write methodology
# ... if interrupted, resume later with:
/stream.resume
# 3. Finalize when complete
/stream.finalize
/stream.init
Initialize an output file with a section plan.
Usage: /stream.init <filepath> --sections "<comma-separated-list>" [--template <template-name>]
Workflow:
- Create output file (or detect existing)
- Write header with section plan as YAML frontmatter
- Generate content hash placeholder for integrity checking
- Present checklist for tracking
Templates (optional):
bspec- 15-section B-SPEC structurereport- Standard report structurespec- Generic specification structure
Example:
# Standard initialization
python scripts/stream_write.py init report.md \
--sections "introduction,background,analysis,recommendations,conclusion"
# B-SPEC template (pre-defined 15 sections)
python scripts/stream_write.py init b-spec-010.md --template bspec
Output file structure:
---
stream_plan:
version: "2.0"
sections:
- id: introduction
status: pending
hash: null
- id: background
status: pending
hash: null
- id: analysis
status: pending
hash: null
created: 2024-01-15T10:30:00
last_modified: null
integrity_check: true
---
# Report
<!-- Content will be streamed below -->
/stream.write
Write a single section to the file with markers and integrity verification.
Usage: /stream.write <section-id>
Workflow:
- Check section exists in plan and is pending
- Generate content for section
- Compute content hash
- Write to temporary location first
- Validate write completed (check for SECTION_END marker)
- Append to main file with
SECTION_STARTandSECTION_ENDmarkers - Update section status to
completedwith hash
Script:
python scripts/stream_write.py write report.md introduction "Your content here..."
Markers in file:
<!-- SECTION_START: introduction | hash:a1b2c3d4 -->
## Introduction
Your introduction content here...
<!-- SECTION_END: introduction | hash:a1b2c3d4 -->
Important:
- Write ONE section at a time
- Verify success before proceeding
- Hash in START and END markers must match (integrity check)
Write Verification
After each write, the skill automatically verifies:
SECTION_STARTmarker existsSECTION_ENDmarker exists- Hashes in both markers match
- Content between markers is non-empty
If verification fails, the write is flagged and /stream.repair is recommended.
/stream.status
Show current progress, identify resume point, and check integrity.
Usage: /stream.status <filepath> [--verify]
Script:
python scripts/stream_status.py report.md
python scripts/stream_status.py report.md --verify # Full integrity check
Standard Output:
Stream Status: report.md
Sections:
[x] introduction (completed) ✓
[x] background (completed) ✓
[ ] analysis (pending) <- RESUME HERE
[ ] recommendations (pending)
[ ] conclusion (pending)
Progress: 2/5 sections (40%)
Next section: analysis
With --verify flag (integrity check):
Stream Status: report.md
Integrity Check:
[x] introduction - hash:a1b2c3d4 ✓ valid
[x] background - hash:e5f6g7h8 ✓ valid
[!] analysis - CORRUPTED (START without END)
[ ] recommendations - pending
[ ] conclusion - pending
⚠️ CORRUPTION DETECTED in section: analysis
Run `/stream.repair analysis` to fix
Progress: 2/5 sections (40%)
Next section: analysis (requires repair)
Corruption Detection
The status command detects:
- **Orph
Установить streaming-output в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл streaming-output?
Stream long-form content to markdown files with resume capability. Writes content incrementally with section markers, enabling recovery if context limits are hit. Use when generating long documents (over 1000 lines), B-SPEC or specification writing, multi-section reports, any task where context compaction may occur mid-generation, or when user explicitly requests streaming output. Commands: init, write, status, resume, finalize, repair.
Как установить скилл streaming-output?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл streaming-output запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic