Token导航 LogoToken导航TokenDH.com
研究检索权限需确认github未标认证来源可访问clear审计未展示

laravel_using-examples-in-promptsLaravel using examples IN prompts 搜索

Agent Skill

用于辅助提示词、系统指令、Agent 行为约束和工作流模板的整理。它适合让 Agent 规范任务边界、统一输出格式、拆分操作步骤或优化提示词可复用性。使用时需要保留真实业务约束,不要把示例当硬规则;涉及自动执行、外部工具或高风险操作时,应在提示词中明确确认步骤、权限边界和失败处理方式。

总安装

931

周安装

40

GitHub Stars

公开资料未说明

下载量

326
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:laravel_using-examples-in-prompts(Laravel using examples IN prompts 搜索)
来源仓库:https://github.com/jpcaparas/superpowers-laravel
仓库路径:skills/laravel_using-examples-in-prompts
安装命令:
npx skills add jpcaparas/superpowers-laravel --skill "laravel:using-examples-in-prompts"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add jpcaparas/superpowers-laravel --skill "laravel:using-examples-in-prompts"

简介

用于辅助提示词中合理使用示例,提升 Agent 输出的准确性与可复用性。

  • 适用于 Codex、Claude、Cursor、Gemini CLI 等宿主环境中的提示工程优化场景。
  • 可帮助规范任务边界与输出格式,但需保留真实业务约束,勿将示例当作硬规则。
  • 安装命令为 npx skills add jpcaparas/superpowers-laravel --skill "laravel:using-examples-in-prompts"。
  • 涉及自动执行或高风险操作时,应在提示词中明确确认步骤与权限边界。

SKILL.md

Using Examples in Prompts

Examples clarify intent better than descriptions. Show the AI what you want, don't just tell it.

Reference Existing Code

Abstract

"Create a service similar to the payment service"

Concrete

"Create OrderService following the pattern in app/Services/PaymentService.php:

class PaymentService
{
    public function __construct(
        private PaymentGateway $gateway,
        private PaymentRepository $repository
    ) {}

    public function charge(Order $order): Payment
    {
        // Implementation
    }
}

Use constructor injection, return domain objects, keep methods focused."

Why it works: Shows structure, naming, and patterns to follow.

Show Desired Style

Vague

"Use consistent naming"

Specific

"Follow our naming conventions from app/Models/Product.php:

// Relationships: camelCase, descriptive
public function orderItems(): HasMany
public function primaryCategory(): BelongsTo

// Scopes: scope prefix, descriptive
public function scopeActive(Builder $query): void
public function scopePublishedAfter(Builder $query, Carbon $date): void

// Accessors: get prefix, Attribute suffix
public function getFormattedPriceAttribute(): string

Apply same patterns to the new Subscription model."

Why it works: Concrete examples of the conventions in action.

Input/Output Examples

Unclear

"Transform the product data"

Clear

"Transform product data for the API:

Input (from database):

[
    'id' => 1,
    'name' => 'Widget',
    'price_cents' => 2999,
    'created_at' => '2024-01-15 10:30:00',
    'category' => ['id' => 5, 'name' => 'Tools']
]

Expected output:

{
    "id": 1,
    "name": "Widget",
    "price": "29.99",
    "category": "Tools",
    "created_at": "2024-01-15T10:30:00Z"
}

Use ProductResource to handle this transformation."

Why it works: Shows exact input and expected output format.

Concrete vs Abstract

Abstract

"Handle errors properly"

Concrete

"Handle errors like we do in app/Services/PaymentService.php:

try {
    $charge = $this->gateway->charge($amount);
} catch (PaymentGatewayException $e) {
    Log::error('Payment failed', [
        'order_id' => $order->id,
        'amount' => $amount,
        'error' => $e->getMessage(),
    ]);

    throw new PaymentFailedException(
        'Unable to process payment: ' . $e->getMessage(),
        previous: $e
    );
}

Use specific exceptions, log context, preserve original exception."

Why it works: Shows the exact error handling pattern to replicate.

Abstract

"Add tests"

Concrete

"Add tests following our pattern in tests/Feature/ProductTest.php:

test('user can create product with valid data', function () {
    $user = User::factory()->create();
    $category = Category::factory()->create();

    $response = $this->actingAs($user)
        ->postJson('/api/products', [
            'name' => 'New Product',
            'price' => 29.99,
            'category_id' => $category->id,
        ]);

    $response->assertCreated()
        ->assertJsonStructure(['data' => ['id', 'name', 'price']]);

    $this->assertDatabaseHas('products', [
        'name' => 'New Product',
    ]);
});

Use factories, test happy path and validation failures, check database state."

Why it works: Shows test structure, assertions, and patterns to follow.

Document Examples

When establishing new patterns, document them:

"Create a new service pattern for external API integrations. Here's the template:

// app/Services/External/BaseApiClient.php
abstract class BaseApiClient
{
    protected string $baseUrl;
    protected int $timeout = 30;
    protected int $retries = 3;

    abstract protected function authenticate(): array;

    protected function request(string $method, string $endpoint, array $data = []): array
    {
        // Retry logic, error handling, logging
    }
}

// app/Services/External/StripeClient.php
class StripeClient extends BaseApiClient
{
    protected string $baseUrl = 'https://api.stripe.com/v1';

    protected function authenticate(): array
    {
        return ['Authorization' => 'Bearer ' . config('services.stripe.secret')];
    }

    public function createCharge(int $amount): array
    {
        return $this->request('POST', '/charges', ['amount' => $amount]);
    }
}

Use this pattern for all external API clients. Document in docs/patterns/external-apis.md."

Why it works: Creates a reusable pattern with documentation for future reference.

Quick Reference

Make examples work for you:

  • Show existing code - Reference actual files from your project
  • Demonstrate style - Show naming, structure, patterns in action
  • Provide input/output - Clarify transformations with concrete data
  • Use real code - Snippets from your codebase, not generic examples
  • Document patterns - Turn good examples into reusable templates

Examples > explanations. Show, don't just tell.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

33.48%
按下载量换算109

Antigravity

22.8%
按下载量换算74

windsurf

17.36%
按下载量换算57

OpenCode

11.95%
按下载量换算39

Gemini CLI

8.91%
按下载量换算29

Codex

3.42%
按下载量换算11

安全审计

暂无安全审计结果可展示。

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills