Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill streaming-output명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
SOC 직업 분류 기준
| name | streaming-output |
| description | > Use when this capability is needed. |
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.
ALWAYS use this skill when:
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.
| 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 |
# 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
Initialize an output file with a section plan.
Usage: /stream.init <filepath> --sections "<comma-separated-list>" [--template <template-name>]
Workflow:
Templates (optional):
bspec - 15-section B-SPEC structurereport - Standard report structurespec - Generic specification structureExample:
# 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 -->
Write a single section to the file with markers and integrity verification.
Usage: /stream.write <section-id>
Workflow:
SECTION_START and SECTION_END markerscompleted with hashScript:
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:
After each write, the skill automatically verifies:
SECTION_START marker existsSECTION_END marker existsIf verification fails, the write is flagged and /stream.repair is recommended.
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)
The status command detects:
SECTION_START exists without matching SECTION_ENDContinue writing from the last incomplete section.
Usage: /stream.resume <filepath>
Workflow:
/stream.write for next pending sectionScript:
python scripts/stream_status.py report.md --resume
Output:
Resume Point: report.md
Last completed: background
Next pending: analysis
Context from previous sections loaded (2,450 tokens)
Ready to write: analysis
Command: /stream.write analysis
If corruption is detected:
Resume Point: report.md
⚠️ CORRUPTION DETECTED
Section 'analysis' has incomplete markers.
Recommended action:
1. Run `/stream.repair analysis` to remove partial content
2. Then run `/stream.write analysis` to regenerate
Command: /stream.repair analysis
Fix corrupted or partial sections.
Usage: /stream.repair <filepath> <section-id> [--strategy <strategy>]
Strategies:
remove (default): Remove partial content, reset section to pendingcomplete: Attempt to add missing END marker (use with caution)backup: Create backup before repairWorkflow:
SECTION_START to end of partial contentpendingScript:
python scripts/stream_repair.py report.md analysis --strategy remove
Output:
Repair Report: report.md
Section: analysis
Issue: Orphaned SECTION_START (no SECTION_END found)
Strategy: remove
Action: Removed 847 characters of partial content
Before:
<!-- SECTION_START: analysis | hash:null -->
## Analysis
Partial content here...
[truncated]
After:
Section 'analysis' reset to pending status
Backup created: report.md.backup.20240115-103045
Ready to regenerate: /stream.write analysis
Strip markers and validate completeness.
Usage: /stream.finalize <filepath> [--output <output-filepath>]
Workflow:
SECTION_START and SECTION_END markersScript:
python scripts/stream_cleanup.py report.md --output final_report.md
Pre-finalize validation:
Finalize Check: report.md
Sections:
[x] introduction ✓
[x] background ✓
[x] analysis ✓
[x] recommendations ✓
[x] conclusion ✓
All sections complete: YES
All hashes valid: YES
Ready to finalize: YES
Finalizing...
Output written to: final_report.md
Markers removed: 10
Lines in final document: 1,247
If validation fails:
Finalize Check: report.md
⚠️ CANNOT FINALIZE - Issues detected:
[ ] recommendations - PENDING (not written)
[!] conclusion - CORRUPTED (hash mismatch)
Fix required before finalization:
1. /stream.write recommendations
2. /stream.repair conclusion
The section has SECTION_START but no SECTION_END:
<!-- SECTION_START: analysis | hash:null -->
## Analysis
Partial content here...
[truncated - no SECTION_END]
Recovery:
/stream.status --verify detects incomplete section/stream.repair analysis removes partial content and preserves it as context/stream.status shows the preserved context file with preview/stream.write analysis continues from where interrupted (don't restart!)Context Preservation:
When repair runs, incomplete content is saved to a .context file:
report.analysis.context # Contains the incomplete content
This allows Claude to:
All written sections have both markers:
<!-- SECTION_END: background | hash:e5f6g7h8 -->
Recovery:
/stream.resume finds next pending section/stream.writeSTART and END hashes don't match (content corrupted during write):
<!-- SECTION_START: analysis | hash:a1b2c3d4 -->
...
<!-- SECTION_END: analysis | hash:x9y8z7w6 -->
Recovery:
/stream.status --verify flags hash mismatch/stream.repair analysis --strategy remove/stream.write analysis regeneratesProblem: Using cat >> file << 'EOF' without streaming-output markers:
# DON'T DO THIS for long documents
cat >> spec.md << 'EOF'
## Section 12
Content...
EOF
If context compaction occurs, the heredoc may be split, causing:
Prevention: Always use streaming-output for documents >1000 lines.
For B-SPEC documents, use the built-in template:
/stream.init b-spec-010-llm-integration.md --template bspec
This creates the standard 15-section structure:
stream_plan:
version: "2.0"
template: bspec
sections:
- id: overview
status: pending
hash: null
- id: architecture
status: pending
hash: null
- id: section-03 # Domain-specific
status: pending
hash: null
- id: section-04
status: pending
hash: null
- id: section-05
status: pending
hash: null
- id: section-06
status: pending
hash: null
- id: section-07
status: pending
hash: null
-
Copy and track progress:
Stream Progress: [document-name]
- [ ] Initialize file with section plan
- [ ] Write each section (one at a time):
- [ ] Section 1: ___________
- [ ] Section 2: ___________
- [ ] Section 3: ___________
- [ ] ...
- [ ] Run status --verify to check integrity
- [ ] Repair any corrupted sections
- [ ] Finalize to strip markers
When context compaction interrupts a section write, the system preserves your work:
<file>.<section>.context# 1. Check status and see context
python scripts/stream_status.py report.md
# Output includes:
# 📝 Context files (from previous incomplete writes):
# analysis: report.analysis.context (2847 bytes)
# Preview (last 500 chars):
# | The normalization formula uses...
# | This ensures that all criteria...
# 2. Read the full context if needed
cat report.analysis.context
# 3. Continue writing (DON'T restart from scratch)
# Your content should pick up where the context file ended
When a context file exists:
This saves significant tokens and maintains coherence.
/stream.status --verify after resuming.context files| Anti-Pattern | Problem | Solution |
|---|---|---|
| Manual heredoc appends | No corruption detection | Use streaming-output |
| Skipping status checks | Miss corruption | Run status after each write |
| Ignoring hash mismatches | Propagate bad content | Repair immediately |
| Writing multiple sections at once | Can't identify failure point | One section at a time |
| Not using templates | Inconsistent structure | Use bspec template |
| Finalizing without verify | May include corrupted content | Always --verify first |
When creating continuation prompts for long document generation:
/stream.status <file> --verify to check progress"Example continuation prompt snippet:
## Document Generation Status
Using streaming-output skill for B-SPEC-010.
Current status:
- Sections 1-5: Complete ✓
- Section 6: Pending (resume here)
- Sections 7-15: Pending
Resume command: `/stream.resume b-spec-010.md`
| Script | Purpose | Usage |
|---|---|---|
stream_write.py | Init and write operations | python scripts/stream_write.py <command> <args> |
stream_status.py | Progress, verification, and resume detection | python scripts/stream_status.py <filepath> [--verify] [--resume] |
stream_repair.py | Fix corrupted sections | python scripts/stream_repair.py <filepath> <section> [--strategy] |
stream_cleanup.py | Finalize and strip markers | python scripts/stream_cleanup.py <filepath> [--output] |
Run any script with --help for detailed options.
.context files/stream.repair command for fixing corrupted sections--verify flag to status command--template bspec)Converted and distributed by TomeVault — claim your Tome and manage your conversions.