Skip to main content

structured-output

Produce validated, schema-compliant structured data for direct consumption by tools, APIs, or pipelines.

소스 정보

저장소
glayph/Agent
최근 소스 활동
2026년 9월 19일 22:39
감지된 SKILL.md 언어
영어
스타
0
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
structured-output
description
Produce validated, schema-compliant structured data for direct consumption by tools, APIs, or pipelines.
version
1.0.0
author
Miki
license
MIT
platforms
["linux","macos","windows"]
metadata
{"Miki":{"tags":["structured-output","json","schema","tool-integration"],"related_skills":["testing-debugging"]}}
# Structured Output & Tool Integration ## Output formats by use case ### JSON (machine consumption) ```json { "action": "edit_file", "params": { "filePath": "...", "oldString": "...", "newString": "..." } } ``` ### CSV/TSV (tabular data) ``` name,type,path main,entry,src/index.ts ``` ### Markdown tables (human + machine) ```markdown | Key | Value | |-----|-------| |`timeout`|30000| ``` ### YAML (config generation) ```yaml server: host: 127.0.0.1 port: 8000 ``` ## Schema-first approach 1. Define output shape before generating content 2. Validate output against schema after generation 3. Reject + retry if validation fails (max 2 retries) ## Tool integration patterns ### Pattern A — Direct tool call Output maps 1:1 to tool parameters. Produce JSON that feeds directly into tool execution. ### Pattern B — Pipeline format Output is an ordered array of tool calls for sequential execution: ```json [ { "tool": "grep", "args": { "pattern": "foo", "path": "src" } }, { "tool": "read", "args": { "filePath": "<result>" } } ] ``` ### Pattern C — Conditional branching Output includes `condition` field to decide next step: ```json { "condition": "file_exists", "if_true": { "tool": "read", ... }, "if_false": { "tool": "write", ... } } ``` ## Rules - Always wrap JSON in code fences with language tag - Flatten nesting to max 3 levels deep unless schema requires deeper - Null fields: omit instead of including as `null` - Arrays: prefer homogeneous types, no mixing - Use snake_case for keys (matches opencode tool conventions)
GitHub에서 보기