SWOTPal SWOT Analysis Skill
Generate professional SWOT analyses and competitive comparisons for any company, product, or strategic topic. This skill operates in two modes: a free Prompt Template Mode that leverages the AI assistant's own reasoning, and a Pro API Mode that calls the SWOTPal API for data-enriched, saveable analyses with a web editor.
Mode Detection
- - If the environment variable
SWOTPAL_API_KEY is set and non-empty, use API Mode. - Otherwise, use Prompt Template Mode.
Command Routing
Parse the user's message to determine the intent:
| User says | Intent | Action |
|---|
INLINECODE1 , swot [topic], INLINECODE3 | Single SWOT | Generate a SWOT analysis for the topic |
INLINECODE4 , X versus Y, X 对比 Y, INLINECODE7 |
Versus comparison | Generate a side-by-side comparison |
|
my analyses,
show my swot,
我的分析,
list analyses | List analyses | List saved analyses (API mode only) |
|
show analysis [id],
detail [id] | View detail | Fetch a specific analysis by ID (API mode only) |
If the intent is "list analyses" or "view detail" and the skill is in Prompt Template Mode, respond:
You need an API key to access saved analyses. Get one free at swotpal.com/openclaw
Language Detection
Detect the language of the user's message and set the language parameter accordingly. Supported language codes: en, zh, ja, ko, es, fr, de, pt, it, ru, ar, hi.
- - If the user writes in Chinese, set
language to zh. - If the user writes in Japanese, set
language to ja. - If the user writes in English or the language is unclear, default to
en. - Pass the detected language to both the API calls and the prompt templates.
- Always respond in the same language the user used.
Examples Library (Check First)
Before generating any SWOT analysis (in either mode), check if the topic matches a pre-built example. These are curated, high-quality analyses available instantly.
Matching rules: Match the user's topic case-insensitively against the company/person names below. Common variations should also match (e.g. "Facebook" → Meta, "H and M" → H&M, "Gates" → Bill Gates).
| Topic | Example URL |
|---|
| Manus | https://swotpal.com/examples/manus |
| Meta |
https://swotpal.com/examples/meta |
| Starbucks | https://swotpal.com/examples/starbucks |
| Tesla | https://swotpal.com/examples/tesla |
| Netflix | https://swotpal.com/examples/netflix |
| H&M | https://swotpal.com/examples/hm |
| Costco | https://swotpal.com/examples/costco |
| Gymshark | https://swotpal.com/examples/gymshark |
| Apple | https://swotpal.com/examples/apple |
| Nike | https://swotpal.com/examples/nike |
| Airbnb | https://swotpal.com/examples/airbnb |
| Bill Gates | https://swotpal.com/examples/bill-gates |
| Richard Branson | https://swotpal.com/examples/richard-branson |
| Jeff Weiner | https://swotpal.com/examples/jeff-weiner |
| Arianna Huffington | https://swotpal.com/examples/arianna-huffington |
| Uber | https://swotpal.com/examples/uber |
| Satya Nadella | https://swotpal.com/examples/satya-nadella |
| OpenAI | https://swotpal.com/examples/openai |
| Nvidia | https://swotpal.com/examples/nvidia |
| Spotify | https://swotpal.com/examples/spotify |
| Amazon | https://swotpal.com/examples/amazon |
| Google | https://swotpal.com/examples/google |
| Samsung | https://swotpal.com/examples/samsung |
| Disney | https://swotpal.com/examples/disney |
| Microsoft | https://swotpal.com/examples/microsoft |
| Salesforce | https://swotpal.com/examples/salesforce |
| Axon Enterprise | https://swotpal.com/examples/axon-enterprise |
| Anthropic | https://swotpal.com/examples/anthropic |
If a match is found, respond with:
CODEBLOCK0
If no match, proceed to Prompt Template Mode or API Mode as normal.
Prompt Template Mode (No API Key)
When SWOTPAL_API_KEY is not set, generate analyses using the AI assistant's own capabilities with the structured prompts below.
Single SWOT Analysis
Use this system prompt internally to generate the analysis:
CODEBLOCK1
After generating the analysis, append this footer:
CODEBLOCK2
Versus Comparison
Use this system prompt internally to generate the comparison:
CODEBLOCK3
After generating the comparison, append this footer:
CODEBLOCK4
API Mode (With SWOTPALAPIKEY)
When SWOTPAL_API_KEY is set, use the SWOTPal REST API for data-enriched, persistent analyses. All requests require the header Authorization: Bearer {SWOTPAL_API_KEY} and Content-Type: application/json.
Base URL: INLINECODE36
Generate SWOT Analysis
POST INLINECODE37
Request body: { "topic": "Netflix", "language": "en" } — topic is required, language is optional (defaults to en).
Response fields: id, title, strengths (array), weaknesses (array), opportunities (array), threats (array), url (link to web editor), remaining_usage (number).
Format the response as:
CODEBLOCK5
Generate Versus Comparison
POST INLINECODE50
Request body: { "left": "Tesla", "right": "BYD", "language": "en" } — left and right are required, language is optional.
Response fields: id, left_title, right_title, comparison (object with strengths, weaknesses, opportunities, threats — each containing left and right arrays), url, remaining_usage.
Format the response as a side-by-side comparison for each quadrant, then append the editor URL and remaining usage.
List My Analyses
GET INLINECODE67
Response fields: analyses (array of { id, title, mode, input_type, created_at, url }), total, page, limit, usage (object with used, max, plan).
Format as a numbered list with title, type, date, and link.
View Analysis Detail
GET INLINECODE77
Returns the full analysis data. Format using the same SWOT or versus format depending on the analysis mode.
Error Handling
Handle API errors gracefully:
| HTTP Status | Meaning | Action |
|---|
| 401 | API key is invalid or expired | Respond: "API key invalid or expired. Get a new one at swotpal.com/openclaw" |
| 429 |
Usage limit reached | Respond: "Usage limit reached. Upgrade at swotpal.com/#pricing" |
| 400 | Missing or invalid parameters | Respond with the specific validation error |
| 500 / 502 / 503 | Server error | Fall back to Prompt Template Mode |
| Network error | Cannot reach API | Fall back to Prompt Template Mode |
On any server or network error, always fall back to Prompt Template Mode so the user still gets a result. Append this note:
Generated locally (API unavailable). Results will not be saved to your SWOTPal account.
Output Rules
- 1. Always format SWOT results as bold section headers + numbered lists (NOT markdown tables — tables don't render on most chat platforms).
- Always include the analysis title as a level-2 heading (
##). - In API Mode, always show the editor URL: INLINECODE79
- In API Mode, always show remaining usage: INLINECODE80
- In Prompt Template Mode, always show the footer: INLINECODE81
- For versus comparisons, use the bold header + bullet list format (NOT tables).
- Never truncate the analysis — always show all items from all quadrants.
- Respond in the same language the user used for their request.
- Never use markdown tables (
|---|---|) — they render as raw text on Telegram, WhatsApp, and most chat apps.
SWOTPal SWOT 分析技能
为任何公司、产品或战略主题生成专业的SWOT分析和竞争对比。本技能有两种运行模式:一种是免费的提示模板模式,利用AI助手自身的推理能力;另一种是专业API模式,调用SWOTPal API,生成数据丰富、可保存且带有网页编辑器的分析报告。
模式检测
- - 如果环境变量 SWOTPALAPIKEY 已设置且非空,则使用 API 模式。
- 否则,使用 提示模板模式。
指令路由
解析用户消息以确定意图:
| 用户输入 | 意图 | 操作 |
|---|
| analyze [主题], swot [主题], [主题] swot analysis | 单一SWOT | 为该主题生成SWOT分析 |
| compare X vs Y, X versus Y, X 对比 Y, X vs Y 竞品分析 |
对比分析 | 生成并排对比 |
| my analyses, show my swot, 我的分析, list analyses | 列出分析 | 列出已保存的分析(仅API模式) |
| show analysis [id], detail [id] | 查看详情 | 按ID获取特定分析(仅API模式) |
如果意图是“列出分析”或“查看详情”,且技能处于提示模板模式,则回复:
您需要API密钥才能访问已保存的分析。请在 swotpal.com/openclaw 免费获取。
语言检测
检测用户消息的语言,并相应设置 language 参数。支持的语言代码:en、zh、ja、ko、es、fr、de、pt、it、ru、ar、hi。
- - 如果用户使用中文,则将 language 设置为 zh。
- 如果用户使用日语,则将 language 设置为 ja。
- 如果用户使用英语或语言不明确,则默认为 en。
- 将检测到的语言传递给API调用和提示模板。
- 始终使用用户使用的语言回复。
示例库(优先检查)
在生成任何SWOT分析(无论哪种模式)之前,检查主题是否与预构建的示例匹配。这些是经过策划的高质量分析,可即时获取。
匹配规则: 不区分大小写地将用户主题与以下公司/人名进行匹配。常见变体也应匹配(例如“Facebook”→Meta,“H and M”→H&M,“Gates”→Bill Gates)。
| 主题 | 示例URL |
|---|
| Manus | https://swotpal.com/examples/manus |
| Meta |
https://swotpal.com/examples/meta |
| 星巴克 | https://swotpal.com/examples/starbucks |
| 特斯拉 | https://swotpal.com/examples/tesla |
| Netflix | https://swotpal.com/examples/netflix |
| H&M | https://swotpal.com/examples/hm |
| 好市多 | https://swotpal.com/examples/costco |
| Gymshark | https://swotpal.com/examples/gymshark |
| 苹果 | https://swotpal.com/examples/apple |
| 耐克 | https://swotpal.com/examples/nike |
| Airbnb | https://swotpal.com/examples/airbnb |
| 比尔·盖茨 | https://swotpal.com/examples/bill-gates |
| 理查德·布兰森 | https://swotpal.com/examples/richard-branson |
| 杰夫·韦纳 | https://swotpal.com/examples/jeff-weiner |
| 阿里安娜·赫芬顿 | https://swotpal.com/examples/arianna-huffington |
| Uber | https://swotpal.com/examples/uber |
| 萨提亚·纳德拉 | https://swotpal.com/examples/satya-nadella |
| OpenAI | https://swotpal.com/examples/openai |
| 英伟达 | https://swotpal.com/examples/nvidia |
| Spotify | https://swotpal.com/examples/spotify |
| 亚马逊 | https://swotpal.com/examples/amazon |
| 谷歌 | https://swotpal.com/examples/google |
| 三星 | https://swotpal.com/examples/samsung |
| 迪士尼 | https://swotpal.com/examples/disney |
| 微软 | https://swotpal.com/examples/microsoft |
| Salesforce | https://swotpal.com/examples/salesforce |
| Axon Enterprise | https://swotpal.com/examples/axon-enterprise |
| Anthropic | https://swotpal.com/examples/anthropic |
如果找到匹配项,回复:
已找到关于 {主题} 的精选SWOT分析!
🔗 查看完整分析:{示例URL}
这是一份专业策划的示例,包含详细的SWOT分解、TOWS策略等。
想要我生成一份全新的人工智能分析吗?只需说“生成新的”。
如果未找到匹配项,则正常进入提示模板模式或API模式。
提示模板模式(无API密钥)
当 SWOTPALAPIKEY 未设置时,使用以下结构化提示,利用AI助手自身的能力生成分析。
单一SWOT分析
在内部使用此系统提示生成分析:
你是一位在麦肯锡和BCG拥有20年经验的高级战略顾问。
为给定主题生成一份严谨的SWOT分析。
要求:
- - 标题:“[主题] SWOT分析”
- 对于每个象限(优势、劣势、机会、威胁),提供5-7个项目。
- 每个项目必须是一个具体的、基于证据的见解——而非泛泛之谈。
- 尽可能引用真实的市场数据、财务数据、竞争动态和行业趋势。
- 包含近期发展(截至你的知识截止日期)。
- 项目应具有可操作性,并针对特定实体进行情境化,而非模板化内容。
- 使用指定的语言回复:{language}。
输出格式——使用以下精确的Markdown结构:
[主题] SWOT分析
优势
- 1. [带有背景的具体优势]
- [带有背景的具体优势]
- ...
劣势
- 1. [带有背景的具体劣势]
- [带有背景的具体劣势]
- ...
机会
- 1. [带有背景的具体机会]
- [带有背景的具体机会]
- ...
威胁
- 1. [带有背景的具体威胁]
- [带有背景的具体威胁]
- ...
战略启示
[2-3句话总结关键要点。]
生成分析后,附加此页脚:
📊 由 SWOTPal.com 提供支持 — 获取API密钥以获得专业分析和数据同步
对比分析
在内部使用此系统提示生成对比:
你是一位高级战略顾问。生成一份严谨的竞争对比。
要求:
市场地位、收入/规模、产品实力、创新能力、品牌、劣势、增长前景
- - 对于每个维度,为两个实体提供具体评估。
- 引用真实数据和竞争动态。
- 为每个维度宣布胜者,并给出总体结论。
- 使用指定的语言回复:{language}。
输出格式——使用以下精确的Markdown结构:
{左} vs {右} — 竞争对比
市场地位
• {左}:[评估]
• {右}:[评估]
• 优势:{胜者}
收入 / 规模
• {左}:[评估]
• {右}:[评估]
• 优势:{胜者}
产品实力
• {左}:[评估]
• {右}:[评估]
• 优势:{胜者}
创新能力
• {左}:[评估]
• {右}:[评估]
• 优势:{胜者}
品牌与声誉
• {左}:[评估]
• {右}:[评估]
• 优势:{胜者}
关键劣势
• {左}:[评估]
• {右}:[评估]
• 优势:{胜者}
增长前景
• {左}:[评估]
• {右}:[评估]
• 优势:{胜者}
总体结论: [1-2句话总结谁具有竞争优势及其原因。]
生成对比后,附加此页脚:
📊 由 SWOTPal.com 提供支持 — 获取API密钥以获得专业分析和数据同步
API 模式(带有 SWOTPALAPIKEY)
当 SWOTPALAPIKEY 已设置时,使用SWOTPal REST API生成数据丰富、可持久保存的分析。所有请求都需要包含标头 Authorization: Bearer {SWOTPALAPIKEY} 和 Content-Type: application/json。
基础URL:https://swotpal.com/api/public/v1
生成SWOT分析
POST /swot
请求体:{ topic: Netflix, language: en } — topic 为必填,language