chimit/prompt
Composer 安装命令:
composer require chimit/prompt
包简介
Manage AI prompts in Blade style.
README 文档
README
Prompt is a simple Laravel package for managing your AI prompts in Markdown files, with the full power of Blade.
Installation
You can install the package via composer:
composer require chimit/prompt
Usage
Create Your Prompts
Create your prompt files in the resources/prompts directory using the .md extension. You can organize them in subdirectories as needed:
resources/
└── prompts/
├── seo/
│ └── product-meta.md
└── welcome.md
Use Blade Syntax in Your Prompts
Your prompt files support full Blade syntax, including variables, PHP expressions, and unsafe HTML rendering. Here's an example resources/prompts/seo/product-meta.md:
You are an SEO expert specializing in e-commerce. Generate a compelling meta description for this product. **Product:** {{ $product->name }} **Price:** ${{ number_format($product->price, 2) }} **Product Description:** --- {!! $product->description !!} --- @if($product->discount_percentage > 0) **Special Offer:** {{ $product->discount_percentage }}% OFF - Limited Time! @endif Requirements: - Maximum 160 characters - Include the product name and key benefits - Create urgency if there's a discount - Target keywords: {{ implode(', ', $keywords) }}
Render Your Prompts
Use the Prompt::get() method to render your prompts with data, just like you would with Blade views:
use Chimit\Prompt; $prompt = Prompt::get('seo/product-meta', [ 'product' => $product, 'keywords' => ['wireless headphones', 'bluetooth', 'noise cancelling'] ]);
chimit/prompt 适用场景与选型建议
chimit/prompt 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10.99k 次下载、GitHub Stars 达 42, 最近一次更新时间为 2025 年 09 月 28 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「blade」 「ai」 「prompts」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 chimit/prompt 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 chimit/prompt 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 chimit/prompt 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
An AI bot made for the command line that can read and understand any codebase from your Laravel app.
Deck is a Laravel and PHP package for versioned, file-based AI prompt management with variable interpolation, performance tracking, A/B testing, and optional Laravel AI SDK integration.
Deck is a Laravel and PHP package for versioned, file-based AI prompt management with variable interpolation, performance tracking, A/B testing, and optional Laravel AI SDK integration.
Templating library for ai prompts.
Production-ready AI workflows for Laravel — resilient calls with retries, fallback models, and prompt management.
Alfabank REST API integration
统计信息
- 总下载量: 10.99k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 42
- 点击次数: 26
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-28