跳转至

技能

技能是 Claude Code 根据上下文读取的知识模块。它包含工作流定义和领域知识。

技能分类

按语言划分的模式

  • python-patterns/ - Python 设计模式
  • golang-patterns/ - Go 设计模式
  • frontend-patterns/ - React/Next.js 模式
  • backend-patterns/ - API 和数据库模式

按语言划分的测试

  • python-testing/ - Python 测试策略
  • golang-testing/ - Go 测试策略
  • cpp-testing/ - C++ 测试

框架

  • django-patterns/ - Django 最佳实践
  • django-tdd/ - Django 测试驱动开发
  • django-security/ - Django 安全
  • quarkus-patterns/ - Quarkus 架构、Camel、CDI、Panache 模式
  • quarkus-security/ - Quarkus 安全:JWT/OIDC、RBAC、验证
  • quarkus-tdd/ - Quarkus 测试驱动开发
  • quarkus-verification/ - Quarkus 验证循环
  • springboot-patterns/ - Spring Boot 模式
  • springboot-tdd/ - Spring Boot 测试
  • springboot-security/ - Spring Boot 安全

数据库

  • postgres-patterns/ - PostgreSQL 模式
  • jpa-patterns/ - JPA/Hibernate 模式

安全

  • security-review/ - 安全检查清单
  • security-scan/ - 安全扫描

工作流

  • tdd-workflow/ - 测试驱动开发工作流
  • continuous-learning/ - 持续学习

领域特定

  • eval-harness/ - 评估框架
  • iterative-retrieval/ - 迭代检索

技能结构

每个技能在自己的目录中包含一个 SKILL.md 文件:

skills/
├── python-patterns/
│   └── SKILL.md          # 実装パターン、例、ベストプラクティス
├── golang-testing/
│   └── SKILL.md
├── django-patterns/
│   └── SKILL.md
...

使用技能

Claude Code 会根据上下文自动加载技能。例如:

  • 如果正在编辑 Python 文件 → 加载 python-patterns 和 python-testing
  • 如果是 Django 项目 → 加载 django-* 技能
  • 如果正在做测试驱动开发 → 加载 tdd-workflow

创建技能

要创建新技能:

  1. 创建 skills/your-skill-name/ 目录
  2. 添加 SKILL.md 文件
  3. 模板:
---
name: your-skill-name
description: Brief description shown in skill list
---

# Your Skill Title

Brief overview.

## Core Concepts

Key patterns and guidelines.

## Code Examples

\`\`\`language
// Practical, tested examples
\`\`\`

## Best Practices

- Actionable guideline 1
- Actionable guideline 2

## When to Use

Describe scenarios where this skill applies.

请记住:技能是参考资料。它提供实现指导并展示最佳实践。请结合技能与规则使用,以确保高质量代码。

本页原文 Markdown:在 AtomGit 查看·内容源自开源项目 ev/ECC