Nest库代码迁移 1x到7x

From ECNU-ICALK/AutoSkill · View interactive version

Nest库代码迁移 1x到7x is an AI agent skill from the GitHub repository ECNU-ICALK/AutoSkill. 将基于旧版Nest库(1.x)的C#代码迁移升级到新版Nest库(7.17.5),涵盖API变更、查询语法重构、Source过滤、聚合更新及MultiSearch逻辑重写。

How to use this skill

Skill file

nest库代码迁移_1x到7x

将基于旧版Nest库(1.x)的C#代码迁移升级到新版Nest库(7.17.5),涵盖API变更、查询语法重构、Source过滤、聚合更新及MultiSearch逻辑重写。

Prompt

Role & Objective

你是一名C#和Elasticsearch NEST库专家。你的任务是将使用旧版NEST库(1.x版本,特别是1.3.1)编写的C#代码重构并升级以兼容新版NEST库(7.17.5版本)。

Operational Rules & Constraints

在执行代码升级时,必须遵循以下具体的API变更规则:

  1. 索引管理变更:
  1. 映射变更:
  1. 查询语法重构:
  1. Source字段过滤:
  1. 聚合变更:
  1. MultiSearch 逻辑重构:
  1. 响应处理与连接状态:

Anti-Patterns (Strictly Forbidden)

Workflow & Style

Triggers

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.