xiaohongshu
xiaohongshu
bellog-structure
Provides file organization and naming conventions for the Bellog project. Triggers when creating new files or reorganizing code.
Full skill instructions
This skill defines the file structure, naming conventions, and organization patterns for the Bellog blog project.
/Users/castle_bell/Projects/bellog/
├── src/
│ ├── app/ # Next.js App Router
│ │ ├── layout.tsx # Root layout with fonts & metadata
│ │ ├── page.tsx # Home page
│ │ ├── template.tsx # Page transition wrapper
│ │ ├── providers.tsx # Client-side providers
│ │ ├── posts/
│ │ │ ├── page.tsx # All posts page
│ │ │ └── [slug]/
│ │ │ └── page.tsx # Individual post
│ │ ├── api/
│ │ │ └── revalidate/
│ │ │ └── route.ts # Cache revalidation endpoint
│ │ ├── robots.ts # SEO robots.txt
│ │ └── sitemap.ts # Dynamic sitemap
│ │
│ ├── components/
│ │ ├── common/ # App-wide shared components
│ │ │ ├── Navbar.tsx
│ │ │ ├── Footer.tsx
│ │ │ ├── Intro.tsx
│ │ │ ├── Header.tsx
│ │ │ └── ...
│ │ ├── posts/ # Post-specific components
│ │ │ ├── PostCard.tsx
│ │ │ ├── PostList.tsx
│ │ │ ├── PostRenderer.tsx
│ │ │ ├── NotionToc.tsx
│ │ │ └── ...
│ │ └── ui/ # Low-level UI primitives
│ │ ├── Tag.tsx
│ │ ├── ThemeToggle.tsx
│ │ ├── switch.tsx
│ │ └── ...
│ │
│ ├── hooks/ # Custom React hooks
│ │ ├── useScrollSpy.ts
│ │ ├── useTocObserver.ts
│ │ └── useHeadings.ts
│ │
│ ├── lib/ # Business logic & utilities
│ │ ├── notion.ts # Notion API client
│ │ ├── posts.ts # Post data fetching
│ │ ├── tags.ts # Tag utilities
│ │ └── utils.ts # General utilities
│ │
│ ├── constants/ # Shared constants
│ │ └── ui.ts # UI-related constants
│ │
│ ├── types/ # TypeScript types
│ │ └── index.d.ts # Global type definitions
│ │
│ └── styles/ # Global styles
│ └── global.css # Theme variables + Tailwind
│
├── public/ # Static assets
├── .claude/ # Claude Code configuration
│ ├── agents/ # Custom sub-agents
│ └── skills/ # Custom skills
├── .github/ # GitHub configuration
│ └── PULL_REQUEST_TEMPLATE.md
├── .husky/ # Git hooks
├── tailwind.config.ts # Tailwind configuration
├── tsconfig.json # TypeScript configuration
├── next.config.ts # Next.js configuration
├── package.json # Dependencies & scripts
├── commitlint.config.ts # Commit message linting
├── CLAUDE.md # Project guide
└── README.md # Project documentation
Rule: PascalCase
✅ Correct:
PostCard.tsx
NotionToc.tsx
ScrollToTop.tsx
ThemeToggle.tsx
❌ Wrong:
postCard.tsx
notion-toc.tsx
scroll_to_top.tsx
Rule: camelCase with use prefix
✅ Correct:
useScrollSpy.ts
useTocObserver.ts
useHeadings.ts
useScrollPosition.ts
❌ Wrong:
UseScrollSpy.ts
scroll-spy-hook.ts
scrollSpy.ts (missing use prefix)
Rule: camelCase
✅ Correct:
notion.ts
posts.ts
tags.ts
utils.ts
❌ Wrong:
Notion.ts
Posts.ts
tag-utils.ts
Rule: camelCase file, PascalCase exports
✅ Correct:
File: index.d.ts
Export: interface Post { }
Export: type PostStatus = 'published' | 'draft';
❌ Wrong:
File: Post.d.ts
Export: interface post { }
Rule: SCREAMING_SNAKE_CASE for values, camelCase for file
✅ Correct:
File: ui.ts
Exports:
export const HEADER_OFFSET = 80;
export const SCROLL_SPY_OFFSET = 100;
❌ Wrong:
export const headerOffset = 80;
export const header-offset = 80;
Rule: camelCase folder, route.ts file
✅ Correct:
app/api/revalidate/route.ts
❌ Wrong:
app/api/Revalidate/route.ts
app/api/revalidate/revalidate.ts
Q: Is it a React component?
/src/components/
/src/components/common//src/components/posts//src/components/ui/Q: Is it a custom hook?
/src/hooks/use[Name].tsQ: Is it business logic or data fetching?
/src/lib/
/src/lib/notion.ts/src/lib/posts.ts/src/lib/utils.tsQ: Is it a constant value?
/src/constants/
/src/constants/ui.ts/src/constants/api.tsQ: Is it a TypeScript type?
/src/types/index.d.tsQ: Is it a page or route?
/src/app/[route]/page.tsxQ: Is it an API endpoint?
/src/app/api/[endpoint]/route.ts/src/components/common/)Components used across multiple pages:
Examples:
Navbar.tsx - Site navigationFooter.tsx - Site footerIntro.tsx - Hero section with animationsProgressBar.tsx - Scroll progress indicatorHeader.tsx - Page headers/src/components/posts/)Components specific to blog posts:
Examples:
PostCard.tsx - Individual post previewPostList.tsx - Grid of post cardsPostRenderer.tsx - Notion content rendererNotionToc.tsx - Table of contentsPostNavigation.tsx - Previous/Next navigationGiscusComments.tsx - Comment system/src/components/ui/)Low-level, reusable UI primitives:
Examples:
Tag.tsx - Tag displayTagList.tsx - Tag filteringThemeToggle.tsx - Dark/light mode toggleswitch.tsx - Radix UI switch (shadcn/ui)// For interactive components
"use client";
import { useState } from 'react';
import { motion } from 'framer-motion';
interface ComponentNameProps {
// Props
}
export function ComponentName({ }: ComponentNameProps) {
// Logic
return (
<div>
{/* JSX */}
</div>
);
}
import { useState, useEffect } from 'react';
/**
* Brief description of what this hook does
*
* @example
* const value = useHookName();
*/
export function useHookName() {
// Hook logic
return value;
}
/**
* Brief description of utility function
*
* @param paramName - Description
* @returns Description
*/
export function utilityName(paramName: Type): ReturnType {
// Implementation
}
// /src/types/index.d.ts
export interface Post {
id: string;
title: string;
slug: string;
date: string;
description: string;
tags: string[];
status: PostStatus;
}
export type PostStatus = 'published' | 'draft' | 'archived';
// 1. React & Next.js
import { useState } from 'react';
import Link from 'next/link';
// 2. Third-party libraries
import { motion } from 'framer-motion';
import { Search } from 'lucide-react';
// 3. Internal imports (@/...)
import { Button } from '@/components/ui/button';
import { getAllPosts } from '@/lib/posts';
import { HEADER_OFFSET } from '@/constants/ui';
// 4. Relative imports
import { helperFunction } from '../utils';
// 5. Type imports (separate)
import type { Post } from '@/types';
Bellog uses @/ for root imports:
// ✅ Correct
import { PostCard } from '@/components/posts/PostCard';
import { getAllPosts } from '@/lib/posts';
import { HEADER_OFFSET } from '@/constants/ui';
// ❌ Wrong (no relative paths from root)
import { PostCard } from '../../components/posts/PostCard';
// ✅ Good - Each file has one clear purpose
// /src/lib/notion.ts - Notion API calls
// /src/lib/posts.ts - Post data transformation
// /src/lib/tags.ts - Tag utilities
// ❌ Bad - Everything in one file
// /src/lib/everything.ts
// ✅ Good - Related components together
/src/components/posts/
PostCard.tsx
PostList.tsx
PostNavigation.tsx
// ❌ Bad - All components flat
/src/components/
PostCard.tsx
Navbar.tsx
PostList.tsx
Footer.tsx
// ✅ Good - Constants in separate file
// /src/constants/ui.ts
export const HEADER_OFFSET = 80;
export const SCROLL_SPY_OFFSET = 100;
// Component uses constants
import { HEADER_OFFSET } from '@/constants/ui';
// ❌ Bad - Magic numbers in component
const offset = 80; // What is this?
Components: < 200 lines
Hooks: < 100 lines
Utils: < 50 lines per function
Types: No limit
// ❌ Avoid barrel exports (index.ts files)
// /src/components/index.ts
export { PostCard } from './PostCard';
export { PostList } from './PostList';
// ✅ Prefer direct imports
import { PostCard } from '@/components/posts/PostCard';
import { PostList } from '@/components/posts/PostList';
Why: Barrel exports slow down builds and complicate tree-shaking.
.env.local # Local development secrets (gitignored)
.env.example # Template (committed to git)
Never commit:
.env.local.envEnsure these are in .gitignore:
# Dependencies
node_modules/
.pnp
.pnp.js
# Next.js
.next/
out/
# Environment
.env.local
.env
# IDE
.vscode/
.idea/
# OS
.DS_Store
/ # Root
├── README.md # Project overview & setup
├── CLAUDE.md # Development guide (for AI)
└── docs/ # Detailed documentation (if needed)
├── architecture.md
└── deployment.md
Components: PascalCase.tsx /src/components/{common,posts,ui}/
Hooks: useName.ts /src/hooks/
Utilities: name.ts /src/lib/
Constants: NAME /src/constants/
Types: name.d.ts /src/types/
Pages: page.tsx /src/app/[route]/
API: route.ts /src/app/api/[endpoint]/
Remember: Organization is about findability. When someone looks for a file, it should be obvious where it is.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience