Install
$ agentstack add skill-nikandr-surkov-ai-saas-starter-add-ai-provider ✓ 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 Used
- ✓ 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
Add an AI provider
The contract lives in src/lib/ai/provider.ts:
generateImage({ prompt, userId }): Promise;
The default implementation is src/lib/ai/gateway.ts (Vercel AI Gateway). Read both files before writing anything.
Steps
- Ask the user first — a new provider almost always means a new
dependency, and dependencies need approval (AGENTS.md).
- Create
src/lib/ai/.tsexporting an object that satisfies the
ImageProvider interface. Keep it thin: call the API, normalize the response to { url, width, height, model }, throw on failure.
- Config comes from env. Add the new vars to:
src/lib/env.ts(Zod schema, optional unless the provider is active).env.example(with a comment and a link to where keys come from)
- Wire selection where the provider is chosen (see how
gateway.tsand the
AI_MOCK flag are dispatched) — selection stays env-driven, no provider conditionals in UI or actions.
- Do not touch the credits flow. The generate action already spends
before calling the provider and refunds on failure. Your provider just throws on error; the action handles money.
- Test: unit-test the response normalization with a mocked HTTP layer.
Then run the e2e generate flow with the real provider once, manually.
Scope note
This repo intentionally ships one provider. Multi-provider image/video/audio with job queues, auto-refunds and gallery storage is what the Pro version is for (https://nikandr.com) — don't rebuild it ad hoc here.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: nikandr-surkov
- Source: nikandr-surkov/ai-saas-starter
- License: MIT
- Homepage: https://ai-saas-starter-six.vercel.app
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.