返回技能列表

write-claude-md

pjt222
更新于 2 days ago
6 次查看
17
2
17
在 GitHub 上查看
wordaimcpautomation

关于

This skill generates a CLAUDE.md file with project-specific instructions for AI coding assistants. It helps structure guidelines, document conventions, and integrate MCP servers to improve AI behavior in your codebase. Use it when starting new AI-assisted projects or optimizing existing ones for better AI collaboration.

快速安装

Claude Code

推荐
主要方式
npx skills add pjt222/agent-almanac -a claude-code
插件命令备选方式
/plugin add https://github.com/pjt222/agent-almanac
Git 克隆备选方式
git clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/write-claude-md

在 Claude Code 中复制并粘贴此命令以安装该技能

技能文档

書 CLAUDE.md

立 CLAUDE.md 文,予 AI 助手以項目特脈絡。

用時

  • 始新項目而將用 AI 助手
  • 改善現項目中 AI 之行
  • 錄項目之約、流、限
  • 整合 MCP 服或臣定於項目

  • 必要:項目類與技術棧
  • 必要:要約與限
  • 可選:MCP 服之設
  • 可選:作者與貢者信
  • 可選:安與密之要

第一步:立基 CLAUDE.md

CLAUDE.md 於項目根:

# Project Name

Brief description of what this project is and its purpose.

## Quick Start

Essential commands for working on this project:

```bash
# Install dependencies
npm install  # or renv::restore() for R

# Run tests
npm test     # or devtools::test() for R

# Build
npm run build  # or devtools::check() for R

Architecture

Key architectural decisions and patterns used in this project.

Conventions

  • Always use descriptive variable names
  • Follow [language-specific style guide]
  • Write tests for all new functionality

得:`CLAUDE.md` 文存於項目根,至少含項目述、速始命、架構覽、約段。

敗則:不確含何者,唯始 Quick Start 段含三要命(裝、試、建)。文可隨項目演而漸擴。

### 第二步:加技術特段

**為 R 包**:

```markdown
## Development Workflow

```r
devtools::load_all()    # Load for development
devtools::document()    # Regenerate docs
devtools::test()        # Run tests
devtools::check()       # Full package check

Package Structure

  • R/ - Source code (one function per file)
  • tests/testthat/ - Tests mirror R/ structure
  • vignettes/ - Long-form documentation
  • man/ - Generated by roxygen2 (do not edit manually)

Critical Files (Do Not Delete)

  • .Rprofile - Session configuration
  • .Renviron - Environment variables (git-ignored)
  • renv.lock - Locked dependencies

**為 Node.js/TypeScript**:

```markdown
## Stack

- Next.js 15 with App Router
- TypeScript strict mode
- Tailwind CSS for styling
- Vercel for deployment

## Conventions

- Use `@/` import alias for src/ directory
- Server Components by default, `"use client"` only when needed
- API routes in `src/app/api/`

得:技術特段加,配項目實棧——R 項目用 R 包結構、web 項目用 Node.js 棧詳等。命與徑指實項目布。

敗則:項目用陌棧者,察 package.jsonDESCRIPTIONCargo.toml、或等以辨技術而加應段。

第三步:加 MCP 服信

## Available MCP Servers

### r-mcptools (R Integration)
- **Purpose**: Connect to R/RStudio sessions
- **Status**: Configured
- **Configuration**: `claude mcp add r-mcptools stdio "Rscript.exe" -- -e "mcptools::mcp_server()"`

### hf-mcp-server (Hugging Face)
- **Purpose**: AI/ML model and dataset access
- **Status**: Configured
- **Configuration**: `claude mcp add hf-mcp-server -e HF_TOKEN=token -- mcp-remote https://huggingface.co/mcp`

得:每設 MCP 服有子段錄其用、狀(已設/可得/未設)、加之命。無實憑或密。

敗則:MCP 服未設者,錄為「Available」附設囑而非「Configured」。憑值用 your_token_here 之代。

第四步:加作者信

## Author Information

### Standard Package Authorship
- **Name**: Author Name
- **Email**: [email protected]
- **ORCID**: 0000-0000-0000-0000
- **GitHub**: username

