PHPackages                             veeqtoh/prompt-deck - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. veeqtoh/prompt-deck

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

veeqtoh/prompt-deck
===================

A Laravel package that adds versioned, file-based prompt management with variable interpolation, performance tracking, A/B testing, and optional seamless integration with the Laravel AI SDK.

v0.2.1(1mo ago)724962MITPHPPHP ^8.2CI passing

Since Mar 4Pushed 1mo agoCompare

[ Source](https://github.com/veeqtoh/prompt-deck)[ Packagist](https://packagist.org/packages/veeqtoh/prompt-deck)[ Docs](https://github.com/veeqtoh/prompt-deck)[ Fund](https://www.paypal.com/paypalme/veeqtoh)[ GitHub Sponsors](https://github.com/veeqtoh)[ RSS](/packages/veeqtoh-prompt-deck/feed)WikiDiscussions 0.x Synced 1mo ago

READMEChangelog (3)Dependencies (20)Versions (5)Used By (0)

[![Prompt Deck Logo](/docs/public/logo.svg)](/docs/public/logo.svg)

[![Latest Version on Packagist](https://camo.githubusercontent.com/dbd80b5f55fec7a0d1e6fd79fc7bef9bbfb4405e356ca1d3f080d038fd579ab8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f76656571746f682f70726f6d70742d6465636b3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/veeqtoh/prompt-deck)[![PHP from Packagist](https://camo.githubusercontent.com/4c47de14e36ed5dc190b99bd26bdd49e1b3618bff51a0930f12514bc2a91c950/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f76656571746f682f70726f6d70742d6465636b3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/veeqtoh/prompt-deck)[![GitHub license](https://camo.githubusercontent.com/0991292dff078d8614f6d4c1a7fbb2920823687f3cf34a0a43e2f7ecf93f06b6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f76656571746f682f70726f6d70742d6465636b3f7374796c653d666c61742d737175617265)](https://github.com/veeqtoh/prompt-deck/blob/master/LICENSE)[ ![https://laravel-news.com/prompt-deck-manage-ai-prompts-as-versioned-files-in-laravel](https://camo.githubusercontent.com/1d17ad528f12e9148d3473dc68c44964747b5c71e7eea903338f84aa91207071/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f466561747572656420696e204c61726176656c204e6577732d254646303030302e7376673f267374796c653d666c61742d737175617265266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465) ](https://laravel-news.com/prompt-deck-manage-ai-prompts-as-versioned-files-in-laravel/)

Introduction
------------

[](#introduction)

Prompt Deck helps you organise your AI Agents instructions as structured, version-controlled files, making it easy to iterate, compare, and activate prompt versions across your Laravel / PHP application. It provides variable interpolation, performance tracking, A/B testing, and optional seamless integration with the Laravel AI SDK.

Quick Start
-----------

[](#quick-start)

### Installation

[](#installation)

```
composer require veeqtoh/prompt-deck
```

Publish the config and migrations

```
php artisan vendor:publish --provider="Veeqtoh\PromptDeck\Providers\PromptDeckServiceProvider"

# Run migrations.
php artisan migrate
```

### Creating a Prompt

[](#creating-a-prompt)

Use the Artisan command to create a versioned prompt

```
php artisan make:prompt order-summary
```

This creates the following structure

```
resources/prompts/
└── order-summary/
    ├── v1/
    │   └── system.md
    └── metadata.json

```

Edit `resources/prompts/order-summary/v1/system.md` with your prompt content. Use `{{ $variable }}` syntax for dynamic values:

```
You are a {{ $tone }} customer service agent.
Summarise the following order for the customer: {{ $order }}.
```

### Using a Prompt

[](#using-a-prompt)

Load and render prompts with the `PromptDeck` facade

```
use Veeqtoh\PromptDeck\Facades\PromptDeck;

// Load the active version of a prompt
$prompt = PromptDeck::get('order-summary');

// Render a role with variables
$prompt->system(['tone' => 'friendly', 'order' => $orderDetails]);
// "You are a friendly customer service agent. Summarise the following order..."

// Build a messages array ready for any chat-completion API
$messages = $prompt->toMessages(['tone' => 'friendly', 'order' => $orderDetails]);
// [['role' => 'system', 'content' => '...']]
```

### Versioning

[](#versioning)

Create a new version of an existing prompt

```
php artisan make:prompt order-summary
# Automatically creates v2, v3, etc.
```

Activate a specific version

```
php artisan prompt:activate order-summary v2
```

Or load a specific version programmatically

```
$prompt = PromptDeck::get('order-summary', 'v2');
```

### Laravel AI SDK Integration

[](#laravel-ai-sdk-integration)

If you use the [Laravel AI SDK](https://laravel.com/docs/ai-sdk), add the `HasPromptTemplate` trait to your agents. This way, you do not need to define the `instructions()` method as it is provided automatically.

```
use Veeqtoh\PromptDeck\Concerns\HasPromptTemplate;

class OrderAgent extends Agent
{
    use HasPromptTemplate;

    // instructions() and promptMessages() are provided automatically.
}
```

Running `make:agent` will also auto-scaffold a matching prompt directory.

For the complete guide, see the [full documentation](#documentation) below.

---

Documentation
-------------

[](#documentation)

Full documentation can be found on the [Prompt Deck website](https://vu-ddaf4ff3.mintlify.app/) or the [docs](docs/) directory on GitHub.

Contributing
------------

[](#contributing)

Thank you for considering contributing to Prompt Deck! Please open an issue or submit a pull request on [GitHub](https://github.com/veeqtoh/prompt-deck).

Code of Conduct
---------------

[](#code-of-conduct)

While we aren't affiliated with Laravel, we follow the Laravel [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). We expect you to abide by these guidelines as well.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you discover a security vulnerability within Prompt Deck, please email Victor Ukam at [victorjohnukam@gmail.com](victorjohnukam@gmail.com). All security vulnerabilities will be addressed promptly.

License
-------

[](#license)

Prompt Deck is open-sourced software licensed under the [MIT license](LICENSE).

Support
-------

[](#support)

This library is created by [Victor Ukam](https://victorukam.com) with contributions from the [Open Source Community](https://github.com/veeqtoh/prompt-deck/graphs/contributors). If you've found this package useful, please consider [sponsoring this project](https://github.com/sponsors/veeqtoh). It will go a long way to help with maintenance.

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance98

Actively maintained with recent releases

Popularity31

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Total

4

Last Release

42d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d506cce25345d6a03f9a0acf7ae4b57fa21bc83d98cb73d2f3d6f10d1140bc3?d=identicon)[veeqtoh](/maintainers/veeqtoh)

---

Top Contributors

[![veeqtoh](https://avatars.githubusercontent.com/u/19429315?v=4)](https://github.com/veeqtoh "veeqtoh (34 commits)")

---

Tags

ailarvelphppromptprompt-engineeringlaravelailaravel-packagelaravel-ai-sdklaravel-aiab-testingvictor-ukamperformance-trackingprompt-managementversioned-promptsfile-based-promptsvariable-interpolationagentic-aiagentic-prompting

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/veeqtoh-prompt-deck/health.svg)

```
[![Health](https://phpackages.com/badges/veeqtoh-prompt-deck/health.svg)](https://phpackages.com/packages/veeqtoh-prompt-deck)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M682](/packages/barryvdh-laravel-ide-helper)[ashallendesign/short-url

A Laravel package for creating shortened URLs for your web apps.

1.4k1.9M4](/packages/ashallendesign-short-url)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[sbsaga/toon

🧠 TOON for Laravel — a compact, human-readable, and token-efficient data format for AI prompts &amp; LLM contexts. Perfect for ChatGPT, Gemini, Claude, Mistral, and OpenAI integrations (JSON ⇄ TOON).

6115.6k](/packages/sbsaga-toon)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
