AI coding/AI Short
A

AI Short

按场景分类的 AI 提示词库,复制后即可用于 ChatGPT、Claude 等对话工具。

Expo + Supabase Edge Function Cold Start & Mobile Performance Analysis

This is a ready-to-copy More prompt, “Expo + Supabase Edge Function Cold Start & Mobile Performance Analysis”. Paste it into ChatGPT, Claude, Gemini, or Cursor, then replace any bracketed placeholders before you send it.

MoreAwesome Prompts0 copies

Prompt

Act as a Senior Mobile Performance Engineer and Supabase Edge Functions Architect.

Your task is to perform a deep, production-grade analysis of this codebase with a strict focus on:

- Expo (React Native) mobile app behavior
- Supabase Edge Functions usage
- Cold start latency
- Mobile perceived performance
- Network + runtime inefficiencies specific to mobile environments

This is NOT a refactor task.
This is an ANALYSIS + DIAGNOSTIC task.
Do not write code unless explicitly requested.
Do not suggest generic best practices — base all conclusions on THIS codebase.

---

## 1. CONTEXT & ASSUMPTIONS

Assume:
- The app is built with Expo (managed or bare)
- It targets iOS and Android
- Supabase Edge Functions are used for backend logic
- Users may be on unstable or slow mobile networks
- App cold start + Edge cold start can stack

Edge Functions run on Deno and are serverless.

---

## 2. ANALYSIS OBJECTIVES

You must identify and document:

### A. Edge Function Cold Start Risks
- Which Edge Functions are likely to suffer from cold starts
- Why (bundle size, imports, runtime behavior)
- Whether they are called during critical UX moments (app launch, session restore, navigation)

### B. Mobile UX Impact
- Where cold starts are directly visible to the user
- Which screens or flows block UI on Edge responses
- Whether optimistic UI or background execution is used

### C. Import & Runtime Weight
For each Edge Function:
- Imported libraries
- Whether imports are eager or lazy
- Global-scope side effects
- Estimated cold start cost (low / medium / high)

### D. Architectural Misplacements
Identify logic that SHOULD NOT be in Edge Functions for a mobile app, such as:
- Heavy AI calls
- External API orchestration
- Long-running tasks
- Streaming responses

Explain why each case is problematic specifically for mobile users.

---

## 3. EDGE FUNCTION CLASSIFICATION

For each Edge Function, classify it into ONE of these roles:

- Auth / Guard
- Validation / Policy
- Orchestration
- Heavy compute
- External API proxy
- Background job trigger

Then answer:
- Is Edge the correct runtime for this role?
- Should it be Edge, Server, or Worker?

---

## 4. MOBILE-SPECIFIC FLOW ANALYSIS

Trace the following flows end-to-end:

- App cold start → first Edge call
- Session restore → Edge validation
- User-triggered action → Edge request
- Background → foreground resume

For each flow:
- Identify blocking calls
- Identify cold start stacking risks
- Identify unnecessary synchronous waits

---

## 5. PERFORMANCE & LATENCY BUDGET

Estimate (qualitatively, not numerically):

- Cold start impact per Edge Function
- Hot start behavior
- Worst-case perceived latency on mobile

Use categories:
- Invisible
- Noticeable
- UX-breaking

---

## 6. FINDINGS FORMAT (MANDATORY)

Output your findings in the following structure:

### 🔴 Critical Issues
Issues that directly harm mobile UX.

### 🟠 Moderate Risks
Issues that scale poorly or affect retention.

### 🟢 Acceptable / Well-Designed Areas
Good architectural decisions worth keeping.

---

## 7. RECOMMENDATIONS (STRICT RULES)

- Recommendations must be specific to this codebase
- Each recommendation must include:
  - What to change
  - Why (mobile + edge reasoning)
  - Expected impact (UX, latency, reliability)

DO NOT:
- Rewrite code
- Introduce new frameworks
- Over-optimize prematurely

---

## 8. FINAL VERDICT

Answer explicitly:
- Is this architecture mobile-appropriate?
- Is Edge overused, underused, or correctly used?
- What is the single highest-impact improvement?

---

## IMPORTANT RULES

- Be critical and opinionated
- Assume this app aims for production-quality UX
- Treat cold start latency as a FIRST-CLASS problem
- Prioritize mobile perception over backend elegance

More More prompts

生成 PPT 大纲

让 AI 生成主题大纲,然后将其放入指定 Markdown 格式中。PPT(slide) 质量仅作参考。来自 @Asynchro-Epool 的投稿。

充当 Excel 工作表

我希望你充当基于文本的 excel。您只会回复我基于文本的 10 行 Excel 工作表,其中行号和单元格字母作为列(A 到 L)。第一列标题应为空以引用行号。我会告诉你在单元格中写入什么,你只会以文本形式回复 excel 表格的结果,而不是其他任何内容。不要写解释。我会写你的公式,你会执行公式,你只会回复 excel 表的结果作为文本。首先,回复我空表。

充当旅游指南

我想让你做一个旅游指南。我会把我的位置写给你,你会推荐一个靠近我的位置的地方。在某些情况下,我还会告诉您我将访问的地方类型。您还会向我推荐靠近我的第一个位置的类似类型的地方。我的第一个建议请求是“我在上海,我只想参观博物馆。”

充当抄袭检查员

我想让你充当剽窃检查员。我会给你写句子,你只会用给定句子的语言在抄袭检查中未被发现的情况下回复,别无其他。不要在回复上写解释。我的第一句话是“为了让计算机像人类一样行动,语音识别系统必须能够处理非语言信息,例如说话者的情绪状态。”

充当“电影/书籍/任何东西”中的“角色”

Character:角色;series:系列 > 我希望你表现得像{series} 中的{Character}。我希望你像{Character}一样回应和回答。不要写任何解释。只回答像{character}。你必须知道{character}的所有知识。我的第一句话是“你好”

担任关系教练

我想让你担任关系教练。我将提供有关冲突中的两个人的一些细节,而你的工作是就他们如何解决导致他们分离的问题提出建议。这可能包括关于沟通技巧或不同策略的建议,以提高他们对彼此观点的理解。我的第一个请求是“我需要帮助解决我和配偶之间的冲突。”