得:作者信段含名、郵、ORCID(學/研項目)、GitHub 名。R 包者,式合 DESCRIPTION 文之要。

敗則:作者信為密或不宜公者,用組名代個詳,或於內項目全略此段。

第五步:加安囑

## Security & Confidentiality

- Never commit `.Renviron`, `.env`, or files containing tokens
- Use placeholder values in documentation: `YOUR_TOKEN_HERE`
- Environment variables for all secrets
- Git-ignored: `.Renviron`, `.env`, `credentials.json`

得:安段列必不可入庫之文、文中代值之約,並確 .gitignore 涵諸密文。

敗則:不確何文為密者,行 grep -rn "sk-\|ghp_\|password" . 掃顯密。含真憑之文宜入 .gitignore 並述於此段。

第六步:引術與指南

## Development Best Practices References
@agent-almanac/skills/write-testthat-tests/SKILL.md
@agent-almanac/skills/submit-to-cran/SKILL.md

得:相關術與指南以 @ 徑引,予 AI 助手詳法應項目常任。

敗則:引之術或指南於指徑不存者,驗其徑或去其引。斷 @ 引無益且或亂助手。

第七步:加質與狀信

## Quality Status

- R CMD check: 0 errors, 0 warnings, 1 note
- Test coverage: 85%
- Tests: 200+ passing
- Vignettes: 3 (rated 9/10)

得:質指段反項目當前態,含確之察果、覆、試數、文狀數。

敗則:指未得(新項目)者,加「TBD」之代並隨項目熟而更。勿造數。

  • CLAUDE.md 於項目根
  • 速始命準且運
  • 架構段反實項目結構
  • 無敏信(憑、密、私徑)
  • MCP 服設當前
  • 引之文與徑存

  • 陳信:項目結構變時更 CLAUDE.md
  • 過詳:簡之。連詳指南而非複內容
  • 敏數:勿含真憑或密。用代
  • 衝指令:確 CLAUDE.md 不矛他設文
  • 缺於 .Rbuildignore:R 包者,加 ^CLAUDE\\.md$.Rbuildignore

成項目所察之模:

  1. putior(829 行):全 CLAUDE.md 含質指、二十成就、MCP 整詳、開流
  2. 簡項目(20 行):唯速始命與要約

CLAUDE.md 之模配項目複度。

  • create-r-package - CLAUDE.md 為包設之部
  • configure-mcp-server - CLAUDE.md 中所引之 MCP 設
  • security-audit-codebase - 驗 CLAUDE.md 無密

GitHub 仓库

pjt222/agent-almanac
路径: i18n/wenyan/skills/write-claude-md
0
agentsagentskillsai-assisted-developmentclaude-codeskillsteams

相关推荐技能

content-collections

Content Collections 是一个 TypeScript 优先的构建工具,可将本地 Markdown/MDX 文件转换为类型安全的数据集合。它专为构建博客、文档站和内容密集型 Vite+React 应用而设计,提供基于 Zod 的自动模式验证。该工具涵盖从 Vite 插件配置、MDX 编译到生产环境部署的完整工作流。

查看技能

polymarket

这个Claude Skill为开发者提供完整的Polymarket预测市场开发支持,涵盖API调用、交易执行和市场数据分析。关键特性包括实时WebSocket数据流,可监控实时交易、订单和市场动态。开发者可用它构建预测市场应用、实施交易策略并集成实时市场预测功能。

查看技能

creating-opencode-plugins

该Skill帮助开发者创建OpenCode插件,用于接入命令、文件、LSP等25+种事件。它提供了插件结构、事件API规范和JavaScript/TypeScript实现模式,适合需要拦截操作、扩展功能或自定义事件处理的场景。开发者可通过它快速构建响应式模块来增强OpenCode AI助手的能力。

查看技能

sglang

SGLang是一个专为LLM设计的高性能推理框架,特别适用于需要结构化输出的场景。它通过RadixAttention前缀缓存技术,在处理JSON、正则表达式、工具调用等具有重复前缀的复杂工作流时,能实现极速生成。如果你正在构建智能体或多轮对话系统,并追求远超vLLM的推理性能,SGLang是理想选择。

查看技能