Skip to content

Commit bec919c

Browse files
zhaodongwang-msftMax Wang
andauthored
add new dev Claude Skill with some best practices (#95)
* add new dev skill * update README --------- Co-authored-by: Max Wang <zhaodongwang@microsoft.com>
1 parent 8e171f1 commit bec919c

8 files changed

Lines changed: 228 additions & 111 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: dataverse-sdk-dev
3+
description: Development guidance for contributing to the PowerPlatform Dataverse Client Python SDK repository. Use when working on SDK development tasks like adding features, fixing bugs, or writing tests.
4+
---
5+
6+
# Dataverse SDK Development Guide
7+
8+
## Overview
9+
10+
This skill provides guidance for developers working on the PowerPlatform Dataverse Client Python SDK repository itself (not using the SDK).
11+
12+
## Best Practices
13+
14+
### API Design
15+
16+
1. **All public methods in client.py** - Public API methods must be in client.py
17+
2. **Every public method needs README example** - Public API methods must have examples in README.md
18+
3. **Reuse existing APIs** - Always check if an existing method can be used before making direct Web API calls
19+
4. **Update documentation** when adding features - Keep README and SKILL files (both copies) in sync
20+
5. **Consider backwards compatibility** - Avoid breaking changes
21+
22+
### Code Style
23+
24+
6. **No emojis** - Do not use emoji in code, comments, or output
25+
7. **Standardize output format** - Use `[INFO]`, `[WARN]`, `[ERR]`, `[OK]` prefixes for console output
26+
8. **No noqa comments** - Do not add `# noqa: BLE001` or similar linter suppression comments
27+
9. **Document public APIs** - Add Sphinx-style docstrings with examples for public methods
28+
10. **Define __all__ in module files, not __init__.py** - Use `__all__` to control exports in the actual module file (e.g., errors.py), not in `__init__.py`.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: powerplatform-dataverseclient-python
2+
name: dataverse-sdk-use
33
description: Guidance for using the PowerPlatform Dataverse Client Python SDK. Use when calling the SDK like creating CRUD operations, SQL queries, table metadata management, and upload files.
44
---
55

README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,11 @@ pip install PowerPlatform-Dataverse-Client
6363
pip install PowerPlatform-Dataverse-Client && dataverse-install-claude-skill
6464
```
6565

66-
This installs a Claude Skill that enables Claude Code to:
67-
- Apply SDK best practices automatically
68-
- Provide context-aware code suggestions
69-
- Help with error handling and troubleshooting
70-
- Guide you through common patterns
66+
This installs two Claude Skills that enable Claude Code to:
67+
- **dataverse-sdk-use**: Apply SDK best practices for using the SDK in your applications
68+
- **dataverse-sdk-dev**: Provide guidance for developing/contributing to the SDK itself
7169

72-
The skill works with both the Claude Code CLI and VSCode extension. Once installed, Claude will automatically use it when working with Dataverse operations. For more information on Claude Skill see https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview. See skill definition here: `.claude/skills/dataverse-sdk/SKILL.md`.
70+
The skills work with both the Claude Code CLI and VSCode extension. Once installed, Claude will automatically use the appropriate skill when working with Dataverse operations. For more information on Claude Skill see https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview. See skill definitions here: [.claude/skills/dataverse-sdk-use/SKILL.md](.claude/skills/dataverse-sdk-use/SKILL.md) and [.claude/skills/dataverse-sdk-dev/SKILL.md](.claude/skills/dataverse-sdk-dev/SKILL.md).
7371

7472
For development from source (Claude Skill auto loaded):
7573

@@ -365,6 +363,15 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
365363
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
366364
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
367365

366+
### API Design Guidelines
367+
368+
When contributing new features to this SDK, please follow these guidelines:
369+
370+
1. **All public methods in client.py** - Public API methods must be defined in [client.py](src/PowerPlatform/Dataverse/client.py)
371+
2. **Add README example for public methods** - Add usage examples to this README for public API methods
372+
3. **Document public APIs** - Include Sphinx-style docstrings with parameter descriptions and examples for all public methods
373+
4. **Update documentation** when adding features - Keep README and SKILL files (note that each skill has 2 copies) in sync
374+
368375
## Trademarks
369376

370377
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/legal/intellectualproperty/trademarks/usage/general). Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ namespaces = false
6161

6262
[tool.setuptools.package-data]
6363
"*" = ["py.typed"]
64-
"PowerPlatform.Dataverse.claude_skill" = ["SKILL.md"]
64+
"PowerPlatform.Dataverse.claude_skill" = ["*/SKILL.md"]
6565

6666
# Microsoft Python Standards - Linting & Formatting
6767
[tool.black]

0 commit comments

Comments
 (0)