Community编程与开发github.com

marketplace-publishing

将技能和智能体发布到 dotnet-skills Claude Code 市场的工作流。涵盖添加新内容、更新 plugin.json、验证和发布标记。

marketplace-publishing 是什么?

此技能详细描述了将技能(skills)和智能体(agents)发布到 dotnet-skills 的 Claude Code 市场的工作流程。它帮助开发者和 AI 代理用户理解如何向市场贡献内容,包括技能、智能体的添加、注册、验证以及最终发布。该技能支持 Claude Code 平台,并基于 dotnet-skills 仓库的结构和脚本工作。核心功能包括:根据预定义类别(如 akka、aspire、csharp 等)创建新技能文件夹并编写符合规范的 SKILL.md 文件,在 plugin.json 中注册路径,运行验证脚本确保正确性;创建智能体 markdown 文件并指定模型类型(haiku/sonnet/opus);以及进行语义化版本管理(MAJOR.MINOR.PATCH),通过 git 标签触发 GitHub Actions 自动发布和生成 release notes。此外,还提供了用户安装命令、验证检查清单和常见问题排错指南,确保整个发布流程顺畅。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Aaronontheweb/dotnet-skills/tree/main/skills/marketplace-publishing

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

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

文档

市场发布工作流

此技能记录了如何将技能和智能体发布到 dotnet-skills 的 Claude Code 市场。

仓库结构

dotnet-skills/
├── .claude-plugin/
│   ├── marketplace.json      # 市场目录
│   └── plugin.json           # 插件元数据 + 技能/智能体注册表
├── .github/workflows/
│   └── release.yml           # 发布自动化
├── skills/
│   ├── akka/                 # Akka.NET 技能
│   │   ├── best-practices/SKILL.md
│   │   ├── testing-patterns/SKILL.md
│   │   └── ...
│   ├── aspire/               # .NET Aspire 技能
│   ├── csharp/               # C# 语言技能
│   ├── testing/              # 测试框架技能
│   └── meta/                 # 元技能
├── agents/
│   └── *.md                  # 智能体定义
└── scripts/
    └── validate-marketplace.sh

添加新技能

步骤 1:选择类别

技能按领域组织:

类别用途
akka/Akka.NET actor 模式、测试、集群
aspire/.NET Aspire 编排、测试、配置
csharp/C# 语言特性、编码规范
testing/测试框架(xUnit、Playwright、Testcontainers)
meta/关于此市场的元技能

如果没有合适的类别,可创建新的类别文件夹。

步骤 2:创建技能文件夹

在文件夹内创建 SKILL.md:

skills/<category>/<skill-name>/SKILL.md

示例:skills/akka/cluster-sharding/SKILL.md

步骤 3:编写 SKILL.md

---
name: my-new-skill
description: 简要描述此技能的用途及使用场景。
---

# 我的新技能

## 何时使用此技能

在以下场景使用此技能:
- [列出具体场景]

---

## 内容

[包含示例、模式和反模式的全面指南]

要求:

  • name 必须使用小写字母和连字符(例如 cluster-sharding)
  • description 应为 1-2 句话,说明 Claude 何时应使用此技能
  • 内容应在 10-40KB 之间,全面覆盖主题
  • 包含使用现代 C# 模式的具体代码示例

步骤 4:在 plugin.json 中注册

将技能路径添加到 .claude-plugin/plugin.json 的 skills 数组中:

{
  "skills": [
    "./skills/akka/best-practices",
    "./skills/akka/cluster-sharding"  // 在此添加新技能
  ]
}

步骤 5:验证

运行验证脚本:

./scripts/validate-marketplace.sh

步骤 6:一起提交

git add skills/akka/cluster-sharding/ .claude-plugin/plugin.json
git commit -m "添加 cluster-sharding 技能,用于 Akka.NET 集群分片模式"

添加新智能体

步骤 1:创建智能体文件

在 /agents/ 目录下创建一个 markdown 文件:

---
name: my-agent-name
description: [领域]专家。专攻[特定领域]。适用于[场景]。
model: sonnet
color: blue
---

你是一位[领域]专家,在[领域]方面拥有深厚专业知识。

**参考资料:**
- [官方文档和资源]

**核心专长领域:**
[列出专长领域]

**诊断方法:**
[智能体如何分析问题]

要求:

  • name 必须使用小写字母和连字符
  • model 必须是以下之一:haiku、sonnet、opus
  • color 可选(用于 UI 显示)

步骤 2:在 plugin.json 中注册

添加到 agents 数组:

{
  "agents": [
    "./agents/akka-net-specialist",
    "./agents/my-agent-name"  // 在此添加新智能体
  ]
}

步骤 3:一起提交

git add agents/my-agent-name.md .claude-plugin/plugin.json
git commit -m "添加 my-agent-name 智能体,用于[领域]专业知识"

发布版本

版本管理

更新 .claude-plugin/plugin.json 中的版本号:

{
  "version": "1.1.0"
}

使用语义化版本控制 (MAJOR.MINOR.PATCH):

  • MAJOR:重大变更(重命名/删除技能)
  • MINOR:添加新技能或智能体
  • PATCH:对现有内容进行修复或改进

