一键导入
add-project
Add a project to the content collection. Handles one-time collection setup if missing. Use when user wants to add, create, or showcase a new project.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Add a project to the content collection. Handles one-time collection setup if missing. Use when user wants to add, create, or showcase a new project.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create a new blog post in the Astro content collection with proper frontmatter, slug, and conventions. Use when user wants to add, write, create, or publish a new blog post.
Add a speaking event to the content collection. Handles one-time collection setup if missing. Use when user wants to add, schedule, or log a speaking event.
Scaffold a new reusable .astro component following project conventions. Use when user wants to create, build, or add a new Astro component.
| name | add-project |
| description | Add a project to the content collection. Handles one-time collection setup if missing. Use when user wants to add, create, or showcase a new project. |
Check if projects exists in content.config.ts exports. If missing, add:
const projects = defineCollection({
loader: glob({ pattern: "**/*.md", base: "./src/content/projects" }),
schema: z.object({
title: z.string(),
subtitle: z.string().optional(), // mono uppercase subtitle
description: z.string(),
badge: z.string().optional(), // "Commercial", "NDA", "Open Source"
href: z.string().optional(), // external project URL
category: z.enum(["commercial", "open-source"]),
}),
});
Update export: export const collections = { blog, speaking, projects };
Create src/content/projects/ directory.
Migrate src/pages/projects.astro: rewrite to query getCollection("projects"), group by category, render each group in its own section (COMMERCIAL → OPEN SOURCE) using existing ProjectCard component for each entry. Keep the hero section and section headings intact. Remove hardcoded project data.
Create src/content/projects/<slug>.md:
---
title: "Project Name"
subtitle: "Tagline or role"
description: "What it does and why it matters."
badge: "Open Source"
href: "https://github.com/..."
category: "open-source"
---
Optional body content.
Props map 1:1 to schema fields: title, subtitle, description, badge, href.
npx astro check