Install
$ agentstack add skill-noppu-labs-ai-toolkit-laravel-services ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Laravel Services
External services use Laravel's Manager pattern with multiple drivers.
Related guides:
- [Testing](../laravel-testing/SKILL.md) - Testing with null drivers
When to Use
Use service layer when:
- Integrating external APIs
- Multiple drivers for same service (email, payment, SMS)
- Need to swap implementations
- Want null driver for testing
Structure
Services/
└── Payment/
├── PaymentManager.php # Manager (extends Laravel Manager)
├── Connectors/
│ └── StripeConnector.php # Saloon HTTP connector
├── Contracts/
│ └── PaymentDriver.php # Driver interface
├── Drivers/
│ ├── StripeDriver.php # Stripe implementation
│ ├── PayPalDriver.php # PayPal implementation
│ └── NullDriver.php # For testing
├── Exceptions/
│ └── PaymentException.php
├── Facades/
│ └── Payment.php # Facade
└── Requests/
└── Stripe/
├── CreatePaymentIntentRequest.php
└── RefundPaymentRequest.php
Manager Class
config->get('payment.default');
}
public function createStripeDriver(): StripeDriver
{
return new StripeDriver(
apiKey: $this->config->get('payment.drivers.stripe.api_key'),
webhookSecret: $this->config->get('payment.drivers.stripe.webhook_secret'),
);
}
public function createNullDriver(): NullDriver
{
return new NullDriver;
}
}
Driver Contract
sendRequest(
new CreatePaymentIntentRequest($amount, $currency)
);
return PaymentIntentData::from($response->json());
}
public function refundPayment(string $paymentIntentId, ?int $amount = null): bool
{
// Implementation...
}
private function sendRequest(Request $request): Response
{
$response = $this->getConnector()->send($request);
if ($response->failed()) {
throw PaymentException::failedRequest($response);
}
return $response;
}
private function getConnector(): StripeConnector
{
if (static::$connector === null) {
static::$connector = new StripeConnector($this->apiKey);
}
return static::$connector;
}
}
Saloon Connector
"Bearer {$this->apiKey}",
'Content-Type' => 'application/json',
];
}
}
Saloon Request
$this->amount,
'currency' => $this->currency,
];
}
}
Facade
id);
// Use specific driver
Payment::driver('stripe')->createPaymentIntent(10000, 'usd');
Payment::driver('paypal')->createPaymentIntent(10000, 'usd');
// Use in actions
class ProcessPaymentAction
{
public function __invoke(Order $order, PaymentData $data): Payment
{
$paymentIntent = Payment::createPaymentIntent(
amount: $order->total,
currency: 'usd'
);
// ...
}
}
Null Driver for Testing
'pi_test_' . uniqid(),
'amount' => $amount,
'currency' => $currency,
'status' => 'succeeded',
]);
}
public function refundPayment(string $paymentIntentId, ?int $amount = null): bool
{
return true;
}
public function retrievePaymentIntent(string $paymentIntentId): PaymentIntentData
{
return PaymentIntentData::from([
'id' => $paymentIntentId,
'status' => 'succeeded',
]);
}
}
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: noppu-labs
- Source: noppu-labs/ai-toolkit
- License: MIT
- Homepage: https://noppu-labs.github.io/ai-toolkit/
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.