Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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:

  1. Create output file (or detect existing)
  2. Write header with section plan as YAML frontmatter
  3. Generate content hash placeholder for integrity checking
  4. Present checklist for tracking

Templates (optional):

  • bspec - 15-section B-SPEC structure
  • report - Standard report structure
  • spec - 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:

  1. Check section exists in plan and is pending
  2. Generate content for section
  3. Compute content hash
  4. Write to temporary location first
  5. Validate write completed (check for SECTION_END marker)
  6. Append to main file with SECTION_START and SECTION_END markers
  7. Update section status to completed with 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:

  1. SECTION_START marker exists
  2. SECTION_END marker exists
  3. Hashes in both markers match
  4. 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
Полный SKILL.md на GitHub

Установить streaming-output в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

.claude-plugin/plugin.jsoncommands/stream.finalize.mdcommands/stream.init.mdcommands/stream.repair.mdcommands/stream.resume.mdcommands/stream.status.mdcommands/stream.write.mdscripts/stream_cleanup.pyscripts/stream_repair.pyscripts/stream_status.pyscripts/stream_write.py

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 запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить streaming-output с