- Repository Overview
- Editing Markdown Files
- Repository Structure
- Key File Types
- Working with Power Fx Code
- Documentation Standards
- AI Session Documentation
- Related Resources
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
📁 Workspace Context: This repo is part of a multi-repo VS Code workspace. See
../CLAUDE.mdfor workspace-level guidance.
This is a Power Fx snippets repository containing reusable code patterns, formulas, and components for Microsoft Power Platform development. The repository serves as a comprehensive collection of Power Apps development resources.
This repository is part of a two-repo system:
-
PowerFxSnippets/ (THIS REPO - Public)
- Published to: GitHub as public repository
- Contains: Generic, shareable Power Fx patterns and components
- Use for: Community-facing snippets, general best practices, reusable code
- No client-specific or proprietary content
-
PowerFxSnippets-Private/ (Sibling Repo - Private)
- Location:
../PowerFxSnippets-Private/ - Contains: Client-specific implementations, proprietary patterns, internal tools
- Use for: NDA-protected work, client projects, private configurations
- Has
.specify/folder with spec-kit for project specifications
- Location:
When working across both repos:
- Generic/reusable patterns → Public repo (PowerFxSnippets)
- Client-specific implementations → Private repo (PowerFxSnippets-Private)
- Check both repos when searching for existing patterns
- Reference public snippets from private implementations where possible
When adding or updating any .md file in this repository:
- Update the History section at the bottom of the file (create one if it doesn't exist)
- Use this format:
## History | Date | Author | Changes | |------------|-------------|----------------------------------| | YYYY-MM-DD | Author Name | Brief description of changes |
- Add new entries at the top of the table (most recent first)
PowerFxSnippets/
├── app-lifecycle/ # App initialization, lifecycle, formulas, error handling
├── ui-controls/ # Control-specific snippets (gallery, buttons, inputs)
├── ui-patterns/ # Reusable UI patterns (theming, dialogs, components)
├── visual-assets/ # SVGs, icons, colors, fonts, emojis, unicode
├── data-operations/ # Data sources, samples, JSON, geocoding
├── functions/ # UDFs, algorithms, string manipulation, encoding
├── integrations/ # Connectors, Office 365, Power Automate
├── learning/ # Tutorials, certification, best practices
├── utilities/ # Validation tools, templates, scripts, project docs
└── .github/ # Actions workflows, issue/PR templates
.mdfiles: Documentation and code snippets in markdown format.yamlfiles: Power Fx formula definitions and configurations.msappfiles: Power Apps application packages.csvfiles: Sample data sets.svgfiles: Scalable vector graphics for UI elements.jsonfiles: Configuration and schema definitions
Before giving advice OR writing ANY Power Fx code (especially date formatting, function behavior, etc.):
- ALWAYS read
learning/reference/power-fx-gotchas.mdFIRST - Power Fx is NOT the same as .NET, Excel, or JavaScript — don't assume!
- This applies to: code snippets, examples, fixes, refactors — ALL Power Fx output
When uncertain about ANY Power Fx syntax or function behavior:
- Check local gotchas first: Read
learning/reference/power-fx-gotchas.md - Verify with official docs: Use
ref_search_documentationwith query like"Power Fx [function name]" - Read the result: Use
ref_read_urlon the returned URL - Official docs base: https://learn.microsoft.com/en-us/power-platform/power-fx/overview
Never guess confidently about Power Fx syntax — verify first!
- Power Fx formulas are typically stored in
.yamlfiles or documented in.mdfiles - Named formulas use the prefix
fx(e.g.,fxMenuItems.yaml) - User-defined types and schemas follow specific syntax patterns documented in the repository
- Adding New Snippets: Create markdown files in the appropriate category folder with clear examples
- Documenting Components: Include both the Power Fx code and usage instructions
- Sample Data: Place CSV files in
data-operations/samples/with descriptive names - SVG Resources: Store in
visual-assets/svgs/organized by provider (Azure, Fabric, Power BI) - Error Handling: Place patterns in
app-lifecycle/error-handling/ - Tools/Scripts: Place in
utilities/tools/(Python) orutilities/tools/node/(Node.js)
- Use clear, descriptive file names
- Include code examples with proper Power Fx syntax highlighting
- Document any dependencies or prerequisites
- Add images/screenshots where helpful for visual components
Document AI-assisted work sessions in ai-chats/ using the format:
YYYY-MM-DD-XX-description.md
- Power Fx GitHub: https://github.com/microsoft/Power-Fx
- PowerApps Tooling: https://github.com/microsoft/PowerApps-Tooling
- Community Materials: https://tinyurl.com/DarrensStuffPower
| Date | Author | Changes |
|---|---|---|
| 2026-02-18 | Cleanup | Remove Reference/ and docs/ from structure; update all paths |
| 2026-02-17 | Cleanup | Updated directory structure and paths to match v2.0 layout |
| 2026-01-08 | Claude | Added workspace context reference to parent CLAUDE.md |