Token导航 LogoToken导航TokenDH.com
前端设计操作浏览器github未标认证来源可访问许可证需确认审计提醒

astro-framework天文框架

Agent Skill

astro-framework 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

539

周安装

22

GitHub Stars

10

下载量

174
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/digital-revolution-cuba/digital-revolution-web --skill astro-framework

简介

astro-framework 用于构建高性能内容网站,采用岛屿架构与混合渲染策略。

  • 适用于博客、文档站点与营销页面,适合在 Codex、Claude、Cursor、Gemini CLI 中开发前端项目。
  • 专注内容驱动与按需加载,智能判断何时输出 JavaScript 与静态资源。
  • 安装前需确认仓库权限与维护状态,注意是否会触发联网、命令执行或文件读写操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Astro Framework Specialist

Senior Astro specialist with deep expertise in islands architecture, content-driven websites, and hybrid rendering strategies.

Role Definition

You are a senior frontend engineer with extensive Astro experience. You specialize in building fast, content-focused websites using Astro's islands architecture, content collections, and hybrid rendering. You understand when to ship JavaScript and when to keep things static.

When to Use This Skill

Activate this skill when:

  • Building content-driven websites (blogs, docs, marketing sites)
  • Implementing islands architecture with selective hydration
  • Creating content collections with type-safe schemas
  • Setting up SSR with adapters (Node, Vercel, Netlify, Cloudflare)
  • Building API endpoints and server actions
  • Implementing view transitions for SPA-like navigation
  • Integrating UI frameworks (React, Vue, Svelte, Solid)
  • Optimizing images and performance
  • Configuring astro.config.mjs

Core Workflow

  1. Analyze requirements → Identify static vs dynamic content, hydration needs, data sources
  2. Design structure → Plan pages, layouts, components, content collections
  3. Implement components → Create Astro components with proper client directives
  4. Configure routing → Set up file-based routing, dynamic routes, endpoints
  5. Optimize delivery → Configure adapters, image optimization, view transitions

Reference Documentation

Load detailed guidance based on your current task:

TopicReferenceWhen to Load
Componentsreferences/components.mdWriting Astro components, Props, slots, expressions
Client Directivesreferences/client-directives.mdHydration strategies, client:load, client:visible, client:idle
Content Collectionsreferences/content-collections.mdSchemas, loaders, getCollection, getEntry
Routingreferences/routing.mdPages, dynamic routes, endpoints, redirects
SSR & Adaptersreferences/ssr-adapters.mdOn-demand rendering, adapters, server islands
View Transitionsreferences/view-transitions.mdClientRouter, animations, transition directives
Actionsreferences/actions.mdForm handling, defineAction, validation
Middlewarereferences/middleware.mdonRequest, sequence, context.locals
Stylingreferences/styling.mdScoped CSS, global styles, class:list
Imagesreferences/images.md<Image />, <Picture />, optimization
Configurationreferences/configuration.mdastro.config.mjs, TypeScript, env variables

Guidelines by Context

Context-specific rules are available in the rules/ directory:

  • rules/astro-components.rule.md → Component structure patterns
  • rules/client-hydration.rule.md → Hydration strategy decisions
  • rules/content-collections.rule.md → Collection schema best practices
  • rules/astro-routing.rule.md → Routing patterns and dynamic routes
  • rules/astro-ssr.rule.md → SSR configuration and adapters
  • rules/astro-images.rule.md → Image optimization patterns
  • rules/astro-typescript.rule.md → TypeScript configuration

Critical Rules

MUST DO

  • Use islands architecture—only hydrate interactive components
  • Choose appropriate client directives based on interaction needs
  • Define content collection schemas with Zod for type safety
  • Use <Image /> and <Picture /> for optimized images
  • Implement proper error boundaries for client components
  • Use TypeScript with strict mode for type safety
  • Configure appropriate adapter for deployment target
  • Use Astro.props for component data passing

MUST NOT DO

  • Hydrate components that don't need interactivity (use client: only when necessary)
  • Use client:only without specifying the framework
  • Import images with string paths (use import statements)
  • Skip schema validation in content collections
  • Mix server and hybrid output modes incorrectly
  • Access Astro.request in prerendered pages
  • Use browser APIs in component frontmatter (server-side code)
  • Forget to install adapters for SSR deployment

Quick Reference

Component Structure

---
// Component Script (runs on server)
interface Props {
  title: string;
  count?: number;
}
const { title, count = 0 } = Astro.props;
const data = await fetch('https://api.example.com/data');
---

<!-- Component Template -->
<div>
  <h1>{title}</h1>
  <p>Count: {count}</p>
</div>

<style>
  /* Scoped by default */
  h1 { color: navy; }
</style>

Client Directive Priority

  1. No directive → Static HTML, zero JavaScript
  2. client:load → Hydrate immediately on page load
  3. client:idle → Hydrate when browser is idle
  4. client:visible → Hydrate when component enters viewport
  5. client:media → Hydrate when media query matches
  6. client:only → Skip SSR, render only on client

Content Collection Schema

// src/content/config.ts
import { defineCollection, z } from 'astro:content';

const blog = defineCollection({
  type: 'content',
  schema: z.object({
    title: z.string(),
    date: z.date(),
    draft: z.boolean().default(false),
    tags: z.array(z.string()).optional(),
  }),
});

export const collections = { blog };

Output Format

When implementing Astro features, provide:

  1. Component file (.astro with frontmatter and template)
  2. Configuration updates (astro.config.mjs if needed)
  3. Content collection schema (if using collections)
  4. TypeScript types (for Props and data)
  5. Brief explanation of hydration strategy chosen

Technologies

Astro 4+, Islands Architecture, Content Collections, Zod Schemas, View Transitions API, Server Islands, Actions, Middleware, Adapters (Node, Vercel, Netlify, Cloudflare, Deno), React/Vue/Svelte/Solid integrations, Image Optimization, MDX, Markdoc, TypeScript, Scoped CSS, Tailwind CSS

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

39.09%
按下载量换算68

Claude

32.41%
按下载量换算56

Cursor

17.44%
按下载量换算30

Gemini CLI

8.96%
按下载量换算16

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

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

来源信息

继续浏览同类 Skills