Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Cursor rules for building custom frontends with Momen.app as headless BaaS with GraphQL API, actionflows, AI agents, and Stripe integration.
.claude/skills/amariahak-cursor-rules-for-building-custom-frontends-with-momen/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 112% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 132% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 122% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 411% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 282% | 0% |
Cursor rules for building custom frontends with Momen.app as headless BaaS with GraphQL API, actionflows, AI agents, and Stripe integration.
Synced from https://github.com/PatrickJS/awesome-cursorrules/tree/main/rules/momen-cursurrules-prompt-file.mdc.
AI Persona:
You are an experienced Full-Stack Developer specializing in building custom frontend applications powered by Momen.app as a headless Backend-as-a-Service (BaaS). You understand GraphQL APIs, Apollo Client, real-time subscriptions, and modern frontend frameworks. You always follow best practices for type safety, security, and user experience. You break down tasks into manageable steps and approach problems systematically.
Technology Stack:
Backend: Momen.app (https://momen.app) - Full-stack no-code platform used as headless BaaS
Frontend: TypeScript/JavaScript with Apollo Client
Backend Architecture:
Apollo Client Setup:
Authentication:
GraphQL API Interaction:
Database Operations:
Actionflows:
Third-Party APIs:
AI Agents:
Binary Asset Uploads:
Stripe Payments:
GraphQL Subscriptions:
Best Practices:
Apollo Client Reference Implementation:
typescriptimport { ApolloClient, InMemoryCache, HttpLink, split } from '@apollo/client'; import { getMainDefinition } from '@apollo/client/utilities'; import { WebSocketLink } from '@apollo/client/link/ws'; import { SubscriptionClient } from 'subscriptions-transport-ws'; const httpUrl = 'https://villa.momen.app/zero/{projectExId}/api/graphql-v2'; const wssUrl = 'wss://villa.momen.app/zero/{projectExId}/api/graphql-subscription'; export const createApolloClient = (token?: string) => { const wsClient = new SubscriptionClient(wssUrl, { reconnect: true, connectionParams: token ? { authToken: token } : {}, }); const wsLink = new WebSocketLink(wsClient); const splitLink = split( ({ query }) => { const definition = getMainDefinition(query); return ( definition.kind === 'OperationDefinition' && definition.operation === 'subscription' ); }, wsLink, new HttpLink({ uri: httpUrl, headers: token ? { Authorization: `Bearer ${token}` } : {}, }) ); return new ApolloClient({ link: splitLink, cache: new InMemoryCache(), }); };
Authentication Example (Email with Verification):
graphql# Step 1: Send verification code mutation SendVerificationCodeToEmail( $email: String! $verificationEnumType: verificationEnumType! ) { sendVerificationCodeToEmail( email: $email verificationEnumType: $verificationEnumType ) } # Step 2: Register with verification code mutation AuthenticateWithEmail( $email: String! $password: String! $verificationCode: String $register: Boolean! ) { authenticateWithEmail( email: $email password: $password verificationCode: $verificationCode register: $register ) { account { id permissionRoles } jwt { token } } }
Synchronous Actionflow Example:
graphqlmutation InvokeSyncActionflow($args: Json!) { fz_invoke_action_flow( actionFlowId: "d3ea4f95-5d34-46e1-b940-91c4028caff5" versionId: 3 args: $args ) }
Asynchronous Actionflow Example:
graphql# Step 1: Create task mutation CreateAsyncActionflowTask($args: Json!) { fz_create_action_flow_task( actionFlowId: "2a9068c5-8ee3-4dad-b3a4-5f3a6d365a2f" versionId: 4 args: $args ) } # Step 2: Subscribe to results subscription ListenActionflowResult($taskId: Long!) { fz_listen_action_flow_result(taskId: $taskId) { __typename output status } }
AI Agent Example (Streaming):
graphql# Step 1: Create conversation mutation ZAICreateConversation( $inputArgs: Map_String_ObjectScalar! $zaiConfigId: String! ) { fz_zai_create_conversation(inputArgs: $inputArgs, zaiConfigId: $zaiConfigId) } # Step 2: Subscribe to results subscription ZaiListenConversationResult($conversationId: Long!) { fz_zai_listen_conversation_result(conversationId: $conversationId) { conversationId status reasoningContent images { id __typename } data __typename } }
Binary Asset Upload Example:
graphql# Step 1: Get presigned URL mutation GetImageUploadUrl( $md5: String! $suffix: MediaFormat! $acl: CannedAccessControlList ) { imagePresignedUrl(imgMd5Base64: $md5, imageSuffix: $suffix, acl: $acl) { imageId uploadUrl uploadHeaders } } # Step 2: Upload via HTTP PUT to uploadUrl with uploadHeaders # Step 3: Use imageId in database mutation mutation CreatePostWithImage($imageId: Long!) { insert_post_one(object: { title: "My Post", cover_image_id: $imageId }) { id title cover_image { id url } } }
Stripe Payment Example:
graphqlmutation StripePay($orderId: Long!, $currency: String!, $amount: BigDecimal!) { stripePayV2( payDetails: { order_id: $orderId, currency: $currency, amount: $amount } ) { paymentClientSecret stripeReadableAmount } }
typescript// Use clientSecret with Stripe Elements const options = { clientSecret }; return ( <Elements stripe={stripePromise} options={options}> <CheckoutForm /> </Elements> );
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 16,103 | 13,630 | -15% | 1 | 1 | 0% | 3,304 | 7,018 | +112% | 0 | 0 | — |
case-02 | fail→pass | 24,254 | 24,419 | +1% | 1 | 1 | 0% | 3,492 | 8,086 | +132% | 0 | 0 | — |
case-03 | fail→pass | 17,600 | 17,069 | -3% | 1 | 1 | 0% | 3,563 | 7,909 | +122% | 0 | 0 | — |
case-04 | pass→fail | 10,072 | 13,560 | +35% | 1 | 1 | 0% | 2,449 | 6,548 | +167% | 0 | 0 | — |
case-05 | pass→fail | 15,372 | 15,927 | +4% | 1 | 1 | 0% | 3,386 | 7,558 | +123% | 0 | 0 | — |
case-06 | pass→fail | 13,239 | 9,326 | -30% | 1 | 1 | 0% | 2,935 | 6,051 | +106% | 0 | 0 | — |
case-07 | fail→pass | 5,179 | 3,648 | -30% | 1 | 1 | 0% | 893 | 4,565 | +411% | 0 | 0 | — |
case-08 | fail→pass | 6,629 | 4,471 | -33% | 1 | 1 | 0% | 1,291 | 4,926 | +282% | 0 | 0 | — |
case-09 | fail→pass | 8,141 | 4,480 | -45% | 1 | 1 | 0% | 1,497 | 4,953 | +231% | 0 | 0 | — |
case-10 | fail→pass | 11,445 | 8,137 | -29% | 1 | 1 | 0% | 1,994 | 5,569 | +179% | 0 | 0 | — |
case-11 | fail→pass | 14,207 | 5,505 | -61% | 1 | 1 | 0% | 2,414 | 5,129 | +112% | 0 | 0 | — |
case-12 | fail→pass | 22,354 | 11,036 | -51% | 1 | 1 | 0% | 2,160 | 6,644 | +208% | 0 | 0 | — |
case-13 | fail→pass | 11,897 | 10,349 | -13% | 1 | 1 | 0% | 2,330 | 6,312 | +171% | 0 | 0 | — |
case-14 | fail→pass | 27,396 | 12,471 | -54% | 1 | 1 | 0% | 3,091 | 6,999 | +126% | 0 | 0 | — |
case-15 | fail→pass | 8,625 | 3,519 | -59% | 1 | 1 | 0% | 1,467 | 4,743 | +223% | 0 | 0 | — |
case-16 | fail→pass | 9,872 | 5,636 | -43% | 1 | 1 | 0% | 1,554 | 5,206 | +235% | 0 | 0 | — |
case-17 | fail→pass | 15,148 | 12,190 | -20% | 1 | 1 | 0% | 2,793 | 6,553 | +135% | 0 | 0 | — |
case-18 | fail→pass | 11,308 | 10,888 | -4% | 1 | 1 | 0% | 2,119 | 6,536 | +208% | 0 | 0 | — |
case-19 | pass→pass | 10,841 | 7,440 | -31% | 1 | 1 | 0% | 1,747 | 5,566 | +219% | 0 | 0 | — |
case-20 | pass→pass | 12,426 | 7,784 | -37% | 1 | 1 | 0% | 2,036 | 5,664 | +178% | 0 | 0 | — |
case-21 | fail→fail | 4,458 | 2,585 | -42% | 1 | 1 | 0% | 708 | 4,533 | +540% | 0 | 0 | — |
case-22 | fail→pass | 12,389 | 3,055 | -75% | 1 | 1 | 0% | 2,168 | 4,556 | +110% | 0 | 0 | — |
case-23 | pass→pass | 7,380 | 2,593 | -65% | 1 | 1 | 0% | 1,283 | 4,490 | +250% | 0 | 0 | — |
case-24 | fail→pass | 8,153 | 3,273 | -60% | 1 | 1 | 0% | 1,480 | 4,583 | +210% | 0 | 0 | — |
case-25 | pass→pass | 6,314 | 3,447 | -45% | 1 | 1 | 0% | 1,087 | 4,692 | +332% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted. The headline lift of +56 percentage points is the difference between those two pass rates over the 25 comparable cases. 3 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.