ワンクリックで
bff-pattern-implementation
Guidance and best practices for bff pattern implementation (backend for frontend).
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Guidance and best practices for bff pattern implementation (backend for frontend).
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Accessibility testing for web applications using Playwright (@playwright/test) with TypeScript and axe-core. Use when asked to write, run, or debug automated accessibility checks, keyboard navigation tests, focus management, ARIA/semantic validations, screen reader compatibility, or WCAG 2.1 Level AA compliance testing. Covers axe-core integration, POUR principles (perceivable, operable, understandable, robust), color contrast, form labels, landmarks, and accessible names.
To ensure the application is usable by people with disabilities, complying with WCAG standards and improving SEO/UX. Use when: During development of UI components; Before major releases.
Accessibility testing toolkit using Selenium WebDriver 4+ with Java 21+ and axe-core engine. Use when asked to validate WCAG 2.1/2.2 compliance, scan pages or components for a11y violations, test keyboard navigation, audit color contrast, check ARIA semantics, generate accessibility reports, filter axe rules, debug screen reader issues, or implement POUR principles (perceivable, operable, understandable, robust).
To allow incompatible interfaces to work together by wrapping an object in an adapter that translates its interface into one that a client expects. Use when: When integrating a third-party library whose interface doesn't match your application's internal requirements; When you want to standardize multiple different implementations of a service (e.g., different payment gateways); When you need to provide a stable interface while the underlying dependency is subject to change.
To implement a scalable permission system where users have roles, and roles have granular permissions. Use when: B2B SaaS applications (Admin, Editor, Viewer); Systems with complex access requirements.
Browser automation CLI for AI agents. Use for website interaction, form automation, screenshots, scraping, and web app verification. Prefer snapshot refs (@e1, @e2) for deterministic actions.
| name | bff-pattern-implementation |
| description | Guidance and best practices for bff pattern implementation (backend for frontend). |
A BFF is a dedicated backend service for a specific frontend (e.g., Web BFF, Mobile BFF).
Different frontends have different data needs. A "one-size-fits-all" API might over-fetch for mobile or under-fetch for desktop.
Identify the unique data needs for each client (Web vs. Mobile).
The BFF calls multiple downstream services and merges the results.
// Web BFF - Express/TypeScript
router.get('/dashboard', async (req, res) => {
const [userProfile, recentOrders, notifications] = await Promise.all([
userService.getProfile(req.userId),
orderService.getRecent(req.userId),
notificationService.getUnread(req.userId)
]);
res.json({
user: { name: userProfile.name, avatar: userProfile.avatar },
orders: recentOrders.map(o => ({ id: o.id, total: o.price })),
alerts: notifications.length
});
});
Convert internal protocols (like gRPC) to client-friendly JSON/REST or GraphQL.
// Translating gRPC to JSON
async function getProduct(id: string) {
const grpcResponse = await productGrpcClient.getProduct({ id });
return {
id: grpcResponse.uuid,
name: grpcResponse.title,
price: grpcResponse.amount / 100 // Convert cents to dollars
};
}
Handle different auth flows (e.g., Session cookies for Web, JWT for Mobile).
// Mobile BFF - JWT Validation
app.use((req, res, next) => {
const token = req.headers.authorization;
if (!isValidMobileToken(token)) return res.status(401).send();
next();
});
Promise.all) to avoid "waterfall" latency.A middleware service that optimizes communication between specific frontend clients and the backend ecosystem, reducing payload sizes and simplifying frontend logic.