developing-with-prism
Skill by prism-php
Guides developers building with the Prism PHP package, a Laravel package for integrating large language models. It covers text, structured output, streaming, tools, embeddings, images and audio.
Install developing-with-prism
Built from the published package, never by AI.
git clone --depth 1 https://github.com/prism-php/prism /tmp/prism && mkdir -p ~/.claude/skills && cp -r /tmp/prism/resources/boost/skills/developing-with-prism ~/.claude/skills/developing-with-prismRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/prism-php/prism /tmp/prism && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/prism/resources/boost/skills/developing-with-prism ~/.gemini/antigravity-cli/skills/developing-with-prismAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install developing-with-prism in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill gives an AI assistant guidance for building with Prism, a Laravel package for integrating Large Language Models into applications. It describes a fluent API built around calls such as Prism::text(), Prism::structured(), Prism::embeddings(), Prism::image() and Prism::audio(), with a provider and model chosen through using().
The skill includes code examples for text generation, structured output with schemas, server-sent event streaming, tools and function calling, and multi-modal image and document input. It lists providers including OpenAI, Anthropic, Gemini, Mistral, Groq, XAI, DeepSeek, OpenRouter, Ollama, VoyageAI and ElevenLabs. It points the assistant to the Prism docs in the vendor folder and includes notes on common pitfalls. It is aimed at developers working on Prism-based Laravel projects.
Written from the project's SKILL.md and checked against it.
What it can do
- Text generationGenerates text from a prompt and optional system prompt using a chosen provider and model.
- Structured outputReturns JSON matching an object schema built from string and other schema fields.
- StreamingStreams responses to clients as server-sent events with asEventStreamResponse().
- Tools and function callingDefines tools with Tool::as() and lets the model call them over multiple steps.
- Multi-modal inputSends images and documents along with a text prompt.
- EmbeddingsCovers creating embeddings through Prism::embeddings().
- Image generationCovers image generation through Prism::image().
- Audio processingCovers text-to-speech and speech-to-text through Prism::audio().
- Provider optionsPasses provider-specific features through withProviderOptions().
What you need
- Laravel
- Composer
- Prism PHP package (prism-php/prism)
Try asking
- Show me how to stream a chat response with Prism in Laravel.
- Write a Prism structured output schema for a movie review.
- Add a weather tool to a Prism text request using Tool::as().
Good to know
- The old echolabsdev/prism package is deprecated and should not be used.
- Some newer models reject non-default temperature and top_p values.
- Refusals return a normal response with FinishReason::Refusal instead of throwing, and structured output is empty in that case.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: resources/boost/skills/developing-with-prism/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md8 KB -
references/relay.md333 B
Alternatives to developing-with-prism
All alternatives →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
Compare with agent-reproduce-align, google_contacts or m06-error-handling
developing-with-prism: common questions
Which LLM providers does Prism support?
The source lists OpenAI, Anthropic, Gemini, Mistral, Groq, XAI, DeepSeek, OpenRouter, Ollama, VoyageAI and ElevenLabs. Provider docs are in docs/providers/.
Which package name should I install?
The source says to use prism-php/prism. The older echolabsdev/prism package is deprecated.
How do I continue a conversation with Prism?
Pass $response->messages back with withMessages(), and persist each message's additionalContent. Rebuilding messages from the text drops thinking blocks and reasoning items.
How do I install developing-with-prism?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is developing-with-prism free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is developing-with-prism safe to use?
It scores 86 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to developing-with-prism?
Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.
