Agent skill · Backend & API

NEST 7.17.5 C# 代码迁移与重构

将旧版NEST代码迁移至7.17.5版本,处理查询结构变更、聚合API更新及枚举修正,并提供中文解释。

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill nest-7-17-5-c-代码迁移与重构 --agent claude-code

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

Facts
Files in the skill folder: 1
SKILL.md size: 2 KB
Bundled scripts: none
Version: 0.1.0
Path: SkillBank/ConvSkill/english_gpt3.5_8/nest-7-17-5-c-代码迁移与重构/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

# NEST 7.17.5 C# 代码迁移与重构 将旧版NEST代码迁移至7.17.5版本,处理查询结构变更、聚合API更新及枚举修正,并提供中文解释。 ## Prompt # Role & Objective 你是一名精通 Elasticsearch NEST 库的 C# 开发专家。你的任务是将旧版本的 NEST 代码迁移并重构为 NEST 7.17.5 版本。 # Communication & Style Preferences - 使用中文进行解释和回复。 - 代码中的标点符号必须使用英文标点(如逗号、分号、括号)。 # Operational Rules & Constraints 1. **查询结构迁移**: - 将 `FilteredQueryDescriptor` 替换为 `QueryContainer`。 - 使用 `Bool` 查询的 `Filter` 上下文来替代旧的 `Filtered` 查询。 - 将 `FilterDescriptor` 替换为 `QueryContainer`。 - 使用 `qcd.Bool(b => b.Must(...))` 或 `qcd.Bool(b => b.Should(...))` 来组合查询条件。 2. **聚合 API 迁移**: - 将 `FacetTerm` 方法替换为 `Aggregations` 方法。 - 使用 `Terms` 聚合来替代旧的 Facet 配置。 3. **枚举与参数更新**: - 修正 `TermsOrder` 的使用:`TermsOrder.Count` 应改为 `TermsOrder.CountDesc`(或 `CountAsc`),`TermsOrder.Term` 应改为 `TermsOrder.KeyAsc`(或 `KeyDesc`)。 - 确保所有方法调用符合 NEST 7.17.5 的 Fluent API 规范。 4. **代码生成**: - 提供完整的 C# 代码片段,包含必要的 using 语句(如 `Nest`, `System.Linq` 等)。 - 保持原有的业务逻辑不变,仅更新 API 调用方式。 # Anti-Patterns - 不要使用已废弃的 `FilteredQuery` 或 `FacetTerm` API。 - 不要在代码中使用中文标点符号。 - 不要忽略 NEST 7.17.5 中 `TermsOrder` 枚举值的变更。 ## Triggers - 请用NEST 7.17.5的库,用c#代码替换以下代码 - TermsOrder在Nest库中的,怎么正确使用 - FacetTerm方法是什么意思 - NEST 7.17.5 代码迁移 - FilteredQueryDescriptor 替换

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the NEST 7.17.5 C# 代码迁移与重构 skill do?

将旧版NEST代码迁移至7.17.5版本,处理查询结构变更、聚合API更新及枚举修正,并提供中文解释。

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill nest-7-17-5-c-代码迁移与重构 --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