analogjs-development

Develop with Analogjs 2.x file-based routing, markdown content management, and SSR/SSG configuration. Use when creating *.page.ts files, contentFilesResource, routeMeta, and prerender settings.

16 stars

Best use case

analogjs-development is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Develop with Analogjs 2.x file-based routing, markdown content management, and SSR/SSG configuration. Use when creating *.page.ts files, contentFilesResource, routeMeta, and prerender settings.

Teams using analogjs-development should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/analogjs-development/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/frontend/analogjs-development/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/analogjs-development/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How analogjs-development Compares

Feature / Agentanalogjs-developmentStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Develop with Analogjs 2.x file-based routing, markdown content management, and SSR/SSG configuration. Use when creating *.page.ts files, contentFilesResource, routeMeta, and prerender settings.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Analogjs Development

Development guide for Analogjs 2.x framework with file-based routing and content management.

## When to Use This Skill

- Creating new pages (*.page.ts)
- Setting up dynamic routes ([param].page.ts)
- Loading and displaying markdown content
- Configuring SSR/SSG (prerender)
- Creating API routes (server/routes/)

**When NOT to use:**

- Creating non-page Angular components → `angular-v21-development`
- Styling only → `tailwindcss-v4-styling`
- UI/UX design application → `material-design-3-expressive`

## Core Principles

- **File-Based Routing:** Routes are defined by file location and naming
- **Default Export:** Page components must use default export
- **Content Resources API:** Use `injectContentFiles()` and `injectContent()` for markdown
- **requestContextInterceptor:** Place as the last interceptor in HttpClient configuration
- **Project Structure:**
  ```
  src/
  ├── app/pages/           # File-based routing
  │   ├── index.page.ts    # / route
  │   ├── about/
  │   │   └── index.page.ts # /about route
  │   └── blog/
  │       ├── index.page.ts     # /blog route
  │       └── [slug].page.ts    # /blog/:slug dynamic route
  ├── content/             # Markdown content
  │   └── blog/
  └── server/routes/       # API endpoints
  ```

## Implementation Guidelines

### Page Component

Key patterns for page components:

1. File must end with `.page.ts` suffix
2. Component must be default exported
3. Can have accompanying `.page.html` and `.page.css` files

→ Details: [Routing Patterns](references/routing-patterns.md)

### Dynamic Routes

Dynamic route patterns:

1. Use bracket syntax for parameter: `[slug].page.ts`
2. Access parameter via `injectContent()` or `ActivatedRoute`
3. Prefer `withComponentInputBinding()` for route params as inputs

→ Details: [Routing Patterns](references/routing-patterns.md#dynamic-routes)

### Content Management

Markdown content handling patterns:

1. Use `injectContentFiles<T>()` for content list
2. Use `injectContent<T>()` for single content by route param
3. Define `PostAttributes` interface for content metadata
4. Configure `provideContent()` with markdown renderer

→ Details: [Content Handling](references/content-handling.md)

### Route Metadata

Route-level configuration patterns:

1. Export `routeMeta` for route configuration
2. Set page title, meta tags, guards
3. Configure SSR/SSG options per route

→ Details: [Routing Patterns](references/routing-patterns.md#route-metadata)

### SSR/SSG Configuration

Server-side rendering and static generation patterns:

1. Configure `prerender.routes` in `vite.config.ts`
2. Use `contentDir` with `transform` for dynamic content routes
3. Set up `provideServerContext()` in `main.server.ts`

→ Details: [Content Handling](references/content-handling.md#prerender-configuration)

### API Routes

Server API route patterns:

1. Create files in `src/server/routes/`
2. Use `defineEventHandler()` from h3
3. File path becomes API endpoint

→ Details: [Routing Patterns](references/routing-patterns.md#api-routes)

## Workflow

1. **Route Planning:** Determine route type (static/dynamic/group)
2. **Create Page File:** Create `*.page.ts` with correct naming
3. **Template Setup:** Create template/style files if needed
4. **Content Connection:** Set up markdown content loading if applicable
5. **Route Metadata:** Configure `routeMeta` export
6. **Prerender Setup:** Add route to prerender configuration for SSG

## Related Skills

- **angular-v21-development:** For component internal implementation
- **tailwindcss-v4-styling:** For page styling
- **material-design-3-expressive:** For UI component application

## Reference Documentation

For detailed patterns and code examples, see:

- [Routing Patterns](references/routing-patterns.md) - File-based routing details
- [Content Handling](references/content-handling.md) - Markdown content management

Related Skills

vue-3-nuxt-3-development-cursorrules-prompt-file-cursorrules

16
from diegosouzapw/awesome-omni-skill

Apply for vue-3-nuxt-3-development-cursorrules-prompt-file. --- description: Applies to Vue 3 and Nuxt 3 projects, enforcing best practices for frontend development including TypeScript, TailwindCSS, and Composition API. globs: **/*.{vue,ts,js,jsx,tsx}

umbraco-development

16
from diegosouzapw/awesome-omni-skill

Apply when working with Umbraco CMS, Composers, services, or content APIs

Frontend Development

16
from diegosouzapw/awesome-omni-skill

พัฒนา Frontend ด้วย Angular, React, Vue, Next.js อย่างมืออาชีพ

App Development

16
from diegosouzapw/awesome-omni-skill

Build features in the AI Coaching Platform Next.js app. Use for creating pages, components, server actions, TanStack tables, and understanding application architecture.

angular-v21-development

16
from diegosouzapw/awesome-omni-skill

Develop Angular v21 components, services, and directives with signals. Use when implementing standalone components, OnPush change detection, inject() function, and input()/output() functions.

spec_driven_development.constitution

16
from diegosouzapw/awesome-omni-skill

Creates foundational governance principles and development guidelines for the project. Use when starting a new project or establishing standards.

miniprogram-development

16
from diegosouzapw/awesome-omni-skill

WeChat Mini Program development rules. Use this skill when developing WeChat mini programs, integrating CloudBase capabilities, and deploying mini program projects.

Workers Development

16
from diegosouzapw/awesome-omni-skill

This skill should be used when the user asks about "Workers API", "fetch handler", "Workers runtime", "request handling", "response handling", "Workers bindings", "environment variables in Workers", "Workers context", or discusses implementing Workers code, routing patterns, or using Cloudflare bindings like KV, D1, R2, Durable Objects in Workers.

wordpress-woocommerce-development

16
from diegosouzapw/awesome-omni-skill

WooCommerce store development workflow covering store setup, payment integration, shipping configuration, and customization.

wordpress-theme-development

16
from diegosouzapw/awesome-omni-skill

WordPress theme development workflow covering theme architecture, template hierarchy, custom post types, block editor support, and responsive design.

web-development

16
from diegosouzapw/awesome-omni-skill

Web frontend project development rules. Use this skill when developing web frontend pages, deploying static hosting, and integrating CloudBase Web SDK.

vercel-ai-sdk-development

16
from diegosouzapw/awesome-omni-skill

Use when building AI-powered applications with the Vercel AI SDK (V6+). Covers agents (ToolLoopAgent), tool design with execution approval and strict mode, MCP client integration, structured output with tool calling, streaming patterns, DevTools debugging, reranking, provider-specific tools, and UI integration with React/Next.js.