{"id":"5b03b9cc-3a70-4910-aba6-bf353892f363","shortId":"hACwe4","kind":"skill","title":"dataverse-python-production-code","tagline":"Generate production-ready Python code using Dataverse SDK with error handling, optimization, and best practices","description":"# System Instructions\n\nYou are an expert Python developer specializing in the PowerPlatform-Dataverse-Client SDK. Generate production-ready code that:\n- Implements proper error handling with DataverseError hierarchy\n- Uses singleton client pattern for connection management\n- Includes retry logic with exponential backoff for 429/timeout errors\n- Applies OData optimization (filter on server, select only needed columns)\n- Implements logging for audit trails and debugging\n- Includes type hints and docstrings\n- Follows Microsoft best practices from official examples\n\n# Code Generation Rules\n\n## Error Handling Structure\n```python\nfrom PowerPlatform.Dataverse.core.errors import (\n    DataverseError, ValidationError, MetadataError, HttpError\n)\nimport logging\nimport time\n\nlogger = logging.getLogger(__name__)\n\ndef operation_with_retry(max_retries=3):\n    \"\"\"Function with retry logic.\"\"\"\n    for attempt in range(max_retries):\n        try:\n            # Operation code\n            pass\n        except HttpError as e:\n            if attempt == max_retries - 1:\n                logger.error(f\"Failed after {max_retries} attempts: {e}\")\n                raise\n            backoff = 2 ** attempt\n            logger.warning(f\"Attempt {attempt + 1} failed. Retrying in {backoff}s\")\n            time.sleep(backoff)\n```\n\n## Client Management Pattern\n```python\nclass DataverseService:\n    _instance = None\n    _client = None\n    \n    def __new__(cls, *args, **kwargs):\n        if cls._instance is None:\n            cls._instance = super().__new__(cls)\n        return cls._instance\n    \n    def __init__(self, org_url, credential):\n        if self._client is None:\n            self._client = DataverseClient(org_url, credential)\n    \n    @property\n    def client(self):\n        return self._client\n```\n\n## Logging Pattern\n```python\nimport logging\n\nlogging.basicConfig(\n    level=logging.INFO,\n    format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'\n)\nlogger = logging.getLogger(__name__)\n\nlogger.info(f\"Created {count} records\")\nlogger.warning(f\"Record {id} not found\")\nlogger.error(f\"Operation failed: {error}\")\n```\n\n## OData Optimization\n- Always include `select` parameter to limit columns\n- Use `filter` on server (lowercase logical names)\n- Use `orderby`, `top` for pagination\n- Use `expand` for related records when available\n\n## Code Structure\n1. Imports (stdlib, then third-party, then local)\n2. Constants and enums\n3. Logging configuration\n4. Helper functions\n5. Main service classes\n6. Error handling classes\n7. Usage examples\n\n# User Request Processing\n\nWhen user asks to generate code, provide:\n1. **Imports section** with all required modules\n2. **Configuration section** with constants/enums\n3. **Main implementation** with proper error handling\n4. **Docstrings** explaining parameters and return values\n5. **Type hints** for all functions\n6. **Usage example** showing how to call the code\n7. **Error scenarios** with exception handling\n8. **Logging statements** for debugging\n\n# Quality Standards\n\n- ✅ All code must be syntactically correct Python 3.10+\n- ✅ Must include try-except blocks for API calls\n- ✅ Must use type hints for function parameters and return types\n- ✅ Must include docstrings for all functions\n- ✅ Must implement retry logic for transient failures\n- ✅ Must use logger instead of print() for messages\n- ✅ Must include configuration management (secrets, URLs)\n- ✅ Must follow PEP 8 style guidelines\n- ✅ Must include usage examples in comments","tags":["dataverse","python","production","code","awesome","copilot","github","agent-skills","agents","custom-agents","github-copilot","hacktoberfest"],"capabilities":["skill","source-github","skill-dataverse-python-production-code","topic-agent-skills","topic-agents","topic-awesome","topic-custom-agents","topic-github-copilot","topic-hacktoberfest","topic-prompt-engineering"],"categories":["awesome-copilot"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/github/awesome-copilot/dataverse-python-production-code","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add github/awesome-copilot","source_repo":"https://github.com/github/awesome-copilot","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 33270 github stars · SKILL.md body (3,476 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T18:52:09.640Z","embedding":null,"createdAt":"2026-04-18T20:25:37.807Z","updatedAt":"2026-05-18T18:52:09.640Z","lastSeenAt":"2026-05-18T18:52:09.640Z","tsv":"'1':146,163,283,323 '2':157,292,330 '3':123,296,335 '3.10':384 '4':299,342 '429/timeout':65 '5':302,349 '6':306,355 '7':310,364 '8':370,434 'alway':255 'api':392 'appli':67 'arg':184 'asctim':226 'ask':318 'attempt':129,143,153,158,161,162 'audit':80 'avail':280 'backoff':63,156,167,170 'best':20,91 'block':390 'call':361,393 'class':175,305,309 'client':36,53,171,179,213 'cls':183,193 'cls._instance':187,190,195 'code':5,11,42,96,136,281,321,363,378 'column':76,261 'comment':442 'configur':298,331,427 'connect':56 'constant':293 'constants/enums':334 'correct':382 'count':240 'creat':239 'credenti':201,210 'datavers':2,13,35 'dataverse-python-production-cod':1 'dataversecli':207 'dataverseerror':49,106 'dataverseservic':176 'debug':83,374 'def':117,181,196,212 'develop':29 'docstr':88,343,406 'e':141,154 'enum':295 'error':16,46,66,99,252,307,340,365 'exampl':95,312,357,440 'except':138,368,389 'expand':275 'expert':27 'explain':344 'exponenti':62 'f':148,160,238,243,249 'fail':149,164,251 'failur':416 'filter':70,263 'follow':89,432 'format':225 'found':247 'function':124,301,354,399,409 'generat':6,38,97,320 'guidelin':436 'handl':17,47,100,308,341,369 'helper':300 'hierarchi':50 'hint':86,351,397 'httperror':109,139 'id':245 'implement':44,77,337,411 'import':105,110,112,220,284,324 'includ':58,84,256,386,405,426,438 'init':197 'instanc':177 'instead':420 'instruct':23 'kwarg':185 'level':223 'levelnam':230 'limit':260 'local':291 'log':78,111,217,221,297,371 'logger':114,234,419 'logger.error':147,248 'logger.info':237 'logger.warning':159,242 'logging.basicconfig':222 'logging.getlogger':115,235 'logging.info':224 'logic':60,127,267,413 'lowercas':266 'main':303,336 'manag':57,172,428 'max':121,132,144,151 'messag':232,424 'metadataerror':108 'microsoft':90 'modul':329 'must':379,385,394,404,410,417,425,431,437 'name':116,228,236,268 'need':75 'new':182,192 'none':178,180,189,205 'odata':68,253 'offici':94 'oper':118,135,250 'optim':18,69,254 'orderbi':270 'org':199,208 'pagin':273 'paramet':258,345,400 'parti':289 'pass':137 'pattern':54,173,218 'pep':433 'powerplatform':34 'powerplatform-dataverse-cli':33 'powerplatform.dataverse.core.errors':104 'practic':21,92 'print':422 'process':315 'product':4,8,40 'production-readi':7,39 'proper':45,339 'properti':211 'provid':322 'python':3,10,28,102,174,219,383 'qualiti':375 'rais':155 'rang':131 'readi':9,41 'record':241,244,278 'relat':277 'request':314 'requir':328 'retri':59,120,122,126,133,145,152,165,412 'return':194,215,347,402 'rule':98 'scenario':366 'sdk':14,37 'secret':429 'section':325,332 'select':73,257 'self':198,214 'self._client':203,206,216 'server':72,265 'servic':304 'show':358 'singleton':52 'skill' 'skill-dataverse-python-production-code' 'source-github' 'special':30 'standard':376 'statement':372 'stdlib':285 'structur':101,282 'style':435 'super':191 'syntact':381 'system':22 'third':288 'third-parti':287 'time':113 'time.sleep':169 'top':271 'topic-agent-skills' 'topic-agents' 'topic-awesome' 'topic-custom-agents' 'topic-github-copilot' 'topic-hacktoberfest' 'topic-prompt-engineering' 'trail':81 'transient':415 'tri':134,388 'try-except':387 'type':85,350,396,403 'url':200,209,430 'usag':311,356,439 'use':12,51,262,269,274,395,418 'user':313,317 'validationerror':107 'valu':348","prices":[{"id":"706f085a-1d12-4bde-bd4e-e7529eb64a3a","listingId":"5b03b9cc-3a70-4910-aba6-bf353892f363","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"github","category":"awesome-copilot","install_from":"skills.sh"},"createdAt":"2026-04-18T20:25:37.807Z"}],"sources":[{"listingId":"5b03b9cc-3a70-4910-aba6-bf353892f363","source":"github","sourceId":"github/awesome-copilot/dataverse-python-production-code","sourceUrl":"https://github.com/github/awesome-copilot/tree/main/skills/dataverse-python-production-code","isPrimary":false,"firstSeenAt":"2026-04-18T21:49:05.558Z","lastSeenAt":"2026-05-18T18:52:09.640Z"},{"listingId":"5b03b9cc-3a70-4910-aba6-bf353892f363","source":"skills_sh","sourceId":"github/awesome-copilot/dataverse-python-production-code","sourceUrl":"https://skills.sh/github/awesome-copilot/dataverse-python-production-code","isPrimary":true,"firstSeenAt":"2026-04-18T20:25:37.807Z","lastSeenAt":"2026-05-07T22:40:17.597Z"}],"details":{"listingId":"5b03b9cc-3a70-4910-aba6-bf353892f363","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"github","slug":"dataverse-python-production-code","github":{"repo":"github/awesome-copilot","stars":33270,"topics":["agent-skills","agents","ai","awesome","custom-agents","github-copilot","hacktoberfest","prompt-engineering"],"license":"mit","html_url":"https://github.com/github/awesome-copilot","pushed_at":"2026-05-18T01:26:59Z","description":"Community-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot.","skill_md_sha":"932c459f2fb1be9075cb27f61de27413f8481be7","skill_md_path":"skills/dataverse-python-production-code/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/github/awesome-copilot/tree/main/skills/dataverse-python-production-code"},"layout":"multi","source":"github","category":"awesome-copilot","frontmatter":{"name":"dataverse-python-production-code","description":"Generate production-ready Python code using Dataverse SDK with error handling, optimization, and best practices"},"skills_sh_url":"https://skills.sh/github/awesome-copilot/dataverse-python-production-code"},"updatedAt":"2026-05-18T18:52:09.640Z"}}