Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计提醒

datocms-frontend-integrationsdatocms 前端集成

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

1,839

周安装

79

GitHub Stars

公开资料未说明

下载量

645
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:datocms-frontend-integrations(datocms 前端集成)
来源仓库:https://github.com/datocms/agent-skills
仓库路径:skills/datocms-frontend-integrations
安装命令:
npx skills add https://github.com/datocms/agent-skills --skill datocms-frontend-integrations
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/datocms/agent-skills --skill datocms-frontend-integrations

简介

用于 DatoCMS 前端项目的通用集成支持,覆盖多框架场景。

  • 提供组件结构建议、API 形状分析和部分补丁修复能力。
  • 优先使用 datocms-setup 完成端到端脚手架,复杂需求交予 builder 技能。
  • 保持实现简洁,仅在必要时引入新依赖或修改现有架构。
  • 涉及页面改动时应配合本地预览验证视觉效果与响应式表现。

SKILL.md

DatoCMS Front-End Integrations Skill

This skill is the shared front-end integration bundle for DatoCMS web projects. Prefer datocms-setup when the user wants one feature fully scaffolded end-to-end. Stay in this skill for:

  • mixed-feature tasks touching multiple front-end concerns
  • framework comparison or API-shape questions
  • partial patching inside an existing custom integration
  • companion-reference loading for another DatoCMS skill

When this skill helps scaffold setup-adjacent work, report the result as scaffolded when placeholders remain and production-ready only when the implementation no longer depends on unresolved project-specific values.

Contents


Step 1: Detect Context (silent)

If the project context is already established in this conversation (framework, UI stack, existing integrations, file structure), skip broad detection below. Re-inspect only when a question cannot be answered from prior context.

Silently examine the project to determine setup and configuration.

  1. Framework — Read package.json and check for:

- next -> Next.js (App Router) - nuxt -> Nuxt - @sveltejs/kit -> SvelteKit - astro -> Astro - @remix-run/ -> Remix - otherwise infer whether the project is React-based, Vue-based, or another stack

  1. UI stack — Determine which library the project actually uses for Dato rendering:

- React-based -> react-datocms - Vue-based -> vue-datocms - SvelteKit / Svelte -> @datocms/svelte - Astro without React integration -> @datocms/astro

  1. Existing Dato helpers — Search for:

- @datocms/cda-client - an existing executeQuery wrapper - existing image / Structured Text / SEO / video / search helpers - environment variable files with Dato tokens or URLs

  1. Existing integration markers — Check whether the repo already has:

- draft mode endpoints - preview-links endpoints - Content Link mounting - real-time subscription usage - cache-tag forwarding or invalidation - search routes or search helpers - robots / sitemap routes

  1. File structure — Determine whether the project uses src/ or root-level app directories

Stop conditions

  • If the framework cannot be determined, ask the user which stack they are using.
  • If a requested integration already exists, inspect it and patch in place by default.
  • Only ask about full replacement when the current setup is clearly incompatible, broken, or the user explicitly asked for a rewrite.

Step 2: Classify and Route

Classify the user's request into one or more categories:

CategoryWhen to select
Draft Mode SetupDraft cookies, enable/disable endpoints, or draft CDA token switching
Web Previews SetupPreview-links endpoints, route mapping, Visual tab support
Responsive ImagesDato image rendering helpers or component selection
Structured Text RenderingStructured Text query shapes or renderer wiring
Video PlayerDato / Mux video playback integration
SEO & Meta Tags_seoMetaTags, favicon tags, canonical wiring
Real-Time UpdatesLive preview subscriptions or <QueryListener /> wiring
Visual Editing / Content LinkClick-to-edit overlays and stega-aware rendering
Site SearchReact / Vue widgets or low-level Search API wiring
Robots & Sitemapsrobots.txt, sitemap routes, crawler-safe rules
Cache TagsGranular invalidation or tag-forwarding patterns

Multiple categories can apply.

Prefer the setup orchestrator for full single-feature scaffolding

If the task is clearly "set up X end-to-end", route to datocms-setup instead of keeping all work in this bundle:

CategoryRoute
Draft Mode Setupdatocms-setup for draft-mode
Web Previews Setupdatocms-setup for web-previews
Responsive Imagesdatocms-setup for responsive-images
Structured Text Renderingdatocms-setup for structured-text
Video Playerdatocms-setup for video-player
SEO & Meta Tagsdatocms-setup for seo
Real-Time Updatesdatocms-setup for realtime
Visual Editing / Content Linkdatocms-setup for visual-editing when the user means the full editor flow, or content-link when they explicitly want only overlays/stega wiring
Site Searchdatocms-setup for site-search
Robots & Sitemapsdatocms-setup for robots-sitemaps
Cache Tagsdatocms-setup for cache-tags

Route to datocms-setup when the task is "set up X end-to-end from scratch" for a single feature. Stay here for multi-feature tasks, partial patching, framework comparisons, or when another skill explicitly depends on these references.

If the request says visual editing and clearly wants the full editorial flow, treat that as the bundled setup: draft mode + preview links + Content Link + real-time updates. Only route to content-link by itself when the user explicitly wants the overlay/stega piece in isolation.

Questions

Ask zero questions by default.

Only ask when a safe implementation is blocked by something the repo cannot answer, such as:

  • missing model-to-route mappings for preview or sitemap generation
  • missing cache provider or purge-adapter choice
  • multiple competing renderers where patching the wrong one would be risky

Otherwise proceed directly and call out unresolved values instead of stalling.


Step 3: Load References

Read only what is needed from the references/ directory next to this skill. Long files include a contents section at the top; preview that first, then load the relevant section.

Component concept references

Load the relevant concept file first — it contains shared GraphQL queries, field definitions, and patterns. Then load the framework-specific file for component APIs and props.

CategoryConcept file
Responsive Imagesreferences/image-concepts.md
Video Playerreferences/video-player-concepts.md
SEO & Meta Tagsreferences/seo-concepts.md
Real-Time Updatesreferences/realtime-concepts.md
Site Searchreferences/site-search-concepts.md

Setup foundations

Load these for mixed-feature setup work:

  • references/draft-mode-concepts.md
  • one framework reference:

- references/nextjs.md - references/nuxt.md - references/sveltekit.md - references/astro.md - references/remix.md

  • optional concept references:

- references/web-previews-concepts.md - references/content-link-concepts.md - references/realtime-concepts.md

React references

CategoryReference file
Responsive Imagesreferences/react-image.md
Structured Text Renderingreferences/react-structured-text.md
Video Playerreferences/react-video-player.md
SEO & Meta Tagsreferences/react-seo.md
Real-Time Updatesreferences/react-realtime.md
Visual Editing / Content Linkreferences/react-content-link.md
Site Searchreferences/react-site-search.md

Vue references

CategoryReference file
Responsive Imagesreferences/vue-image.md
Structured Text Renderingreferences/vue-structured-text.md
Video Playerreferences/vue-video-player.md
SEO & Meta Tagsreferences/vue-seo.md
Real-Time Updatesreferences/vue-realtime.md
Visual Editing / Content Linkreferences/vue-content-link.md
Site Searchreferences/vue-site-search.md

Svelte references

CategoryReference file
Responsive Imagesreferences/svelte-image.md
Structured Text Renderingreferences/svelte-structured-text.md
Video Playerreferences/svelte-video-player.md
SEO & Meta Tagsreferences/svelte-seo.md
Real-Time Updatesreferences/svelte-realtime.md
Visual Editing / Content Linkreferences/svelte-content-link.md

Use references/site-search-api.md for Svelte / SvelteKit site-search work.

Astro references

CategoryReference file
Responsive Imagesreferences/astro-image.md
Structured Text Renderingreferences/astro-structured-text.md
SEO & Meta Tagsreferences/astro-seo.md
Real-Time Updatesreferences/astro-realtime.md
Visual Editing / Content Linkreferences/astro-content-link.md

Use references/site-search-api.md for Astro site-search work. For Astro video, use the Mux web component directly or React integration when the project already has it.

Generic search and crawl references

Load these when the task is framework-agnostic, non-widget-based, or crawler-specific:

  • references/site-search-api.md
  • references/robots-and-sitemaps.md

Verification reference

When implementation work is involved, load:

  • references/verification-checklists.md

Step 4: Generate or Patch Code

Follow the loaded references and these shared rules:

Workflow rules

  • Respect existing abstractions and patch in place by default.
  • Prefer the focused setup skill when the task narrows to a single full scaffold.
  • Make targeted changes instead of full rewrites unless the current code is unusable.

Security and environment rules

  • All secrets come from environment variables.
  • Validate a dedicated preview/webhook secret environment variable where draft mode or preview-links flows require it; preserve existing repo naming when present.
  • Use isRelativeUrl() for redirect validation.
  • Do not require authentication on draft-mode disable endpoints.

Query-wrapper rules

  • Add or preserve an includeDrafts option for draft-aware querying.
  • Switch between published and draft CDA tokens based on that option.
  • Default to excludeInvalid: true for draft-aware wrapper patterns unless the task explicitly needs invalid records during schema work.
  • Enable the repo's existing contentLink mode ('v1' or 'vercel-v1') plus baseEditingUrl only in draft / visual-editing contexts.

Framework rules

  • Use native env and redirect APIs for the detected framework.
  • For Astro, always use @datocms/astro/* subpath imports.
  • Use the framework-appropriate component or helper API from the loaded reference, not a cross-framework pattern copied from memory.

TypeScript rules

  • No as unknown as.
  • Avoid unnecessary casts.
  • Prefer import type {...} for type-only imports.
  • Let TypeScript infer types where it can.

Dependency rules

  • Install missing packages only when the task truly needs them.
  • Use @mux/mux-player-react for React video.
  • Use @mux/mux-player for Vue or Svelte video.
  • Use @datocms/cma-client-browser for React / Vue widget-based site search.

Search and crawl safety rules

  • Use explicit search index ids.
  • Use least-privilege public search tokens in the browser.
  • Keep sitemap output on the configured public domain only.
  • Order Dato crawler Allow rules before any catch-all Disallow: /.

If customer-specific values such as route mappings, provider details, or index ids remain unresolved, leave clear placeholders and explicitly call out the missing inputs instead of presenting the work as fully ready.


Step 5: Verify

Load references/verification-checklists.md and check only the sections relevant to the work you actually performed.

At minimum, verify:

  • security, token handling, redirect validation, and environment-variable usage
  • query shapes, wrapper options, and framework-specific component APIs
  • dependency choices and import paths
  • draft-only behavior stays draft-only
  • any remaining placeholders or customer-specific mappings are clearly called out

Cross-Skill Routing

Use companion skills when the task leaves this bundle's sweet spot:

ConditionRoute to
Full single-feature scaffoldingdatocms-setup with the matching recipe from Step 2
Shared CDA client wrapper or executeQuery baselinedatocms-setup for cda-client
Writing or optimizing GraphQL queries for the CDAdatocms-cda
Programmatic content management, schema changes, migration scripts, access control, or webhook creation via RESTdatocms-cma
Building a DatoCMS plugindatocms-plugin-builder

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.81%
按下载量换算231

Claude

29.53%
按下载量换算190

Cursor

20.74%
按下载量换算134

Gemini CLI

10.37%
按下载量换算67

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills