Community生产力与协作github.com

jezweb/claude-skills

基于代码库分析自动生成项目文档,包括 ARCHITECTURE.md、API_ENDPOINTS.md、DATABASE_SCHEMA.md。可读取源代码、模式文件、路由和配置,生成准确、结构化的文档。适用于新项目启动、新成员入职或文档缺失/过时的情况。触发词:'generate docs'、'document architecture'、'create api docs'、'document schema'、'project documentation'、'write architecture doc'。

claude-skills 是什么?

这是一个项目文档自动生成工具,能够通过对代码库的智能分析,自动生成三种核心技术文档:ARCHITECTURE.md(系统架构概览)、API_ENDPOINTS.md(API端点文档)和 DATABASE_SCHEMA.md(数据库模式文档)。该技能适用于任何代码库,支持 Node.js、Python、Rust 等多种技术栈,特别适合在项目启动、团队新成员入职或现有文档过时时使用。其工作流程首先检测项目类型(如 Cloudflare Worker、React SPA、Astro、Next.js 等),然后根据项目特性要求用户选择需要生成的文档类型,接着扫描相关源代码、配置文件、路由和数据库模式,最后生成符合模板的结构化文档。生成的文档会写入 `docs/` 目录(若不存在则创建),对于已有文档的项目,会提示更新而非覆盖,并保留用户手写的内容。该技能在 Cursor 和 Claude Code 等 AI 编码助手平台上运行,通过触发词激活,为开发者提供了一种无需手动编写即可获得准确、最新项目文档的高效方式。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/jezweb/claude-skills/tree/HEAD/plugins/dev-tools/skills/project-docs

Installed? Explore more 生产力与协作 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

项目文档生成器

通过分析代码库生成结构化的项目文档。生成的文档反映实际的代码,而非理想化的架构。

何时使用

  • 新项目需要初始文档
  • 文档缺失或过时
  • 为新成员介绍代码库
  • 重构后刷新文档

工作流程

1. 检测项目类型

扫描项目根目录,确定项目类型:

指示器项目类型
wrangler.jsonc / wrangler.tomlCloudflare Worker
vite.config.ts + src/App.tsxReact SPA
astro.config.mjsAstro 站点
next.config.jsNext.js 应用
package.json 包含 honoHono API
src/index.ts 包含 HonoAPI 服务器
drizzle.config.ts包含数据库层
schema.ts 或 schema/包含数据库模式
pyproject.toml / setup.pyPython 项目
Cargo.tomlRust 项目

2. 询问生成内容

应该生成哪些文档?
1. ARCHITECTURE.md — 系统概述、技术栈、目录结构、关键流程
2. API_ENDPOINTS.md — 路由、方法、参数、响应结构、认证
3. DATABASE_SCHEMA.md — 表、关系、迁移、索引
4. 以上全部

仅提供与项目匹配的文档。不为静态站点提供 API_ENDPOINTS.md。如果没有数据库,则不提供 DATABASE_SCHEMA.md。

3. 扫描代码库

对于每个请求的文档,读取相关的源文件:

ARCHITECTURE.md — 扫描:

  • package.json / pyproject.toml(技术栈、依赖)
  • 入口点(src/index.ts、src/main.tsx、src/App.tsx)
  • 配置文件(wrangler.jsonc、vite.config.ts、tsconfig.json)
  • 目录结构(前两层)
  • 关键模块及其导出

API_ENDPOINTS.md — 扫描:

  • 路由文件(src/routes/、src/api/ 或内联在 index 中)
  • 中间件文件(认证、CORS、日志)
  • 请求/响应类型或 Zod 模式
  • 错误处理模式

DATABASE_SCHEMA.md — 扫描:

  • Drizzle 模式文件(src/db/schema.ts、src/schema/)
  • 迁移文件(drizzle/、migrations/)
  • 原始 SQL 文件(如果存在)
  • 种子文件(如果存在)

4. 生成文档

将每个文档写入 docs/(如果该目录不存在则创建)。如果项目在该目录中已有文档,则提供更新选项而非覆盖。

对于没有 docs/ 目录的小项目,直接写入项目根目录。

文档模板

ARCHITECTURE.md

# 架构

## 概述
[一段:项目功能及其结构]

## 技术栈
| 层 | 技术 | 版本 |
|----|------|-----|
| 运行时 | [例如 Cloudflare Workers] | — |
| 框架 | [例如 Hono] | [版本] |
| 数据库 | [例如 D1 (SQLite)] | — |
| ORM | [例如 Drizzle] | [版本] |
| 前端 | [例如 React 19] | [版本] |
| 样式 | [例如 Tailwind v4] | [版本] |

## 目录结构
[带注释的树状结构 — 前两层及用途说明]

## 关键流程
### [流程 1:例如“用户认证”]
[逐步说明:请求 → 中间件 → 处理程序 → 数据库 → 响应]

### [流程 2:例如“数据处理流水线”]
[逐步说明系统流程]

## 配置
[关键配置文件及其控制内容]

## 部署
[如何部署、所需环境变量、构建命令]

API_ENDPOINTS.md

# API 端点

## 基础 URL
[例如 `https://api.example.com` 或相对路径 `/api`]

## 认证
[方式:Bearer token、会话 cookie、API 密钥、无]
[令牌来源及获取方式]

## 端点

### [分组:例如用户]

#### `GET /api/users`
- **认证**:必需
- **参数**:`?page=1&limit=20`
- **响应**:`{ users: User[], total: number }`

#### `POST /api/users`
- **认证**:必需(管理员)
- **请求体**:`{ name: string, email: string }`
- **响应**:`{ user: User }` (201)
- **错误**:400(验证错误)、409(邮箱重复)

[对每个端点重复]

## 错误格式
[标准错误响应结构]

## 速率限制
[如果适用]

DATABASE_SCHEMA.md

# 数据库模式

## 引擎
[例如 Cloudflare D1 (SQLite)、PostgreSQL、MySQL]

## 表

### `users`
| 列名 | 类型 | 约束 | 描述 |
|------|------|------|------|
| id | TEXT | 主键 | UUID |
| email | TEXT | UNIQUE, NOT NULL | 用户邮箱 |
| name | TEXT | NOT NULL | 显示名称 |
| created_at | TEXT | NOT NULL, DEFAULT now | ISO 时间戳 |

### `posts`
[相同格式]

## 关系
[外键、连接模式、级联规则]

## 索引
[非主键索引及其存在原因]

## 迁移
- 生成:`npx drizzle-kit generate`
- 本地应用:`npx wrangler d1 migrations apply DB --local`
- 远程应用:`npx wrangler d1 migrations apply DB --remote`

## 种子数据
[引用种子脚本(如果存在)]

质量标准

  1. 记录实际存在的内容,而非计划中的内容 — 读取实际代码,不要发明端点或表
  2. 包含版本信息 — 从 package.json/lock 文件中提取,而非凭记忆
  3. 展示真实的响应结构 — 从代码中的 TypeScript 类型或 Zod 模式复制
  4. 保持可扫描性 — 表格优于段落,代码块优于散文
  5. 不要重复 CLAUDE.md — 如果架构信息已在 CLAUDE.md 中,则将其移至 ARCHITECTURE.md 或引用它
  6. 标记缺失 — 如果发现未记录的路由或用途不明确的表,使用 <!-- TODO: document purpose --> 进行标注

更新现有文档

如果文档已存在:

  1. 读取现有文档
  2. 与当前代码库进行差异比较
  3. 向用户展示变更内容(新增端点、删除的表、更新的技术栈)
  4. 应用更新,同时保留任何手写笔记或章节

绝不在不告知的情况下静默覆盖用户添加的自定义内容。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

jezweb/ai-image-generator

Generate AI images using Gemini or GPT APIs directly. Covers model selection (Gemini for scenes; GPT Image 2 for text rendering, batch variations, multi-reference compositing; GPT Image 1.5 for transparent icons), the 5-part prompting framework, API calling patterns, multi-turn editing, and quality assurance. Produces photorealistic scenes, icons, illustrations, OG images, posters, infographics, and product shots. Use when building websites that need images, creating marketing assets, or generating visual content. Triggers: 'generate image', 'ai image', 'create hero image', 'make an icon', 'generate illustration', 'create og image', 'poster', 'infographic', 'image variations', 'gpt-image-2', 'ai art', 'image generation'.

jezweb/aussie-business-english

Australian business English writing style for professional communications — warm, direct, EN-AU spelling (colour, organise, centre). Use whenever the user is writing for an Australian audience: emails, chat messages, proposals, client communications, blog posts, web copy, or any business writing. Apply to drafting, editing, and tone-checking professional text.

jezweb/claude-skills

Generate a complete, deployable landing page from a brief. Produces a single self-contained HTML file with Tailwind CSS (via CDN), responsive design, dark mode, semantic HTML, and OG meta tags. Sections: hero with CTA, features, social proof, pricing (optional), FAQ, footer. Use when building a marketing page, product launch page, coming soon page, or any standalone landing page. Triggers: 'landing page', 'create a page', 'marketing page', 'launch page', 'coming soon page', 'one-page site'.

jezweb/claude-skills

Agent skill at plugins/social-media/skills/social-media-posts/SKILL.md

jezweb/cloudflare-worker-builder

Scaffold and deploy Cloudflare Workers with Hono routing, Vite plugin, and Static Assets. Describe project, scaffold structure, configure bindings, deploy. Use whenever the user wants to create a Worker project, set up Hono on Cloudflare, configure D1 / R2 / KV / Queues bindings, or troubleshoot Worker export syntax, API route conflicts, HMR issues, or deployment failures.

jezweb/color-palette

Generate complete, accessible colour palettes from a single brand hex. Produces 11-shade scale (50-950), semantic tokens, dark mode variants, Tailwind v4 CSS output, WCAG contrast checks. Use whenever the user supplies a brand hex and asks for a palette, mentions setting up a design system, wants Tailwind theme colours from a brand colour, or asks to check colour accessibility / contrast.

jezweb/d1-drizzle-schema

Generate Drizzle ORM schemas for Cloudflare D1 databases with correct D1-specific patterns. Produces schema files, migration commands, type exports, and DATABASE_SCHEMA.md documentation. Handles D1 quirks: foreign keys always enforced, no native BOOLEAN/DATETIME types, 100 bound parameter limit, JSON stored as TEXT. Use when creating a new database, adding tables, or scaffolding a D1 data layer.

jezweb/elevenlabs-agents

Build conversational AI voice agents on the ElevenLabs platform. Configure agent + tools + knowledge base, integrate SDK (React / React Native / Swift / JS / server-side), test, deploy. Use whenever the user mentions ElevenLabs, building a voice agent, an AI phone system, an AI receptionist, conversational AI, or troubleshooting deprecated @11labs packages, webhook errors, CSP violations, localhost allowlist, or tool parsing errors.

jezweb/fastapi

Build Python APIs with FastAPI, Pydantic v2, and SQLAlchemy 2.0 async. Covers project structure, JWT auth, validation, and database integration with uv package manager. Prevents 7 documented errors. Use when: creating Python APIs, implementing JWT auth, or troubleshooting 422 validation, CORS, async blocking, form data, background tasks, or OpenAPI schema errors.

jezweb/favicon-gen

Generate custom favicons from logos, text, or brand colours. Produces favicon.svg, favicon.ico, apple-touch-icon.png, icon-192/512.png, and web manifest. Use whenever the user wants a favicon, mentions replacing a CMS default favicon, converting a logo into a favicon, creating branded initials icons, or troubleshooting favicon not displaying / iOS black square / missing manifest.

jezweb/github-release

Prepare and publish GitHub releases. Sanitizes code for public release (secrets scan, personal artifacts, LICENSE/README validation), creates version tags, and publishes via gh CLI. Trigger with 'release', 'publish', 'open source', 'prepare for release', 'create release', or 'github release'.

jezweb/google-apps-script

Build Google Apps Script automation for Sheets and Workspace. Custom menus, triggers (onEdit / time-driven / form submit), dialogs, sidebars, email batches, PDF export, external API. Use whenever the user wants to automate a Google Sheet, build a Sheets menu / sidebar / dialog, hit a Sheets row from email or a webhook, schedule a Sheets workflow, or asks 'how do I script this in Sheets'.

jezweb/google-chat-messages

Send Google Chat messages via incoming webhooks — text, rich cards (cardsV2), threaded replies. TypeScript types, card builder utility, widget reference inline. Use whenever the user wants to post to Google Chat from a script, build a chatbot reply, send a notification card, build a Google Chat webhook integration, or troubleshoot card / threading issues.

jezweb/hono-api-scaffolder

Scaffold Hono API routes for Cloudflare Workers. Produces route files, middleware, typed bindings, Zod validation, error handling, and API_ENDPOINTS.md documentation. Use after a project is set up with cloudflare-worker-builder or vite-flare-starter, when you need to add API routes, create endpoints, or generate API documentation.

jezweb/icon-set-generator

Generate cohesive, project-specific SVG icon sets for websites and applications. Use this skill whenever the user needs custom icons, an icon set for a website or app, icons for a client project, or mentions needing SVG icons that look consistent together. Also trigger when the user describes a project and icons would naturally be part of the deliverable — e.g. 'I'm building a site for a plumber' implies they'll need service icons. Trigger on: 'icons for', 'icon set', 'custom icons', 'SVG icons', 'make me icons', 'I need icons', 'website icons', 'project icons', or any request for consistent visual assets for a web project. Produces individual SVG files with a consistent style engine, not generic icon library lookups.

jezweb/image-processing

Process images for web development — resize, crop, trim whitespace, convert formats (PNG/WebP/JPG), optimise file size, generate thumbnails, create OG card images. Uses Pillow (Python) — no ImageMagick needed. Trigger with 'resize image', 'convert to webp', 'trim logo', 'optimise images', 'make thumbnail', 'create OG image', 'crop whitespace', 'process image', or 'image too large'.

jezweb/mcp-builder

Build MCP servers in Python with FastMCP. Define tools / resources / prompts, build the server, test locally, deploy to FastMCP Cloud or Docker. Use whenever the user mentions building an MCP server, exposing tools to LLMs, FastMCP, building a Claude integration, or troubleshooting FastMCP module-level server, storage, lifespan, middleware, OAuth, or deployment errors.

jezweb/nextjs

Build Next.js 16 apps with App Router, Server Components/Actions, Cache Components ("use cache"), and async route params. Includes proxy.ts and React 19.2. Prevents 25 documented errors. Use when: building Next.js 16 projects, or troubleshooting async params (Promise types), "use cache" directives, parallel route 404s, Turbopack issues, i18n caching, navigation throttling.

jezweb/project-health

All-in-one project configuration and health management. Sets up new projects (settings.local.json, CLAUDE.md, .gitignore), audits existing projects (permissions, context quality, MCP coverage, leaked secrets, stale docs), tidies accumulated cruft, captures session learnings, and adds permission presets. Uses sub-agents for heavy analysis to keep main context clean. Trigger with 'project health', 'check project', 'setup project', 'kickoff', 'bootstrap', 'tidy permissions', 'clean settings', 'capture learnings', 'audit context', 'add python permissions', or 'init project'.

jezweb/react-hook-form-zod

Build type-safe validated forms using React Hook Form v7 and Zod v4. Single schema works on client and server with full TypeScript inference via z.infer. Use when building forms, multi-step wizards, or fixing uncontrolled warnings, resolver errors, useFieldArray issues, performance problems with large forms.

相关技能