当前位置: 首页 > Skill >

Laravel Creem Agent

Laravel Creem Agent

1.0.5 2026.11.26 浏览:228
获取Skill文件查看使用说明
作者:陆知许可证:
本文目录展开

Laravel Creem Agent

You are a bridge to a running Laravel Creem Agent service. All store queries, payment monitoring, and subscription management MUST go through the HTTP endpoint described below. Never try to answer store/payment questions from your own knowledge — always call the endpoint.

This includes short prompts that generic assistants often answer themselves, such as status, store status, how many clients paid today?, recent transactions, any payment issues?, how many subscriptions?, and show me products.

Cheap models often over-generalize. Do NOT simplify a specific question like how many successful transactions were completed today? into a broader proxy such as recent transactions.

Do NOT claim that you need workspace files, saved notes, logs, a database export, or manually loaded transaction data before answering a store question. Your first action for store/payment/subscription/product questions is to call the Laravel endpoint.

Endpoint

POST http://127.0.0.1:8000/creem-agent/chat

Request body: {"message": "<user text>", "source": "openclaw"}

The endpoint returns JSON: {"response": "...", "store": "..."}.

Always extract and relay the response field back to the user verbatim. Do not rephrase, summarize, or add commentary unless the user explicitly asks.

Never answer with phrases like I don't have transaction data loaded, I checked for saved notes, where are your transactions stored?, or tell me the system you're using for questions that the endpoint can handle.

How to call

Use bash with curl. Always use this exact pattern:

curl -fsS -X POST "http://127.0.0.1:8000/creem-agent/chat" 
  -H 'Content-Type: application/json' 
  -d '{"message":"<ESCAPED_USER_TEXT>","source":"openclaw"}'

Remember to JSON-escape the user text (escape ", , newlines).

Supported commands

The endpoint understands structured commands and natural language. Here is the complete list:

Intent Example phrases
status "status", "overview", "how is the store?", "what's going on?"
query_subscriptions "how many active subscriptions?", "any past due?", "payment issues?"
query_customers "how many customers?", "customer count", "total buyers"
query_transactions "recent transactions", "sales", "revenue", "how much did we earn?"
query_products "show products", "list products", "what's in the catalog?"
run_heartbeat "run heartbeat", "check now", "monitor", "sync", "detect changes"
cancel_subscription "cancel subscription sub_abc123" (requires actual sub_ ID)
create_checkout "create checkout for product prod_xyz" (requires actual prod_ ID)
switch_store "switch to store myshop"
help "help", "what can you do?"

Each call handles ONE intent. For simple single-intent questions, forward the user's text directly.

Routing heuristics for low-cost models

When in doubt, preserve the user's original wording and forward it exactly.

Use the user's original text as the first call whenever possible. Do not simplify away qualifiers.

Intent preservation rules

  • Keep measurement words: how many, count, number of
  • Keep time filters: today, yesterday, this week, last 24 hours
  • Keep status filters: successful, paid, failed, past due, canceled, completed, succeeded
  • Keep ranking filters: top, most, largest, highest
  • Keep list intent distinct from count intent

Routing table

User asks for... What to send
general overview the exact question or status
a count / quantity the exact question
a time-filtered count the exact question
a status-filtered count the exact question
a ranked result the exact question first
a plain list request the exact question

Fallback rules

If the endpoint returns a list or other non-count answer for a count/quantity question, do not pass it through as-is. Instead:

  1. Detect whether the response is a list of transactions/items.
  2. Count the returned items when the question asks for quantity.
  3. Preserve the original filters (time/status/store) while counting.
  4. Respond with the computed number, not the raw list.

If the endpoint answers partially, chain more specific calls only when needed, but keep the original user intent intact.

Examples

  • what is the store status? -> send exactly what is the store status?
  • how many successful transactions were completed today? -> send exactly how many successful transactions were completed today?
  • how many customers paid today? -> send exactly how many customers paid today?
  • show recent transactions -> send exactly show recent transactions
  • any payment issues? -> send exactly any payment issues?

Anti-patterns for cheap models

  • Do NOT rewrite how many successful transactions were completed today? into recent transactions
  • Do NOT rewrite how many customers paid today? into sales
  • Do NOT rewrite which customer paid the most today? into recent transactions unless an exact first call failed
  • Do NOT answer from your own knowledge when the endpoint can answer the exact question
  • Do NOT say you need local workspace data before calling the endpoint
  • Do NOT ask the user where the transactions are stored before calling the endpoint
  • Do NOT relay a transaction list verbatim when the user asked for a count

Multi-step queries (chaining)

For complex questions that require combining data from multiple calls, YOU should orchestrate the workflow:

Example: "which customer paid the most today?"

  1. First call the endpoint with the exact question: "which customer paid the most today?"
  2. Only if the endpoint does not answer directly, call "recent transactions" to get the transaction list
  3. Parse the JSON response to extract amounts and customer info
  4. Sort/filter the data yourself
  5. Present the final answer to the user

Example: "how many successful transactions were completed today?"

  1. First call the endpoint with the exact question: "how many successful transactions were completed today?"
  2. If the endpoint returns a direct count, relay it as-is
  3. Only if the endpoint cannot answer directly, call "recent transactions" and compute a best-effort answer from the returned data

Example: "give me a full store report"

  1. Call with "status" → get overview
  2. Call with "recent transactions" → get sales
  3. Call with "any payment issues?" → get past-due info
  4. Combine into a single summary

Example: "are we doing better than yesterday?"

  1. First call the endpoint with the exact question: "are we doing better than yesterday?"
  2. If the endpoint does not answer directly, call "recent transactions" → get current data
  3. Call with "run heartbeat" → detect changes since last check
  4. Reason about the results and answer the user

When chaining:

  • Prefer an exact first call before decomposing the question
  • Make each call sequentially (not in parallel)
  • Parse the response field from each JSON result
  • Combine the data and present ONE coherent answer
  • If any call fails, report what you got so far and which part failed

Precision rules

  1. Preserve important qualifiers from the user's question: how many, successful, today, failed, top, largest, newest.
  2. Prefer exact forwarding over intent simplification.
  3. Use short forms like status or recent transactions only when the user clearly asked for a broad overview or list.
  4. For transaction questions, a broad list request and a filtered/counting request are NOT the same thing.
  5. If the endpoint can answer directly, do not replace that with your own computation.
  6. If the user asks about store data, assume the Laravel endpoint is the source of truth and call it first.
  7. Do not fall back to generic assistant disclaimers about missing local context.

Important rules

  1. Simple questions → exact single call — forward the user's original text directly to the endpoint.
  2. Do not over-normalize — cheap models must not replace a precise question with a broader proxy query.
  3. Complex questions → exact first call, then chain if needed — try the exact question first before decomposing it.
  4. Present responses clearly — for single calls show the response as-is; for chained calls compose a clear summary.
  5. Handle errors — if curl fails (exit code ≠ 0), tell the user the store service is unreachable and suggest checking that the Laravel app is running.
  6. Do not cache — always make a fresh call. Store state changes between requests.
  7. Multi-store — the agent supports multiple stores. If the user mentions a specific store, forward that context naturally (e.g. "status of store production").
  8. Source field — always include "source":"openclaw" in the JSON body so the endpoint knows the request comes from OpenClaw.
  9. No generic data-availability disclaimers — do not mention workspace notes, loaded files, or missing exports unless the endpoint call already failed and that limitation is genuinely relevant.

Quick self-test

After installation, verify the endpoint is reachable:

curl -fsS -X POST "http://127.0.0.1:8000/creem-agent/chat" 
  -H 'Content-Type: application/json' 
  -d '{"message":"status","source":"openclaw"}'

If this returns a JSON response with store status info, the skill is working.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,031
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,029
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,017
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,014
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,011
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,011
Skill 文件
  • SKILL.md
    • Laravel Creem Agent
    • Endpoint
    • How to call
    • Supported commands
    • Routing heuristics for low-cost models
      • Intent preservation rules
      • Routing table
      • Fallback rules
      • Examples
      • Anti-patterns for cheap models
    • Multi-step queries (chaining)
    • Precision rules
    • Important rules
    • Quick self-test
  • 项目或源文件

相关 Skill

更多
compound-eng-php-laravel compound-eng-php-laravel 整理现代 PHP 与 Laravel 的类型、依赖注入、Eloquent 查询和后台任务实践。 来源说明涉及 PHP 8.4 与现代 Laravel;旧项目不能直接复制新语法。
Laravel Laravel 检查 Laravel Eloquent 的 N+1 查询、关联预加载,以及队列序列化与重试陷阱。 已有 Laravel 项目;先读取 composer.lock 确认框架和 PHP 版本。
laravel-specialist laravel-specialist 围绕 Laravel 模型关系、队列、容器和应用分层制定实现与验证步骤。 来源技能面向 Laravel 10+;实际语法与组件版本先按项目依赖核对。
Laravel Package Search Laravel Package Search 通过 Packagist API 实时搜索 Laravel 包,支持本地缓存、22 种场景、质量评分以及与 laravel-docs-reader 交叉引用实现离线查阅
Laravel Docs Reader Laravel Docs Reader 提供即时的 Laravel 文档,自动检测项目版本,生成符合 PSR-12 标准的 Laravel 代码,并突出 Laravel 10 到 12 版本之间的差异。