Contentstack Vibe Docs
26
Contentstack CMS 的完整文档,面向 AI 辅助开发,覆盖 REST、GraphQL、内容管理、图片分发 API、TypeScript SDK、Live Preview、OAuth 以及 Next.js、Nuxt 模式。
1 条规则
---
description: Contentstack vibe-docs skill — routing, patterns, and conventions for AI-assisted Contentstack development
alwaysApply: true
---
# Contentstack Vibe Docs
This repo is an AI agent skill. The full routing table, decision helpers, and task combinations live in [`skills/contentstack-vibe-docs/SKILL.md`](skills/contentstack-vibe-docs/SKILL.md). **Read that first.** The skill has ~13,500 lines across 34 reference files — never read them all. Route to 1-3 files per task.
Reference files live at `skills/contentstack-vibe-docs/references/`.
## Security — non-negotiable
- Never ask for, output, log, or hardcode API keys, tokens, or secrets.
- Always use `process.env.*` in code.
- Never commit `.env` files.
- Management Tokens are **server-side only** — never in frontend code or public env vars (`NEXT_PUBLIC_*`, `NUXT_PUBLIC_*`).
- Delivery Tokens and Preview Tokens are client-safe; Management Tokens are not.
- If a developer pastes a real token in the conversation, warn them and recommend rotation.
Full decision tree: `skills/contentstack-vibe-docs/references/security/tokens-authentication.md`.
## Red flags
- Reading all reference files instead of routing to the right 1-3.
- Hardcoding region endpoints — use `@timbenniks/contentstack-endpoints`.
- Sharing a module-level Contentstack client across SSR preview requests — use a per-request factory (see `skills/contentstack-vibe-docs/references/live-preview/ssr-mode.md`).
- Calling `.includeReference()` on `.query()` — correct chain: `entry().includeReference([...]).query().find()`.
- Using `.descending()` / `.ascending()` — correct: `.orderByDescending()` / `.orderByAscending()`.
- `QueryOperation.NOT_EQUAL` / `GREATER_THAN` — correct: `NOT_EQUALS` / `IS_GREATER_THAN`.
- Enum/dropdown fields without `display_type: "dropdown"` — CMA rejects.
- `is_page: true` without a `url` field in the schema — CMA rejects and Visual Builder can't route.
- Mixing REST and GraphQL patterns, or Delivery SDK patterns with Management SDK patterns, in one call.
- `Contentstack.Stack()` (v3 style) instead of `contentstack.stack()` (v4+).
- Ignoring `X-RateLimit-Reset` and busy-looping on 429s.
## Ask before coding
- **Region?** (US / EU / AU / Azure NA-EU / GCP NA-EU) — every endpoint depends on this.
- **Credentials in env vars?** (never ask for actual values).
- **Framework?** (Next.js / Nuxt / Gatsby / other).
- **Data fetched server-side or client-side?** — determines Live Preview mode.相关插件
Web Development↓ 2.7k
Web Development 在 Cursor 中的规则与最佳实践。Gastby↓ 2k
Gastby 在 Cursor 中的规则与最佳实践。Brilliant Directories↓ 199
Brilliant Directories 官方 MCP 服务器,管理会员、文章、线索、评论等。Slite MCP↓ 61
Slite MCP:在 Slite 工作区中搜索、检索与创建文档,连接团队知识库。Drupal↓ 59
Drupal 在 Cursor 中的规则与最佳实践。NewRelic MCP Server↓ 56
New Relic MCP 服务器:为开发者提供实时调试能力。Miro MCP Server↓ 31
Miro MCP:连接 Miro 白板,读取上下文、基于看板生成代码、可视化复杂逻辑。cursor-rules-pack↓ 20
7 条经生产验证的 Cursor Rules,涵盖依赖管理、错误处理、状态管理、webhook 安全等,是完整 50 条规则包的免费样例。