用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/UltronCore/claude-skill-vault --skill mirascope命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Validate environment configuration files across local, staging, and production environments. Ensure required secrets, database URLs, API keys, and public variables are properly scoped and set. Use this skill when setting up environments, validating configuration, checking for missing secrets, auditing environment variables, ensuring proper scoping of public vs private vars, or troubleshooting environment issues. Trigger terms include env, environment variables, secrets, configuration, .env file, environment validation, missing variables, config check, NEXT_PUBLIC, env vars, database URL, API keys.
Validate environment configuration files across local, staging, and production environments. Ensure required secrets, database URLs, API keys, and public variables are properly scoped and set. Use this skill when setting up environments, validating configuration, checking for missing secrets, auditing environment variables, ensuring proper scoping of public vs private vars, or troubleshooting environment issues. Trigger terms include env, environment variables, secrets, configuration, .env file, environment validation, missing variables, config check, NEXT_PUBLIC, env vars, database URL, API keys.
Build Raycast extensions using the Raycast API: commands, list views, forms, and preferences. Triggers on: Raycast, @raycast/api, raycast extension, raycast command, showToast, List.Item, Action.
正在显示 SKILL.md
基于 SOC 职业分类
| name | mirascope |
| description | Clean, type-safe LLM API wrapper with structured outputs, streaming, and provider-agnostic interface |
| version | 1.0.0 |
| tags | ["llm","wrapper","python","structured-output","type-safe","provider-agnostic"] |
Mirascope is a Python library that provides a clean, decorator-based interface to LLM APIs (OpenAI, Anthropic, Google, Groq, Cohere, etc.) with first-class Pydantic integration, streaming support, and automatic structured extraction. Its philosophy is to stay close to the provider APIs while eliminating boilerplate. Works with async, sync, streaming, and structured output with zero extra configuration.
GitHub: https://github.com/Mirascope/mirascope (1k+ stars)
pip install mirascope[openai]
# Or
pip install mirascope[anthropic]
pip install mirascope[google-generativeai]
pip install mirascope[groq]
from mirascope.core import openai, prompt_template
@openai.call("gpt-4o-mini")
@prompt_template("What is the capital of {country}?")
def get_capital(country: str): ...
response = get_capital(country="France")
print(response.content) # "The capital of France is Paris."
from mirascope.core import openai, Messages
@openai.call("gpt-4o-mini")
def summarize(text: str) -> Messages.Type:
return [
Messages.System("You are a concise summarizer. Reply in 1-2 sentences."),
Messages.User(f"Summarize: {text}"),
]
result = summarize("Long article text here...")
print(result.content)
from mirascope.core import anthropic
@anthropic.call("claude-3-5-haiku-20241022")
@prompt_template("Explain {concept} simply")
def explain(concept: str): ...
response = explain(concept="quantum entanglement")
print(response.content)
from mirascope.core import openai
from pydantic import BaseModel
class BookInfo(BaseModel):
title: str
author: str
year: int
genre: str
@openai.call("gpt-4o-mini", response_model=BookInfo)
@prompt_template("Extract book info: {text}")
def extract_book(text: str): ...
book = extract_book(text="The Great Gatsby by F. Scott Fitzgerald, published 1925, a literary classic.")
print(book.title) # "The Great Gatsby"
print(book.year) # 1925
print(type(book)) # <class 'BookInfo'>
from mirascope.core import openai, prompt_template
@openai.call("gpt-4o-mini", stream=True)
@prompt_template("Write a short story about {topic}")
def stream_story(topic: str): ...
for chunk, _ in stream_story(topic="a robot learning to paint"):
print(chunk.content, end="", flush=True)
print()
import asyncio
from mirascope.core import openai, prompt_template
@openai.call("gpt-4o-mini")
@prompt_template("Translate '{text}' to {language}")
async def translate(text: str, language: str): ...
async def main():
result = await translate(text="Hello world", language="Spanish")
print(result.content) # "Hola mundo"
asyncio.run(main())
from mirascope.core import openai, BaseTool
class SearchWeb(BaseTool):
"""Search the web for information."""
query: str
def call(self) -> str:
return f"Search results for: {self.query}"
@openai.call("gpt-4o", tools=[SearchWeb])
@prompt_template("Answer: {question}")
def answer_with_tools(question: str): ...
response = answer_with_tools(question="What happened in AI news today?")
if response.tool:
tool = response.tool
result = tool.call()
print(result)
from mirascope.core import openai, Messages
from mirascope.core.openai import OpenAIMessageParam
@openai.call("gpt-4o-mini")
def chat(history: list[OpenAIMessageParam], user_message: str) -> Messages.Type:
return [
*history,
Messages.User(user_message),
]
history = []
while True:
user_input = input("You: ")
response = chat(history=history, user_message=user_input)
print(f"AI: {response.content}")
history += response.message_param_stack
# Switch providers by changing the decorator — same function body
from mirascope.core import openai, anthropic, groq
# OpenAI
@openai.call("gpt-4o-mini")
@prompt_template("What is {x} + {y}?")
def add_openai(x: int, y: int): ...
# Anthropic
@anthropic.call("claude-3-5-haiku-20241022")
@prompt_template("What is {x} + {y}?")
def add_anthropic(x: int, y: int): ...
# Same logic, different provider
response_model is supported but returns partial objects; use carefullyresponse.tool before calling; it's None if model didn't call a toolinstructor — alternative for structured extraction (more retry logic)litellm-proxy — unified proxy with provider switchingstructured-output-extraction — general structured extraction patternsclaude-api-skill — direct Anthropic SDK usagetool: mirascope
category: llm-client
tier: library
interface: python-sdk
platform: cross-platform
stars: 1000+