power-platform-claude-skills
CLAUDE.md2 starsChanged 8 months agoMITView on GitHub
You have 1 domain skill: When developing and testing Dataverse plugins:
In this repositoryOne other file it gives its agents.
The file
We split this CLAUDE.md into the rules it gives an agent
9 rules. About 0 are common, 9 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Always use FakeXrmEasy framework for unit testing Dataverse plugins.
- Distinctive: line 16
Test both positive and negative scenarios for each plugin.
- Distinctive: line 17
When registering plugins on Update events, ALWAYS define filtering attributes to avoid triggering on autosave.
- Distinctive: line 19
Use proper assertion patterns to validate plugin behavior.
- Distinctive: line 20
Verify expected exceptions are thrown for invalid inputs.
- Distinctive: line 21
Test pipeline execution order when multiple plugins are registered.
- Distinctive: line 22
Always include test cases for security context and privilege validation.
- Distinctive: line 41
When developing and testing Dataverse plugins:
- Distinctive: line 53
Use Visual Studio or VS Code with C# Dev Kit for plugin development
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Project Instructions
Available Skills (load automatically)
You have 1 domain skill:
| Skill | When to Use |
dataverse-plugins-unit-testing | Unit testing Dataverse plugins with FakeXrmEasy framework — covers test setup, in-memory context, pipeline simulation, entity images, mocking, and assertion patterns. |
Rules for Plugin Unit Testing
- Always use FakeXrmEasy framework for unit testing Dataverse plugins.
- Set up in-memory XrmFakedContext to simulate Dataverse environment.
- Properly configure pipeline simulation with images (PreImage/PostImage) where needed.
- Test both positive and negative scenarios for each plugin.
- When registering plugins on Update events, ALWAYS define filtering attributes to avoid triggering on autosave.
- Mock external dependencies (web service calls, custom APIs) to keep tests isolated and fast.
- Use proper assertion patterns to validate plugin behavior.
- Verify expected exceptions are thrown for invalid inputs.
- Test pipeline execution order when multiple plugins are registered.
- Always include test cases for security context and privilege validation.
Best Practices for Plugin Unit Testing
- Test setup isolation — Each test should have its own isolated XrmFakedContext. Never share context between tests.
- Entity initialization — Always create test entities with required attributes populated. Missing primary name fields cause silent failures.
- Pipeline simulation — Configure proper MessageName, Stage, and PipelineStage in XrmFakedContext to match real plugin registration.
- Entity images — Add PreEntityImages and PostEntityImages to PluginExecutionContext when testing Update messages to simulate real scenarios.
- Mock external calls — Use interfaces and dependency injection to mock external web service calls, custom APIs, and third-party integrations.
- Assertion patterns — Verify entity attribute values, related record creation, and state transitions. Don't just assert no exceptions were thrown.
- Exception testing — Use
Assert.Throws<T>or try-catch patterns to verify plugins throw appropriate exceptions for invalid inputs. - Query testing — When plugins execute QueryExpression or FetchXml, populate XrmFakedContext with test data to validate query logic.
- Relationship testing — Test Many-to-Many associations and lookup field updates using FakeXrmEasy's relationship simulation.
- Security context — Test with different user privileges by configuring InitiatingUserId and UserId in PluginExecutionContext.
- Async patterns — For testing async plugins and Code Activities, configure proper async operation simulation.
- Never silently swallow errors — At minimum
console.errorin plugins, ideally throw InvalidPluginExecutionException with user-friendly messages.
Plugin Development Workflow
When developing and testing Dataverse plugins:
- Write unit tests first — Define expected behavior using FakeXrmEasy before implementing plugin logic (TDD approach).
- Run tests locally — Use Visual Studio Test Explorer or
dotnet testto run unit tests during development. - Add test coverage — Aim for 80%+ code coverage. Test all branches, error conditions, and edge cases.
- Register plugin — Use Plugin Registration Tool or
pac pluginCLI to deploy to Dataverse environment. - Integration test — Verify plugin behavior in real environment using Power Apps Monitor or Application Insights.
- Debug if needed — Use Plugin Profiler to capture execution context for failing scenarios, then create unit tests to reproduce.
Environment
- Platform: Windows
- Use Visual Studio or VS Code with C# Dev Kit for plugin development
- FakeXrmEasy framework for unit testing (NuGet package)
- Plugin Registration Tool or
pac pluginCLI for deployment
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

