ai-prompting-structured-output
БесплатноБез исполняемых скриптовНе проверенSub-skill of ai-prompting: Structured Output (+2).
от vamseeachanta★ 21 звезда на GitHubОб этом скилле
Structured Output (+2)
Structured Output
from pydantic import BaseModel
class OutputSchema(BaseModel):
summary: str
key_points: list[str]
confidence: float
# Force structured output
response = llm.complete(
prompt,
response_format={"type": "json_object"},
schema=OutputSchema.schema()
)
Error Handling and Fallbacks
def robust_llm_call(prompt, fallback_response=None):
try:
response = llm.complete(prompt, timeout=30)
if not validate_response(response):
raise ValueError("Invalid response format")
return response
except RateLimitError:
time.sleep(60)
return robust_llm_call(prompt, fallback_response)
except Exception as e:
logger.error(f"LLM call failed: {e}")
return fallback_response
Caching and Cost Optimization
import hashlib
from functools import lru_cache
@lru_cache(maxsize=1000)
def cached_embedding(text: str) -> list[float]:
return embedding_model.embed(text)
def cache_key(prompt, model, temperature):
content = f"{prompt}|{model}|{temperature}"
return hashlib.sha256(content.encode()).hexdigest()
Установить ai-prompting-structured-output в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл ai-prompting-structured-output?
Sub-skill of ai-prompting: Structured Output (+2).
Как установить скилл ai-prompting-structured-output?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ai-prompting-structured-output запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic