Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计通过

ssr-ssg-advisorssr ssg 顾问

Agent Skill

ssr-ssg-advisor 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

190

周安装

8

GitHub Stars

27

下载量

67
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/armanzeroeight/fastagent-plugins --skill ssr-ssg-advisor

简介

ssr-ssg-advisor 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 可结合来源仓库、安装命令和原始 README 继续核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • npx skills add https://github.com/armanzeroeight/fastagent-plugins --skill ssr-ssg-advisor
  • https://github.com/armanzeroeight/fastagent-plugins/tree/main/skills/ssr-ssg-advisor

SKILL.md

SSR/SSG Advisor

Choose the optimal rendering strategy for Next.js pages based on requirements.

Quick Start

Decision criteria:

  • SSG: Static content, pre-render at build → Best performance
  • ISR: Static with updates, revalidate periodically → Balance of both
  • SSR: Dynamic per-request, personalized → Fresh data
  • CSR: Client-side only, highly interactive → User-specific

Instructions

Step 1: Analyze Content Requirements

Ask these questions:

  1. Does content change per user? (personalization)
  2. How frequently does content update?
  3. Is SEO critical?
  4. What's the acceptable data freshness?
  5. How many pages need to be generated?

Step 2: Choose Rendering Strategy

Static Site Generation (SSG):

// pages/products/[id].tsx
export async function getStaticProps({ params }) {
  const product = await fetchProduct(params.id);

  return {
    props: { product },
    // Optional: revalidate for ISR
    // revalidate: 60, // seconds
  };
}

export async function getStaticPaths() {
  const products = await fetchAllProducts();

  return {
    paths: products.map(p => ({ params: { id: p.id } })),
    fallback: 'blocking', // or false, or true
  };
}

When to use SSG:

  • Marketing pages
  • Blog posts
  • Documentation
  • Product catalogs (if manageable size)
  • Any content that doesn't change often

Server-Side Rendering (SSR):

// pages/dashboard.tsx
export async function getServerSideProps(context) {
  const session = await getSession(context);
  const data = await fetchUserData(session.userId);

  return {
    props: { data },
  };
}

When to use SSR:

  • User dashboards
  • Personalized content
  • Real-time data
  • Content requiring authentication
  • Frequently changing data

Incremental Static Regeneration (ISR):

// pages/blog/[slug].tsx
export async function getStaticProps({ params }) {
  const post = await fetchPost(params.slug);

  return {
    props: { post },
    revalidate: 60, // Regenerate every 60 seconds
  };
}

When to use ISR:

  • Blog with frequent updates
  • Product pages with price changes
  • News sites
  • Content that updates periodically
  • Large sites where full rebuild is slow

Client-Side Rendering (CSR):

'use client'; // App Router

import { useEffect, useState } from 'react';

function Dashboard() {
  const [data, setData] = useState(null);

  useEffect(() => {
    fetch('/api/user-data')
      .then(res => res.json())
      .then(setData);
  }, []);

  return <div>{data ? <Content data={data} /> : <Loading />}</div>;
}

When to use CSR:

  • Highly interactive UIs
  • User-specific data (after auth)
  • Real-time updates
  • SEO not required
  • Data behind authentication

Step 3: Implement Data Fetching

App Router (Next.js 13+):

// app/products/page.tsx
async function ProductsPage() {
  // SSG: cached by default
  const products = await fetch('https://api.example.com/products');

  // ISR: revalidate periodically
  const products = await fetch('https://api.example.com/products', {
    next: { revalidate: 3600 } // 1 hour
  });

  // SSR: no caching
  const products = await fetch('https://api.example.com/products', {
    cache: 'no-store'
  });

  return <ProductList products={products} />;
}

Pages Router:

// getStaticProps: SSG/ISR
// getServerSideProps: SSR
// useEffect + fetch: CSR

Step 4: Configure Caching and Revalidation

On-demand revalidation:

// app/api/revalidate/route.ts
import { revalidatePath, revalidateTag } from 'next/cache';

export async function POST(request) {
  const path = request.nextUrl.searchParams.get('path');

  if (path) {
    revalidatePath(path);
    return Response.json({ revalidated: true });
  }

  return Response.json({ revalidated: false });
}

Tagged caching:

// Fetch with tags
const data = await fetch('https://api.example.com/products', {
  next: { tags: ['products'] }
});

// Revalidate by tag
revalidateTag('products');

Step 5: Handle Fallback Strategies

getStaticPaths fallback options:

export async function getStaticPaths() {
  return {
    paths: [...],
    fallback: false,    // 404 for non-pre-rendered paths
    // fallback: true,  // Generate on-demand, show loading
    // fallback: 'blocking', // Generate on-demand, wait for page
  };
}

Common Patterns

Hybrid Approach

// Mix strategies in same app
// - SSG for marketing pages
// - ISR for blog posts
// - SSR for user dashboard
// - CSR for interactive features

// app/layout.tsx (SSG)
export default function RootLayout({ children }) {
  return <html><body>{children}</body></html>;
}

// app/blog/[slug]/page.tsx (ISR)
async function BlogPost({ params }) {
  const post = await fetch(`/api/posts/${params.slug}`, {
    next: { revalidate: 60 }
  });
  return <Article post={post} />;
}

// app/dashboard/page.tsx (SSR)
async function Dashboard() {
  const data = await fetch('/api/user', { cache: 'no-store' });
  return <DashboardContent data={data} />;
}

Optimistic UI with ISR

// Show stale data immediately, revalidate in background
export async function getStaticProps() {
  const data = await fetchData();

  return {
    props: { data },
    revalidate: 1, // Revalidate every second
  };
}

Conditional Rendering

// Different rendering based on route
export async function getServerSideProps(context) {
  const { preview } = context;

  if (preview) {
    // SSR for preview mode
    const data = await fetchDraftContent();
    return { props: { data, preview: true } };
  }

  // Redirect to SSG version
  return {
    redirect: {
      destination: '/static-version',
      permanent: false,
    },
  };
}

Decision Matrix

RequirementSSGISRSSRCSR
SEO Critical
Fast TTFB
Fresh Data⚠️
Personalized
Large Scale⚠️
Build Time

✅ = Excellent, ⚠️ = Acceptable, ❌ = Poor

Performance Considerations

SSG:

  • Fastest: Pre-rendered at build time
  • Best for CDN caching
  • Long build times for large sites
  • Stale data until next build

ISR:

  • Fast initial load (cached)
  • Automatic updates
  • Best of both worlds
  • Slight delay for revalidation

SSR:

  • Always fresh data
  • Slower TTFB
  • Higher server load
  • Can't be cached at CDN edge

CSR:

  • Slow initial load
  • No SEO benefits
  • Reduces server load
  • Best for authenticated content

Troubleshooting

Build taking too long:

  • Use ISR instead of SSG
  • Reduce number of pre-rendered paths
  • Use fallback: 'blocking'

Stale data showing:

  • Reduce revalidate time
  • Implement on-demand revalidation
  • Consider SSR for critical data

High server costs:

  • Move from SSR to ISR where possible
  • Implement proper caching
  • Use CDN for static assets

SEO issues:

  • Avoid CSR for public content
  • Use SSG or SSR
  • Implement proper metadata

Best Practices

  1. Start with SSG: Default to static, move to dynamic only when needed
  2. Use ISR for updates: Better than full SSR for most cases
  3. Combine strategies: Different pages can use different methods
  4. Cache aggressively: Use CDN and browser caching
  5. Monitor performance: Track TTFB, build times, server load
  6. Implement fallbacks: Handle errors and loading states
  7. Test thoroughly: Verify behavior in production

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

33.6%
按下载量换算23

Claude

30.62%
按下载量换算21

Cursor

17.88%
按下载量换算12

Gemini CLI

8.84%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

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

安装前确认

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

来源信息

继续浏览同类 Skills