Skip to content

Conversation

@aidankmcalister
Copy link
Member

@aidankmcalister aidankmcalister commented Oct 9, 2025

Added a new route at prisma.io/docs/ai/prompts/ to store all the incoming AI prompts.

Summary by CodeRabbit

  • New Features

    • Added a "Prompts" entry under the Prisma + AI sidebar for quick access to an Astro prompt.
  • Documentation

    • Published a comprehensive Astro + Prisma + Postgres prompt guide covering setup, schema, global client pattern, API & server-side usage, strict generation requirements and verification steps, error-handling guidance, environment recommendations, and useful commands.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2025

Dangerous URL check

No absolute URLs to prisma.io/docs found.
No local URLs found.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 9, 2025

Walkthrough

Adds a new MDX prompt guide for bootstrapping Astro with Prisma and Postgres and updates the AI sidebar to include a non-collapsible "Prompts" category containing the Astro prompt, inserted before the existing "Coding Tools" entry.

Changes

Cohort / File(s) Summary
AI Prompt Documentation
content/900-ai/prompts/astro.mdx
New MDX file providing a comprehensive Astro + Prisma + Postgres prompt: metadata, usage instructions, standardized Prisma Client + Accelerate pattern, installation/initialization examples, API and Astro page examples, verification steps, commands, and a strict AI response template.
AI Sidebar Configuration
sidebars.ts
Adds a non-collapsible "Prompts" category under the "Prisma + AI" aiSidebar with the item ai/prompts/astro, inserted before the existing "Coding Tools" category.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly indicates the introduction of the Astro AI prompt file and matches the main change in the pull request by referencing the relevant feature.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2025

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2025

Redirect check

This PR probably requires the following redirects to be added to static/_redirects:

  • This PR does not change any pages in a way that would require a redirect.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 9, 2025

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9c9e0c0
Status: ✅  Deploy successful!
Preview URL: https://86e9eb21.docs-51g.pages.dev
Branch Preview URL: https://dc-5271-astro-ai-prompt.docs-51g.pages.dev

View logs

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
content/900-ai/prompts/astro.mdx (1)

37-73: Consider moderating the emphatic tone.

While the critical warnings section effectively emphasizes important patterns, the extensive use of emoji, ALL CAPS, and repetitive warnings might be overwhelming. The instructional intent is clear, but a slightly more measured tone could maintain authority while improving readability.

This is a stylistic consideration—the current approach may be intentional for AI model consumption, so feel free to keep it if testing shows it improves AI adherence to the guidelines.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 74f9181 and 1828f5e.

📒 Files selected for processing (2)
  • content/900-ai/prompts/astro.mdx (1 hunks)
  • sidebars.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: runner / linkspector
  • GitHub Check: Check internal links
  • GitHub Check: Lost Pixel
🔇 Additional comments (7)
sidebars.ts (1)

530-536: LGTM!

The new "Prompts" category is correctly structured and positioned. The configuration follows the established patterns in the sidebar, with appropriate collapsed: false and collapsible: false settings. The path reference "ai/prompts/astro" correctly points to the new MDX file.

content/900-ai/prompts/astro.mdx (6)

1-7: LGTM!

The frontmatter metadata is well-structured with appropriate title, description, and image reference for the prompt guide.


9-17: LGTM!

Clear usage instructions for integrating the prompt across multiple AI coding assistants. The tool-specific syntax guidance is helpful.


137-189: LGTM!

The API route implementation examples demonstrate excellent practices:

  • Comprehensive try-catch error handling
  • Proper HTTP status codes (200, 201, 400, 500)
  • Input validation for POST requests
  • Consistent response formatting
  • Clear separation of concerns

These patterns provide solid guidance for Prisma integration in Astro API routes.


191-210: LGTM!

The Astro page example correctly demonstrates server-side data fetching using Prisma. The pattern is simple, clear, and appropriate for Astro's architecture.


242-248: LGTM!

The useful commands section provides essential Prisma CLI commands for day-to-day development. These are accurate and helpful for developers.


64-64: Keep the /client suffix Prisma Client v6 generates its code in a client subfolder under your custom output, so import { PrismaClient } from "../generated/prisma/client" is correct.

Likely an incorrect or invalid review comment.

coderabbitai[bot]
coderabbitai bot previously approved these changes Oct 9, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Oct 9, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2078b06 and 9c9e0c0.

📒 Files selected for processing (1)
  • content/900-ai/prompts/astro.mdx (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-09T21:32:50.318Z
Learnt from: aidankmcalister
PR: prisma/docs#7167
File: content/900-ai/prompts/astro.mdx:84-84
Timestamp: 2025-10-09T21:32:50.318Z
Learning: The `npx prisma init` command supports the following flags: `--db` (shorthand for `--datasource-provider prisma+postgres`), `--output` (specifies output location for generated client), `--generator-provider` (defines the generator provider), `--datasource-provider`, `--url`, `--preview-feature`, and `--with-model`. These are documented valid CLI options for Prisma init command.

Applied to files:

  • content/900-ai/prompts/astro.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: runner / linkspector
  • GitHub Check: Check internal links
  • GitHub Check: Lost Pixel

@aidankmcalister aidankmcalister merged commit 797056d into main Oct 10, 2025
11 checks passed
@aidankmcalister aidankmcalister deleted the DC-5271-astro-ai-prompt branch October 10, 2025 14:14
This was referenced Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants