AI agentsGuide
Build a DashForDevs site with an AI coding agent
Give the agent the right context and the right guardrails.
1 min readUpdated View as Markdown
On this page
AI coding agents are very good at storefront work when they have accurate context. Give them these docs instead of letting them guess.
Give it context
- Point it at https://docs.dashfordevs.com/llms-full.txt, or the specific pages it needs with
.mdadded (for example/v1/sdk/modules.md). - Tell it the stack: Next.js App Router, the
dash4devsSDK, server components for data.
Give it guardrails
Paste this into your agent's instructions:
- Use the dash4devs SDK. Server code uses lib/dash.server.ts (secret key, import "server-only").
Browser code uses lib/dash.client.ts (public key). Never import the server client from a client component.
- Never put an sk_ key in a NEXT_PUBLIC_ variable, client code, a log line or a commit.
- Handle DashApiError: 404 -> notFound(); 501/503 with available:false -> show a friendly "not available" state, never retry.
- Use DashImage for every image from the API.
- No em dashes in copy.Check its work
grep -r "sk_" app components libfinds nothing outside your server-only module and.env*.- The production build passes and pages render on the server (view source shows the content).
- Live keys and your domain under Allowed origins before launch.
Keep reading
Something wrong or missing on this page? Email support@dashfordevs.com.