/vibe:ghcopilot-instr-power-apps-code-appsfrom vibe
Guides development of Power Apps Code Apps using TypeScript, React, and Power Platform SDK. Covers project structure, PAC CLI, TypeScript config, and connector integration.
Ships in vibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Instructions for generating high-quality Power Apps Code Apps using TypeScript, React, and Power Platform SDK, following Microsoft's official best practices and preview capabilities.
src/
├── components/ # Reusable UI components
├── hooks/ # Custom React hooks for Power Platform
├── generated/
│ ├── services/ # Generated connector services (PAC CLI)
│ └── models/ # Generated TypeScript models (PAC CLI)
├── utils/ # Utility functions and helpers
├── types/ # TypeScript type definitions
├── PowerProvider.tsx # Power Platform context wrapper
└── main.tsx # Application entry point
generated/services/, generated/models/) separate from custom codeverbatimModuleSyntax: false in tsconfig.json for Power Apps SDK compatibility{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
"verbatimModuleSyntax": false,
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
}
}
"@": path.resolve(__dirname, "./src") for cleaner imports// Example: Using custom PCF control for data visualization
import { PCFControlWrapper } from './components/PCFControlWrapper';
const MyComponent = () => {
return (
<PCFControlWrapper
controlName="CustomChartControl"
dataset={chartData}
configuration={chartConfig}
/>
);
};
import { PowerBIEmbed } from 'powerbi-client-react';
const DashboardComponent = () => {
return (
<PowerBIEmbed
embedConfig={{
type: 'report',
id: reportId,
embedUrl: embedUrl,
accessToken: accessToken,
tokenType: models.TokenType.Aad,
settings: {
panes: { filters: { expanded: false, visible: false } }
}
}}
/>
);
};
// Example: Document processing with AI Builder
const processDocument = async (file: File) => {
const formData = new FormData();
formData.append('file', file);
const result = await AIBuilderService.ProcessDocument({
modelId: 'document-processing-model-id',
document: formData
});
return result.extractedFields;
};
import { DirectLine } from 'botframework-directlinejs';
import { WebChat } from 'botframework-webchat';
const ChatbotComponent = () => {
const directLine = new DirectLine({
token: chatbotToken
});
return (
<div style={{ height: '400px', width: '100%' }}>
<WebChat directLine={directLine} />
</div>
);
};
import type { ReactNode } from "react";
export default function PowerProvider({ children }: { children: ReactNode }) {
return <>{children}</>;
}
@microsoft/power-apps for Power Platform SDK@fluentui/react-components for UI componentsconcurrently for parallel script execution (dev dependency)// Example: User-to-Role many-to-many relationship
const userRoles = await UserRoleService.getall();
const filteredRoles = userRoles.filter(ur => ur.userId === currentUser.id);
// Handle polymorphic customer lookup (Account or Contact)
const customerType = record.customerType; // 'account' or 'contact'
const customerId = record.customerId;
const customer = customerType === 'account'
? await AccountService.get(customerId)
: await ContactService.get(customerId);
// Example: Service worker registration
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/sw.js')
.then(registration => console.log('SW registered:', registration))
.catch(error => console.log('SW registration failed:', error));
});
}
// Example: IndexedDB wrapper for offline storage
class OfflineDataStore {
async saveData(key: string, data: any) {
const db = await this.openDB();
const transaction = db.transaction(['data'], 'readwrite');
transaction.objectStore('data').put({ id: key, data, timestamp: Date.now() });
}
async loadData(key: string) {
const db = await this.openDB();
const transaction = db.transaction(['data'], 'readonly');
return transaction.objectStore('data').get(key);
}
}
"dev": "concurrently \"vite\" \"pac code run\"""build": "tsc -b && vite build"npm run build followed by pac code push for deployment// Example: environment-specific config files
// config/development.json
{
"powerPlatform": {
"environmentUrl": "https://dev-env.crm.dynamics.com",
"apiVersion": "9.2"
},
"features": {
"enableDebugMode": true,
"enableAnalytics": false
}
}
# Example Azure DevOps pipeline step
- task: PowerPlatformToolInstaller@2
- task: PowerPlatformSetConnectionVariables@2
inputs:
authenticationType: 'PowerPlatformSPN'
applicationId: '$(AppId)'
clientSecret: '$(ClientSecret)'
tenantId: '$(TenantId)'
- task: PowerPlatformPublishCustomizations@2
// Example: Design system button component
interface ButtonProps {
variant: 'primary' | 'secondary' | 'danger';
size: 'small' | 'medium' | 'large';
disabled?: boolean;
onClick: () => void;
children: React.ReactNode;
}
export const Button: React.FC<ButtonProps> = ({
variant, size, disabled, onClick, children
}) => {
const classes = `btn btn-${variant} btn-${size} ${disabled ? 'btn-disabled' : ''}`;
return <button className={classes} onClick={onClick} disabled={disabled}>{children}</button>;
};
// Example: Theme context and provider
const ThemeContext = createContext({
theme: 'light',
toggleTheme: () => {}
});
export const ThemeProvider: React.FC<{children: ReactNode}> = ({ children }) => {
const [theme, setTheme] = useState<'light' | 'dark'>('light');
const toggleTheme = () => {
setTheme(prev => prev === 'light' ? 'dark' : 'light');
};
return (
<ThemeContext.Provider value={{ theme, toggleTheme }}>
<div className={`theme-${theme}`}>{children}</div>
</ThemeContext.Provider>
);
};
/* Example: Container query for responsive components */
.card-container {
container-type: inline-size;
}
@container (min-width: 400px) {
.card {
display: grid;
grid-template-columns: 1fr 1fr;
}
}
import { motion, AnimatePresence } from 'framer-motion';
const AnimatedCard = () => {
return (
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: -20 }}
transition={{ duration: 0.3 }}
whileHover={{ scale: 1.02 }}
className="card"
>
Card content
</motion.div>
);
};
// Example: Accessible modal component
const Modal: React.FC<{isOpen: boolean, onClose: () => void, children: ReactNode}> = ({
isOpen, onClose, children
}) => {
useEffect(() => {
if (isOpen) {
document.body.style.overflow = 'hidden';
const focusableElement = document.querySelector('[data-autofocus]') as HTMLElement;
focusableElement?.focus();
}
return () => { document.body.style.overflow = 'unset'; };
}, [isOpen]);
return (
<div
role="dialog"
aria-modal="true"
aria-labelledby="modal-title"
className={isOpen ? 'modal-open' : 'modal-hidden'}
>
{children}
</div>
);
};
import { FormattedMessage, useIntl } from 'react-intl';
const WelcomeMessage = ({ userName }: { userName: string }) => {
const intl = useIntl();
return (
<h1>
<FormattedMessage
id="welcome.title"
defaultMessage="Welcome, {userName}!"
values={{ userName }}
/>
</h1>
);
};
netstat -ano | findstr :3000 then taskkill /PID {PID} /Fpac auth listnpm cache clean --force and reinstallnpm audit and check build configurationpac auth clear then pac auth createnpm run build --report and implement cachingpac env listFollow Microsoft's official documentation and best practices
Use TypeScript for type safety and better developer experience
Implement proper error handling and user feedback
Optimize for performance and user experience
Follow security best practices and Power Platform policies
Write maintainable, testable, and well-documented code
Use generated services and models from PAC CLI
Plan for future feature updates and migrations
Implement comprehensive testing strategies
Follow proper DevOps and deployment practices
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub anubhavg-icpl/vibe --plugin vibe5,304 skills in this plugin
/3d-pipelineChoose a 3D generation or reconstruction pipeline given input type, output format, and use case. Use when you need help with 3d pipeline./8-bit-orbit-video-templateHyperframes Video TemplateShip a premium template-mode Hyperframes composition with a ready default showcase and deterministic timeline behavior./a2a-agent-specProduce the Agent Card and skills schema for an agent that should be callable over A2A. Use when you need help with a2a agent spec.Other plugins' skills for the same job