semantic-kernel

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Semantic Kernel

Semantic Kernel

Use this skill when working with applications, plugins, function-calling flows, or AI integrations built on Semantic Kernel.
Always ground implementation advice in the latest Semantic Kernel documentation and samples rather than memory alone.
当你开发基于Semantic Kernel的应用、插件、函数调用流程或AI集成时,可使用本Skill。
提供实现建议时,务必以最新的Semantic Kernel文档和示例为依据,而非仅凭记忆。

Determine the target language first

首先确定目标语言

Choose the language workflow before making recommendations or code changes:
  1. Use the .NET workflow when the repository contains
    .cs
    ,
    .csproj
    ,
    .sln
    , or other .NET project files, or when the user explicitly asks for C# or .NET guidance. Follow references/dotnet.md.
  2. Use the Python workflow when the repository contains
    .py
    ,
    pyproject.toml
    ,
    requirements.txt
    , or the user explicitly asks for Python guidance. Follow references/python.md.
  3. If the repository contains both ecosystems, match the language used by the files being edited or the user's stated target.
  4. If the language is ambiguous, inspect the current workspace first and then choose the closest language-specific reference.
在给出建议或修改代码前,请选择对应的语言工作流:
  1. 若代码库包含
    .cs
    .csproj
    .sln
    或其他.NET项目文件,或用户明确要求C#/.NET相关指导,请使用**.NET**工作流。遵循references/dotnet.md中的规范。
  2. 若代码库包含
    .py
    pyproject.toml
    requirements.txt
    ,或用户明确要求Python相关指导,请使用Python工作流。遵循references/python.md中的规范。
  3. 若代码库同时包含两种技术栈,请匹配待编辑文件所使用的语言,或用户指定的目标语言。
  4. 若语言不明确,请先检查当前工作区,再选择最匹配的语言特定参考。

Always consult live documentation

务必参考实时文档

Shared guidance

通用指南

When working with Semantic Kernel in any language:
  • Use async patterns for kernel operations.
  • Follow official plugin and function-calling patterns.
  • Implement explicit error handling and logging.
  • Prefer strong typing, clear abstractions, and maintainable composition patterns.
  • Use built-in connectors for Azure AI Foundry, Azure OpenAI, OpenAI, and other AI services, while preferring Azure AI Foundry services for new projects when that fits the task.
  • Use the kernel's memory and context-management capabilities when they simplify the solution.
  • Use
    DefaultAzureCredential
    when Azure authentication is appropriate.
使用任意语言开发Semantic Kernel时,请遵循以下规范:
  • 对内核操作使用异步模式。
  • 遵循官方的插件和函数调用模式。
  • 实现明确的错误处理和日志记录。
  • 优先使用强类型、清晰的抽象以及可维护的组合模式。
  • 使用针对Azure AI Foundry、Azure OpenAI、OpenAI及其他AI服务的内置连接器;若任务适配,新项目优先选用Azure AI Foundry服务。
  • 当内核的内存和上下文管理能力可简化解决方案时,请加以利用。
  • 当需要Azure认证时,请使用
    DefaultAzureCredential

Workflow

工作流

  1. Determine the target language and read the matching reference file.
  2. Fetch the latest official docs and samples before making implementation choices.
  3. Apply the shared Semantic Kernel guidance from this skill.
  4. Use the language-specific package, repository, sample paths, and coding practices from the chosen reference.
  5. When examples in the repo differ from current docs, explain the difference and follow the current supported pattern.
  1. 确定目标语言,并阅读对应的参考文件。
  2. 在确定实现方案前,获取最新的官方文档和示例。
  3. 应用本Skill中的Semantic Kernel通用指南。
  4. 使用所选参考中针对该语言的包、代码库路径、示例路径及编码规范。
  5. 若代码库中的示例与当前文档不一致,请说明差异并遵循当前受支持的模式。

References

参考资料

  • .NET reference
  • Python reference
  • .NET参考
  • Python参考

Completion criteria

完成标准

  • Recommendations match the target language.
  • Package names, repository paths, and sample locations match the selected ecosystem.
  • Guidance reflects current Semantic Kernel documentation rather than stale assumptions.
  • 建议与目标语言匹配。
  • 包名称、代码库路径和示例位置与所选技术栈一致。
  • 指导内容基于当前Semantic Kernel文档,而非过时的假设。