Community编程与开发github.com

github/dataverse-python-production-code

使用 Dataverse SDK 生成生产就绪的 Python 代码,包含错误处理、优化和最佳实践

dataverse-python-production-code 是什么?

这个 AI agent 技能旨在帮助开发者使用 Microsoft Dataverse SDK for Python 生成高质量的生产级代码。它强调在生产环境中运行代码所必需的关键方面:健壮的错误处理(包括重试逻辑和异常管理)、性能优化(如批量操作和查询优化)以及遵循 Python 和 Dataverse 的最佳实践(如使用上下文管理器管理连接、遵循 PEP 8 风格指南)。该技能适用于任何支持技能注入的 AI agent 平台,例如 Claude Code、Cursor 或 Codex。通过利用该技能,开发者可以显著减少编写样板代码的时间,并确保其 Dataverse 集成代码更加可靠和高效。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/github/awesome-copilot/tree/main/skills/dataverse-python-production-code

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

在你喜欢的 AI 中提问

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

文档

dataverse-python-production-code 是做什么的?

使用 Dataverse SDK 生成生产就绪的 Python 代码,包含错误处理、优化和最佳实践

概述

该技能指导 AI agent 生成使用 pyodbc 或 dataverse 客户端库与 Microsoft Dataverse 交互的 Python 代码,侧重于生产环境的可靠性、性能和可维护性。

核心原则

  • 错误处理:始终捕获 pyodbc.Error 和 requests.exceptions.RequestException 等特定异常。实现指数退避重试逻辑。
  • 性能优化:使用批量请求(例如 ExecuteMultiple)减少网络往返。限制查询返回的列数和行数。
  • 最佳实践:遵循 PEP 8 编码规范。使用环境变量管理连接字符串和凭据。使用上下文管理器(with 语句)确保资源正确释放。

如何使用

在对话中,描述你想用 Dataverse 做什么(例如“获取所有活跃的联系人”或“创建一个新的销售线索”)。AI agent 将根据这些原则生成相应的生产级代码片段。

示例

用户输入: “生成代码以使用 Dataverse SDK 更新现有联系人。”

agent 输出:

import os
from dataverse import DataverseClient
from dataverse.exceptions import DataverseError
import time

def update_contact(contact_id: str, new_email: str, max_retries: int = 3) -> None:
    """
    更新 Dataverse 中指定联系人的电子邮件地址。

    参数:
        contact_id: 联系人的 GUID。
        new_email: 新的电子邮件地址。
        max_retries: 最大重试次数。
    """
    client = DataverseClient.from_connection_string(os.environ["DATAVERSE_CONNECTION_STRING"])
    contact = {
        "contactid": contact_id,
        "emailaddress1": new_email
    }
    for attempt in range(max_retries):
        try:
            client.update("contacts", contact_id, contact)
            print(f"成功更新联系人 {contact_id}")
            return
        except DataverseError as e:
            print(f"尝试 {attempt + 1} 失败: {e}")
            if attempt < max_retries - 1:
                time.sleep(2 ** attempt)
            else:
                raise

if __name__ == "__main__":
    update_contact("00000000-0000-0000-0000-000000000000", "[email protected]")

支持的平台

  • Claude Code
  • Cursor
  • Codex
  • 其他支持技能注入的 AI agent 平台

Individual skills in this repo

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

github/acquire-codebase-knowledge

Use this skill when the user explicitly asks to map, document, or onboard into an existing codebase. Trigger for prompts like "map this codebase", "document this architecture", "onboard me to this repo", or "create codebase docs". Do not trigger for routine feature implementation, bug fixes, or narrow code edits unless the user asks for repository-level discovery.

github/add-educational-comments

Add educational comments to the file specified, or prompt asking for file to comment if one is not provided.

github/agent-governance

Patterns and techniques for adding governance, safety, and trust controls to AI agent systems. Use this skill when: - Building AI agents that call external tools (APIs, databases, file systems) - Implementing policy-based access controls for agent tool usage - Adding semantic intent classification to detect dangerous prompts - Creating trust scoring systems for multi-agent workflows - Building audit trails for agent actions and decisions - Enforcing rate limits, content filters, or tool restrictions on agents - Working with any agent framework (PydanticAI, CrewAI, OpenAI Agents, LangChain, AutoGen)

github/agentic-eval

Patterns and techniques for evaluating and improving AI agent outputs. Use this skill when: - Implementing self-critique and reflection loops - Building evaluator-optimizer pipelines for quality-critical generation - Creating test-driven code refinement workflows - Designing rubric-based or LLM-as-judge evaluation systems - Adding iterative improvement to agent outputs (code, reports, analysis) - Measuring and improving agent response quality

github/agent-owasp-compliance

Check any AI agent codebase against the OWASP Agentic Security Initiative (ASI) Top 10 risks. Use this skill when: - Evaluating an agent system's security posture before production deployment - Running a compliance check against OWASP ASI 2026 standards - Mapping existing security controls to the 10 agentic risks - Generating a compliance report for security review or audit - Comparing agent framework security features against the standard - Any request like "is my agent OWASP compliant?", "check ASI compliance", or "agentic security audit"

github/ai-prompt-engineering-safety-review

Comprehensive AI prompt engineering safety review and improvement prompt. Analyzes prompts for safety, bias, security vulnerabilities, and effectiveness while providing detailed improvement recommendations with extensive frameworks, testing methodologies, and educational content.

github/appinsights-instrumentation

Instrument a webapp to send useful telemetry data to Azure App Insights

github/apple-appstore-reviewer

Serves as a reviewer of the codebase with instructions on looking for Apple App Store optimizations or rejection reasons.

github/architecture-blueprint-generator

Comprehensive project architecture blueprint generator that analyzes codebases to create detailed architectural documentation. Automatically detects technology stacks and architectural patterns, generates visual diagrams, documents implementation patterns, and provides extensible blueprints for maintaining architectural consistency and guiding new development.

github/arch-linux-triage

Triage and resolve Arch Linux issues with pacman, systemd, and rolling-release best practices.

github/arize-ai-provider-integration

Creates, reads, updates, and deletes Arize AI integrations that store LLM provider credentials used by evaluators and other Arize features. Supports any LLM provider (e.g. OpenAI, Anthropic, Azure OpenAI, AWS Bedrock, Vertex AI, Gemini, NVIDIA NIM). Use when the user mentions AI integration, LLM provider credentials, create integration, list integrations, update credentials, delete integration, or connecting an LLM provider to Arize.

github/arize-annotation

Creates and manages annotation configs (categorical, continuous, freeform label schemas) and annotation queues (human review workflows) on Arize. Applies human annotations to project spans via the Python SDK. Use when the user mentions annotation config, annotation queue, label schema, human feedback, bulk annotate spans, update_annotations, labeling queue, annotate record, or human review.

github/arize-dataset

Creates, manages, and queries Arize datasets and examples. Covers dataset CRUD, appending examples, exporting data, and file-based dataset creation using the ax CLI. Use when the user needs test data, evaluation examples, or mentions create dataset, list datasets, export dataset, append examples, dataset version, golden dataset, or test set.

github/arize-evaluator

Handles LLM-as-judge evaluation workflows on Arize including creating/updating evaluators, running evaluations on spans or experiments, managing tasks, trigger-run operations, column mapping, and continuous monitoring. Use when the user mentions create evaluator, LLM judge, hallucination, faithfulness, correctness, relevance, run eval, score spans, score experiment, trigger-run, column mapping, continuous monitoring, or improve evaluator prompt.

github/arize-experiment

Creates, runs, and analyzes Arize experiments for evaluating and comparing model performance. Covers experiment CRUD, exporting runs, comparing results, and evaluation workflows using the ax CLI. Use when the user mentions create experiment, run experiment, compare models, model performance, evaluate AI, experiment results, benchmark, A/B test models, or measure accuracy.

github/arize-instrumentation

Adds Arize AX tracing to an LLM application for the first time. Follows a two-phase agent-assisted flow to analyze the codebase then implement instrumentation after user confirmation. Use when the user wants to instrument their app, add tracing from scratch, set up LLM observability, integrate OpenTelemetry or openinference, or get started with Arize tracing.

github/arize-link

Generates deep links to the Arize UI for traces, spans, sessions, datasets, labeling queues, evaluators, and annotation configs. Produces clickable URLs for sharing Arize resources with team members. Use when the user wants to link to or open a trace, span, session, dataset, evaluator, or annotation config in the Arize UI.

github/arize-prompt-optimization

Optimizes, improves, and debugs LLM prompts using production trace data, evaluations, and annotations. Extracts prompts from spans, gathers performance signal, and runs a data-driven optimization loop using the ax CLI. Use when the user mentions optimize prompt, improve prompt, make AI respond better, improve output quality, prompt engineering, prompt tuning, or system prompt improvement.

github/arize-trace

Downloads, exports, and inspects existing Arize traces and spans to understand what an LLM app is doing or debug runtime issues. Covers exporting traces by ID, spans by ID, sessions by ID, and root-cause investigation using the ax CLI. Use when the user wants to look at existing trace data, see what their LLM app is doing, export traces, download spans, investigate errors, or analyze behavior regressions.

github/aspire

Aspire skill covering the Aspire CLI, AppHost orchestration, service discovery, integrations, MCP server, VS Code extension, Dev Containers, GitHub Codespaces, templates, dashboard, and deployment. Use when the user asks to create, run, debug, configure, deploy, or troubleshoot an Aspire distributed application.

相关技能