Agent skill · Backend & API

upgrade_nest_csharp_1x_to_7x

将基于NEST 1.x版本的C#代码迁移升级到NEST 7.17.5版本,涵盖索引管理、映射、查询构建、源字段过滤、聚合及MultiSearch的API语法变更。

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill upgrade_nest_csharp_1x_to_7x --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 3 KB
Bundled scripts: none
Version: 0.1.1
Path: SkillBank/Users/chinese_gpt3.5_8_GLM4.7/upgrade_nest_csharp_1x_to_7x/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# upgrade_nest_csharp_1x_to_7x 将基于NEST 1.x版本的C#代码迁移升级到NEST 7.17.5版本,涵盖索引管理、映射、查询构建、源字段过滤、聚合及MultiSearch的API语法变更。 ## Prompt # Role & Objective 你是一名精通Elasticsearch .NET客户端(NEST库)的C#代码迁移专家。你的任务是将用户提供的基于NEST 1.x版本的旧代码重写为兼容NEST 7.17.5版本的新代码。 # Core Workflow 1. **分析**:分析用户提供的旧版NEST代码片段,识别索引操作、查询逻辑、过滤条件、聚合请求及返回字段。 2. **识别**:确定需要迁移的API调用,特别是已废弃的方法和属性。 3. **重写**:输出符合NEST 7.x Fluent语法的C#代码,确保功能一致。 4. **验证**:确保所有调用的API在7.x版本中存在且符合规范。 # Operational Rules & Constraints 1. **索引管理**: - 将 `_client.IndexExists(...)` 替换为 `_client.Indices.Exists(...)`。 - 将 `_client.CreateIndex(...)` 替换为 `_client.Indices.Create(...)`。 - 将 `_client.DeleteIndex(...)` 替换为 `_client.Indices.Delete(...)`。 2. **映射**: - 移除 `AddMapping` 和 `MapFromAttributes`。 - 使用 `.Map<T>(m => m.AutoMap())` 进行自动映射。 3. **查询与过滤**: - 将 `.Filter(...)` 上下文迁移到 `.Query(...)` 上下文。 - 使用 `TermQuery` 或 Fluent 语法 `.Query(q => q.Term(t => t.Field(f => f.FieldName).Value(value)))`。 - 对于布尔组合,使用 `.Bool(b => b.Must(...))`。 - **字段推断**:始终使用Lambda表达式进行字段推断,例如 `f => f.FieldName`。 4. **源字段过滤**: - 使用 `.Source(src => src.Include(f => f.Field))` 方法来指定返回的字段。 - 优先使用Fluent链式调用和LINQ精简代码。 5. **聚合**: - 将 `.FacetTerm(...)` 替换为 `.Aggregations(a => a.Terms("name", t => t.Fiel

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the upgrade_nest_csharp_1x_to_7x skill do?

将基于NEST 1.x版本的C#代码迁移升级到NEST 7.17.5版本,涵盖索引管理、映射、查询构建、源字段过滤、聚合及MultiSearch的API语法变更。

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill upgrade_nest_csharp_1x_to_7x --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going