Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 86
  • 2.4k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

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-prism

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install developing-with-prism in Claude Code

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

A

No 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 →

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.

developing-with-prism Install

Add to stack

Loading.