发布流程

  1. 在 plugin.json 中更新版本号

  2. 验证

    ./scripts/validate-marketplace.sh
    
  3. 提交版本号更新

    git add .claude-plugin/plugin.json
    git commit -m "将版本号升至 1.1.0"
    
  4. 创建并推送标签

    git tag v1.1.0
    git push origin master --tags
    
  5. GitHub Actions 将自动:

    • 验证市场结构
    • 创建包含自动生成发行说明的 GitHub Release

用户安装

用户安装完整插件(包含所有技能和智能体):

# 添加市场(一次性操作)
/plugin marketplace add Aaronontheweb/dotnet-skills

# 安装插件(获取所有内容)
/plugin install dotnet-skills

# 更新到最新版本
/plugin marketplace update

验证检查清单

提交前请检查:

  • SKILL.md 包含有效的 YAML frontmatter,且包含 name 和 description
  • 技能文件夹位于适当的类别下
  • 路径已添加到 plugin.json 的 skills 数组中
  • 对于智能体:已指定 model(haiku/sonnet/opus)
  • ./scripts/validate-marketplace.sh 通过

排错指南

安装后技能不显示

  • 验证 plugin.json 中的路径与文件夹结构匹配
  • 检查文件夹中是否存在 SKILL.md
  • 尝试重新安装:/plugin uninstall dotnet-skills && /plugin install dotnet-skills

验证错误

  • 确保 JSON 有效:jq . .claude-plugin/plugin.json
  • 检查数组中是否有尾随逗号
  • 验证所有引用的文件夹都包含 SKILL.md

未创建 Release

  • 确保标签遵循语义化版本格式(v1.0.0)
  • 检查 GitHub Actions 日志中的错误
  • 验证 plugin.json 中的版本号与标签匹配

Individual skills in this repo

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

akka-hosting-actor-patterns

Patterns for building entity actors with Akka.Hosting - GenericChildPerEntityParent, message extractors, cluster sharding abstraction, akka-reminders, and ITimeProvider. Supports both local testing and clustered production modes.

akka-net-aspire-configuration

Configure Akka.NET with .NET Aspire for local development and production deployments. Covers actor system setup, clustering, persistence, Akka.Management integration, and Aspire orchestration patterns.

akka-net-best-practices

Critical Akka.NET best practices including EventStream vs DistributedPubSub, supervision strategies, error handling, Props vs DependencyResolver, work distribution patterns, and cluster/local mode abstractions for testability.

akka-net-management

Akka.Management for cluster bootstrapping, service discovery (Kubernetes, Azure, Config), health checks, and dynamic cluster formation without static seed nodes.

akka-net-testing-patterns

Write unit and integration tests for Akka.NET actors using modern Akka.Hosting.TestKit patterns. Covers dependency injection, TestProbes, persistence testing, and actor interaction verification. Includes guidance on when to use traditional TestKit.

api-design

Design stable, compatible public APIs using extend-only design principles. Manage API compatibility, wire compatibility, and versioning for NuGet packages and distributed systems.

aspire-configuration

Configure Aspire AppHost to emit explicit app config via environment variables; keep app code free of Aspire clients and service discovery.

aspire-integration-testing

Write integration tests using .NET Aspire

aspire-service-defaults

Create a shared ServiceDefaults project for Aspire applications. Centralizes OpenTelemetry, health checks, resilience, and service discovery configuration across all services.

crap-analysis

Analyze code coverage and CRAP (Change Risk Anti-Patterns) scores to identify high-risk code. Use OpenCover format with ReportGenerator for Risk Hotspots showing cyclomatic complexity and untested code paths.

csharp-concurrency-patterns

Choosing the right concurrency abstraction in .NET - from async/await for I/O to Channels for producer/consumer to Akka.NET for stateful entity management. Avoid locks and manual synchronization unless absolutely necessary.

database-performance

Database access patterns for performance. Separate read/write models, avoid N+1 queries, use AsNoTracking, apply row limits, and never do application-side joins. Works with EF Core and Dapper.

dependency-injection-patterns

Organize DI registrations using IServiceCollection extension methods. Group related services into composable Add* methods for clean Program.cs and reusable configuration in tests.

dotnet-devcert-trust

Diagnose and fix .NET HTTPS dev certificate trust issues on Linux. Covers the full certificate lifecycle from generation to system CA bundle inclusion, with distro-specific guidance for Ubuntu, Fedora, Arch, and WSL2.

dotnet-local-tools

Managing local .NET tools with dotnet-tools.json for consistent tooling across development environments and CI/CD pipelines.

dotnet-project-structure

Modern .NET project structure including .slnx solution format, Directory.Build.props, central package management, SourceLink, version management with RELEASE_NOTES.md, and SDK pinning with global.json.

dotnet-slopwatch

Use Slopwatch to detect LLM reward hacking in .NET code changes. Run after every code modification to catch disabled tests, suppressed warnings, empty catch blocks, and other shortcuts that mask real problems.

efcore-patterns

Entity Framework Core best practices including NoTracking by default, query splitting for navigation collections, migration management, dedicated migration services, and common pitfalls to avoid.

ilspy-decompile

Understand implementation details of .NET code by decompiling assemblies. Use when you want to see how a .NET API works internally, inspect NuGet package source, view framework implementation, or understand compiled .NET binaries.

mailpit-integration

Test email sending locally using Mailpit with .NET Aspire. Captures all outgoing emails without sending them. View rendered HTML, inspect headers, and verify delivery in integration tests.

相关技能