Back to skills
extension
Category: OtherNo API key required

Gitmind(思乎)

Use this skill whenever the user mentions GitMind, Gitmind, or localized GitMind feature names, or when they need GitMind OAuth authorization, common page navigation, My Thoughts file operations, Planet access, Inspiration Flow workflows, template browsing, OSS authorization, WebSocket flows, AI mind map generation, AI flowchart generation, AI bulletin generation, or AI exam generation. The skill is organized into page navigation, auth login, My Thoughts, Planets, personal center, Inspiration Flow, hot templates, OSS authorization, WebSocket, AI mind map, AI flowchart, AI bulletin, and AI exam modules. Folder CRUD in My Thoughts, planet list access, template category and list access, the AI mind map chain from WSS Markdown to project JSON to OSS overwrite and metadata update, prompt or Mermaid or image to draw.io flowchart generation, prompt-to-HTML project generation for AI bulletin documents, and prompt-to-exam generation for AI exam documents are all supported. If the user mentions files or thoughts without clearly referring to a local computer file, system file, workspace file, or another external source, default to files in GitMind My Thoughts.

personAuthor: user_823b254fhubcommunity

GitMind Skill

Use this skill whenever the user mentions GitMind, Gitmind, or GitMind features by localized names.

If the user says "file", "document", or "thought" without clearly referring to a local computer file, a system file, a workspace file, or another external source, interpret it as a file in GitMind My Thoughts.

If the user wants to buy membership, upgrade, subscribe, top up quota, open the pricing page, or open a purchase page, prefer pricing_page_open and open the correct GitMind pricing page in the user's default system browser for the resolved region + env + language.

If the user wants a GitMind feature page or a direct GitMind page link, prefer page_open or page_url_resolve, and return the resolved https URL for the correct domain and language.

When replying with GitMind page links, return the raw https URL directly instead of wrapping it as a Markdown link. This avoids rendering issues in some agent clients.

Modules

This skill is organized into these thirteen business modules:

  1. Page Navigation
  2. Auth Login
  3. My Thoughts
  4. Planets
  5. Personal Center
  6. Inspiration Flow (personal + collective)
  7. Hot Templates
  8. OSS Authorization
  9. WebSocket / WSS
  10. AI Mind Map
  11. AI Flowchart
  12. AI Bulletin
  13. AI Exam

Detailed module notes live in:

  • references/auth-login.md
  • references/my-thoughts.md
  • references/planets.md
  • references/personal-center.md
  • references/inspiration-flow.md
  • references/hot-templates.md
  • references/oss-authorization.md
  • references/ai-mindmap.md
  • references/ai-flowchart.md
  • references/ai-bulletin.md
  • references/ai-exam.md
  • references/vip.md

Requirements

  • Runner: ./run.mjs
  • Prefer a real local node execution host, or another executor that can run local Node.js and open the user's default browser. Do not default to sandbox.
  • When constructing any exec request for this skill, do not include the host field by default. First try the command without host and let the client choose its normal execution target. Only if that attempt fails should you retry with host: "node".
  • This applies to all commands in this skill, not only OAuth or browser-related commands.
  • If the current agent or client has no working sandbox runtime, do not send those tools to sandbox.
  • Reply in the user's language by default unless the user explicitly asks for a different response language.
  • Authorization flows must use the user's system default browser. Do not replace them with browser, agent-browser, or any browser automation skill.

Global Auth Gate

  • Before calling any GitMind tool that depends on login state, first check whether the locally saved api_token is present and non-empty. Prefer get_saved_token for this check.
  • If api_token is empty, missing, invalid, or clearly expired, do not continue with downstream business tools yet. Enter the OAuth authorization flow first, complete login, then resume the original task.
  • Only the login and login-state tools themselves are exempt from this pre-check, such as oauth_login, oauth_prepare, oauth_wait_callback, oauth_status, oauth_finish, oauth_clear, get_saved_token, and logout.
  • The runtime entry also enforces this gate: non-auth business tools automatically check the saved token first, and if login is required they start oauth_login immediately instead of letting downstream APIs fail first.
  • Treat this as a global prerequisite for all modules below, including page actions that require authenticated context, My Thoughts, Planets, Personal Center, Inspiration Flow, Hot Templates actions that need account context, OSS authorization, WebSocket flows, AI Mind Map, AI Flowchart, AI Bulletin, and VIP or quota related requests.

Global Quota Gate

  • If any GitMind tool call returns a quota-insufficient, credit-insufficient, membership-required, or recharge-required error, treat it as a global business fallback condition.
  • Typical trigger phrases include but are not limited to quota insufficient, credits insufficient, membership required, VIP required, please recharge, please subscribe, and similar backend or frontend business errors.
  • When this happens, clearly tell the user that the current GitMind account quota or membership is insufficient, guide them to pay or recharge, and prefer pricing_page_open to open the correct pricing page in the user's default browser.
  • After the user completes payment, membership purchase, or quota recharge, continue or retry the original GitMind operation as appropriate.
  • Treat this as a global fallback for all business modules, not only VIP or personal center requests.

Runner Arguments

  • --tool <tool-name>
  • --payload '<json-string>'
  • --payload-file <json-file-path>

Execution Guidance

  • Recommended invocation: node run.mjs --tool <tool-name> --payload '<json>'
  • On Windows PowerShell, prefer --payload-file for OAuth/login commands and any payload with quotes. This avoids shell escaping issues before oauth_login can open the browser:
    '{"auto_open_browser":true}' | Set-Content -Encoding utf8 .\oauth-login.payload.json
    node .\run.mjs --tool oauth_login --payload-file .\oauth-login.payload.json
    
  • If using inline JSON in PowerShell, pass it with single quotes: node .\run.mjs --tool oauth_login --payload '{"auto_open_browser":true}'. Avoid backslash-heavy forms such as "{\\\"auto_open_browser\\\":true}".
  • For AI generation tools that may wait on WSS completion, such as AI mind map, AI flowchart, image-to-mindmap, or direct wss_request, the outer command timeout must be at least 5 minutes.
  • AI bulletin uses a longer inner WSS timeout budget of 20 minutes, so its outer command timeout should be at least 1200 seconds.
  • If the caller has separate outer exec controls such as timeout and yieldMs, use timeout >= 300 seconds for the regular 5-minute tools, timeout >= 1200 seconds for AI bulletin, and prefer yieldMs around 10000 ms so the outer runner does not kill the process earlier than the inner WSS timeout.
  • When the user asks for a GitMind business action and the current login state is unknown, check get_saved_token first before invoking the target tool.
  • If get_saved_token shows api_token is absent, blank, or unusable, immediately switch to the OAuth flow instead of attempting the target business tool first.
  • If a caller skips this check, the runtime still blocks the business tool and returns a login_required result after starting oauth_login.
  • After login succeeds and api_token has been saved, retry the original business action with the same resolved parameters.
  • If a business tool returns a quota-insufficient or membership-restricted error, guide the user to recharge or subscribe, then open the pricing page with pricing_page_open before stopping on the error.
  • If the host client distinguishes between host, executor, or runtime, do not pin host on the first attempt for any command in this skill. Retry with the target that can run local Node.js directly only after the initial attempt fails.
  • Do not pin GitMind OAuth, page opening, default browser launching, or callback port listening to sandbox.
  • Use sandbox only when you have explicitly confirmed that the current session truly has a sandbox runtime and that runtime can access the local default browser and the callback port.
  • If you see errors like sandbox runtime is unavailable, cannot open system browser, or callback server did not become ready, first check whether the command was incorrectly sent to sandbox.

Module 0: Page Navigation

Tools:

  • page_url_resolve
  • page_open
  • pricing_page_open

Notes:

  • page_url_resolve resolves the final GitMind https page URL without opening a browser.
  • page_open opens a common GitMind page in the user's default browser and also returns the final page URL.
  • page_open and pricing_page_open should still follow the global execution rule: first try without host, and if a host-specific retry is needed, prefer local node rather than sandbox, because they need the system default browser.
  • pricing_page_open is also the preferred global fallback entrypoint when business tools report quota-insufficient or membership-required errors.
  • These tools choose the host and language path from region + env + language. If those parameters are omitted, they fall back to oauth.region, oauth.env, and oauth.language in config.json.
  • Built-in common pages currently include recents, flow, flow_list, docs, planets, templates, ai_tools, usage_logs, orders, refunds, user_info, settings, pricing, extension_install, and download.
  • The page parameter accepts both English keys and localized aliases.
  • Both tools return url. In agent replies, show the raw URL directly.

Module 1: Auth Login

Tools:

  • oauth_login
  • oauth_prepare
  • oauth_wait_callback
  • oauth_status
  • oauth_finish
  • oauth_clear
  • get_saved_token
  • logout
  • pricing_page_open
  • oss_get_authorization
  • oss_get_ai_authorization

Notes:

  • Before any non-auth tool in this module or other modules, first confirm saved login state with get_saved_token unless the current turn has already verified a usable api_token.
  • oauth_login and oauth_prepare start a local OAuth callback server and, when auto_open_browser=true, open the authorization page in the user's default browser.
  • These tools also follow the global execution rule: first try without host, and if a host-specific retry is needed, prefer local node rather than sandbox.
  • If the client supports runtime fallback, automatically fall back from sandbox to node instead of surfacing sandbox availability issues as GitMind business errors.

Module 2: My Thoughts

Tools:

  • directory_open
  • thought_open
  • file_create
  • file_save
  • file_get
  • file_project_get
  • file_project_upload
  • file_list
  • file_search
  • file_delete
  • file_move
  • file_rename
  • directory_create
  • directory_rename
  • directory_delete
  • directory_move
  • directory_restore

Notes:

  • file_project_get follows a fixed chain for project retrieval: call file_get, then fetch the expiring project_url.
  • file_project_upload follows a fixed overwrite chain: call oss_get_authorization, upload to the existing project_object, then call file_save.
  • To open the My Thoughts home page, use page_open(page="docs") or directory_open() so the page stays on /app/docs. Do not hardcode /app/dirs/0.
  • directory_open should only open /app/dirs/<guid> when a specific directory guid or file_guid is provided. If the directory is omitted or is 0/root, treat it as the My Thoughts home page at /app/docs.
  • file_list must use dir_guid as the directory parameter name. Do not mix it with guid, directory_guid, or file_guid.

Module 3: Planets

Tools:

  • planet_list
  • planet_created_list
  • planet_joined_list
  • planet_all_list
  • planet_create
  • planet_detail
  • planet_delete
  • planet_mind_list
  • planet_thought_list
  • planet_video_list

Notes:

  • planet_list returns all planets the current user created or joined, and also supports passthrough type=1/2.
  • planet_created_list returns planets created by the current user.
  • planet_joined_list returns planets joined by the current user.
  • planet_all_list returns the "All Planets" discovery list from /planets-by-tags and supports tags filters.
  • planet_create accepts name, title, and planet_name.
  • planet_detail accepts guid, planet_guid, and id.
  • planet_delete accepts guid, planet_guid, and id.
  • planet_mind_list filters planet content by document_type, including multi-type combinations like 0,1,2.
  • planet_thought_list is the fixed filter for mind maps, flowcharts, and whiteboards.
  • planet_video_list is the fixed filter for videos.
  • If user_id is omitted, the service resolves it from the locally saved GitMind OAuth token.

Module 4: Personal Center

Tools:

  • personal_center_get
  • user_profile_get
  • personal_quota_logs_list
  • quota_logs_list
  • vip_get
  • vip_status_get

Notes:

  • personal_center_get returns the current user's personal center profile from GET /user/:user_id.
  • user_profile_get is an alias of personal_center_get.
  • personal_quota_logs_list returns quota consumption and top-up logs from GET /logs under base/vip/v2.
  • quota_logs_list is an alias of personal_quota_logs_list.
  • vip_get returns the current user's VIP data from GET /base/vip/v2/vips?user_id=:user_id&product_id=:product_id.
  • vip_status_get is an alias of vip_get.
  • If user_id is omitted, the service resolves it from the saved GitMind OAuth token.
  • If product_id is omitted, the service resolves it from the saved OAuth config or api_token.
  • Returned storage fields are normalized to KB, including space_used_kb, space_limit_kb, space_available_kb, and storage.unit = "KB".
  • VIP responses should drop candy-related fields and focus on membership and quota data.
  • VIP responses also expose summary fields such as vip.membership.purchased, vip.membership.is_active, vip.membership.expired_at, vip.quota_summary.permanent_quota, vip.quota_summary.limited_quota, vip.quota_summary.limited_quota_expired_at, vip.quota_summary.limited_quota_details.expired_at, and vip.quota_summary.total_quota.

Module 5: Inspiration Flow

Tools:

  • inspiration_subject_create
  • inspiration_subject_list
  • inspiration_subject_get
  • inspiration_subject_update
  • inspiration_subject_delete
  • inspiration_create
  • inspiration_update
  • inspiration_get
  • inspiration_list
  • inspiration_search
  • inspiration_open
  • inspiration_delete
  • personal_flow_list
  • personal_flow_create

Notes:

  • First resolve destination wording through glossary/terms.json. Treat inspiration_flow_personal as the default flow-space interpretation for Inspiration Flow, personal flow, and other localized equivalents unless the user clearly points to the collective space.
  • Only treat the request as the collective flow space when the normalized destination term is inspiration_flow_group or the user clearly expresses that intent.
  • When the request contains both content and a destination term resolved from the glossary, treat that destination as a GitMind feature target first, not as a document title to search.
  • For destination-style requests, prefer the target feature's write action over My Thoughts search:
    • inspiration_flow_personal -> prefer personal_flow_create
    • inspiration_flow_group with a concrete subject -> prefer inspiration_create
    • inspiration_flow_group with subject-creation intent -> prefer inspiration_subject_create
  • Only search My Thoughts documents by name when the user is explicitly asking to find, open, list, or inspect a document, or when no GitMind feature target is named.

Module 6: Hot Templates

Tools:

  • template_category_list
  • template_list
  • template_detail
  • template_create_from_template

Notes:

  • template_category_list returns template categories, currently centered on mind map and flowchart groupings, plus their subcategories.
  • template_list queries templates by category, keyword, and pagination. category_ids supports a single ID, an array, or a comma-separated string.
  • template_list defaults to page=1, per_page=20, and app_type=1, matching the frontend template page defaults.
  • template_detail accepts guid, template_guid, and id.
  • template_create_from_template creates a new mind map or flowchart from a template file_guid, and accepts file_guid, template_file_guid, and source_file_guid.
  • template_create_from_template currently follows the real frontend request shape: POST /minds, action_type=2, document_type=0.

Module 7: OSS Authorization

Tools:

  • oss_get_authorization
  • oss_get_ai_authorization

Module 8: WebSocket / WSS

Tools:

  • wss_build_url
  • wss_request
  • wss_pdf_translate
  • wss_image_to_mindmap

Notes:

  • wss_build_url only builds a connectable WSS URL from OAuth data in config.json plus optional overrides.
  • wss_request is the generic single-request tool: connect, send a message, collect replies, exit on timeout or idle, then disconnect.
  • wss_request uses a 5-minute default inner generation timeout. AI bulletin overrides this at the business layer to 20 minutes. Any outer exec timeout must not be shorter than the effective inner timeout.
  • wss_pdf_translate assembles the action=100 payload used by the frontend PdfTranslationWebSocket flow.
  • wss_image_to_mindmap assembles the action=100 payload used by the frontend image-to-mindmap flow.
  • Because run.mjs is a single-process runner, the current design uses a one-connection, one-session collection model instead of a cross-command persistent socket.

Module 9: AI Mind Map

Tools:

  • ai_mindmap_list_generation_skills
  • ai_mindmap_route_generation
  • ai_mindmap_generate_outline_from_prompt
  • ai_mindmap_generate_mindmap_from_outline
  • ai_mindmap_generate_mindmap_from_long_text
  • ai_mindmap_generate_mindmap_from_file
  • ai_mindmap_generate_mindmap_from_audio
  • ai_mindmap_generate_mindmap_from_link
  • ai_mindmap_generate_mindmap_from_image
  • ai_mindmap_generate_mindmap_from_youtube
  • ai_mindmap_build_payload
  • ai_mindmap_prepare_image_generation
  • ai_mindmap_markdown_to_json
  • ai_mindmap_write_json_file
  • ai_mindmap_upload_json
  • ai_mindmap_wss_markdown_to_oss

Notes:

  • AI mind map generation is split into seven input-specific skills:
    • ai_mindmap_generate_outline_from_prompt: prompt step 1, generate Markdown outline only
    • ai_mindmap_generate_mindmap_from_outline: prompt step 2, generate the final mind map from the confirmed outline
    • ai_mindmap_generate_mindmap_from_long_text: long text to mind map
    • ai_mindmap_generate_mindmap_from_file: file analysis to mind map
    • ai_mindmap_generate_mindmap_from_audio: audio or video to mind map
    • ai_mindmap_generate_mindmap_from_link: link analysis to mind map
    • ai_mindmap_generate_mindmap_from_image: image understanding to mind map
    • ai_mindmap_generate_mindmap_from_youtube: YouTube video to mind map
  • ai_mindmap_route_generation routes requests to the correct skill from skill, generation_mode, input_mode, or sourceType.
  • ai_mindmap_list_generation_skills reports the current implementation status of the seven generation skills.
  • These tools follow the frontend pipeline from input to AI to WSS Markdown to mind map JSON to OSS.
  • ai_mindmap_prepare_image_generation currently focuses on the image flow and prepares mind_id, conversation_id, and the specialized image-to-mindmap WSS payload.

AI Mind Map Routing Rules

Do not treat every AI mind map request as "generate an outline first". Route by input type:

  1. Prompt: Use the required two-step confirmation flow. First call ai_mindmap_generate_outline_from_prompt, show the Markdown outline, and let the user revise it. Only after the user confirms should you call ai_mindmap_generate_mindmap_from_outline with the final outline_markdown. Exception: if the user's intent resolves to the glossary term outline_to_mindmap, treat it as an outline-to-mindmap request and call ai_mindmap_generate_mindmap_from_outline directly instead of re-running step 1.
  2. Long text: Generate the final Markdown in one step with mind_type=6, then convert it to project JSON and upload it.
  3. File analysis: Upload the source file, create and poll the vectorization task, get file_hash, then generate final Markdown with mind_type=4.
  4. Audio or video: Upload the media file, run ASR, vectorize the transcript, then generate final Markdown. Default to mind_type=14; use mind_type=13 only if the user explicitly wants no timestamps.
  5. Link analysis: Check URL availability, vectorize the URL content, then generate final Markdown with mind_type=5.
  6. Image understanding: Create the mind map and image chatdocs session first, then generate final Markdown with mind_type=2. After the project upload succeeds, update aigc_label=1 and include project_id.
  7. YouTube: Create and poll the YouTube subtitle task first, vectorize the returned timestamp transcript URL through chatdocs, wait for file_hash, then generate final Markdown with mind_type=11 plus video_id and subtitle_task_id.
  8. For every route that produces final Markdown: Continue with Markdown extraction, project JSON conversion, overwrite upload, and metadata writeback through file_project_upload.

AI Mind Map Execution Constraints

  • When invoking these tools through an outer command runner, keep the outer timeout at 5 minutes or longer. Do not set outer timeout below 300 seconds, otherwise the command layer may kill the process before the inner WSS generation timeout.
  • During WSS processing, do not treat intermediate messages as the final result. Prefer the last valid d.answer.text from the final effective response, especially the last e=1 message.
  • Uploading JSON to AI OSS alone is not enough to finish a GitMind mind map writeback. The project file relationship and metadata must also be preserved or written back.
  • When file_guid is known, prefer the fixed file_project_get and file_project_upload chain because it already handles old object lookup, overwrite upload, and node or project metadata writeback.
  • If you only have the short guid or mind_id, resolve the real file_guid first with file_get before saving project data.
  • For prompt generation, do not encourage the user to open the new document before the second step finishes. The document may still be blank or stale until the project JSON is written back.
  • After the second prompt step or any one-step generation finishes, return the final full document URL. Prefer mindmap_url, then document_url, then url.

Module 10: AI Flowchart

Tools:

  • ai_flowchart_prepare_prompt_generation
  • ai_flowchart_prepare_image_generation
  • ai_flowchart_generate_from_prompt
  • ai_flowchart_generate_from_mermaid
  • ai_flowchart_generate_from_image
  • ai_flowchart_mermaid_to_drawio
  • ai_flowchart_upload_drawio_project
  • ai_flowchart_generate_from_visio

Notes:

  • This module is separate from the AI mind map chain. Its final artifact is a draw.io project, not a GitMind mind map project JSON.
  • For prompt or image generation paths that call wss_request, keep the outer command timeout at 5 minutes or longer so the outer runner matches the inner WSS timeout budget.
  • Supported inputs:
    • Prompt: pass the user's request directly as prompt, call wss_request, extract Mermaid from Markdown, then convert to raw draw.io mxGraphModel
    • Mermaid: convert directly to raw draw.io mxGraphModel
    • Image: upload the image, create an image chatdocs session with source_type=2 and use_original_image_url=1, call wss_request to get Mermaid, then convert to raw draw.io mxGraphModel
    • Visio: convert .vsd with libvisio-v2 assets loaded from the configured CDN by default; convert .vsdx by running the bundled Draw.io VSDX importer in a headless Chromium-compatible browser, using a local browser when available and Chrome for Testing auto-download as fallback
  • Prompt/image flowchart generation now accepts sub_document_type, flowchart_type, diagram_type, or mermaid_type to select the real flowchart subtype for WSS generation.
  • Supported subtype mapping: 1=flowchart, 2=er, 3=sequence, 4=timeline, 5=swot, 6=swimlane, 7=class, 8=gantt (0 is reserved/default).
  • The image-to-flowchart WSS request should match the frontend request shape: product_id=532, source_type=6, parameters.mind_type=2, parameters.document_type=1, parameters.sub_document_type=<resolved subtype>, and parameters.flow_content_id="".
  • The prompt-to-flowchart WSS request should also include parameters.document_type=1 and parameters.sub_document_type=<resolved subtype>. Do not expand, rewrite, or append Mermaid-format instructions to the user's request before passing prompt; the server optimizes the request and generates the matching flowchart code.
  • Current local draw.io conversion is browser-free and supports all mapped Mermaid flowchart subtypes as raw mxGraphModel XML. flowchart / graph use a Node intermediate graph model (nodes / edges / groups) and render editable mxGraph cells, including Mermaid subgraph containers. erDiagram, sequenceDiagram, timeline, swot, swimlane, classDiagram, and gantt use subtype-specific editable templates where the old frontend depended on draw.io browser runtime or SVG import hooks.
  • Generation tools return mermaid and drawio_xml, and return project_upload and url when upload is triggered.
  • Visio import is exposed through ai_flowchart_generate_from_visio only. For .vsd and .vsdx, this tool creates a new GitMind flowchart document, converts the file to raw draw.io mxGraphModel, uploads the project content, and returns the final document URL. .vsdx conversion reuses assets/visio/vsdx-importer/vsdxImporter.html, loads the Draw.io editor runtime from the configured CDN, and runs browser automation instead of asking the user to import manually.

Module 11: AI Bulletin

This module turns multiple input sources into GitMind AI bulletin project files built from HTML content.

Preferred references:

  • references/ai-bulletin.md

Execution note:

  • AI bulletin generation also depends on WSS completion. When invoked through an outer command runner, keep the outer timeout at 5 minutes or longer and do not set it below 300 seconds.

Module 12: AI Exam

Tools:

  • ai_exam_generate_from_prompt

Notes:

  • Preferred reference: references/ai-exam.md
  • The main one-shot tool is ai_exam_generate_from_prompt.
  • Other exam steps are internal implementation details and are not exposed as external tools.
  • The flow is: create document_type=5 document, create Chatbot /messages async task with scene=ai_question_generate, poll msg_id, parse answer.text, save { questions, answers: {} }, and return the final document URL.
  • AI exam document creation defaults aigc_watermark_enabled to 1, matching the web-side visible AIGC watermark contract for exam documents.
  • question_plan / questionPlan / settings maps question type numbers to counts. Supported type keys are 1 single choice, 2 multiple choice, 3 true/false, and 4 fill blank.
  • Agent-side generation has no user answers yet, so answers should default to the front-end-compatible empty state skeleton for each question.

Terminology Rules

  • Before choosing a GitMind feature, page, or AI skill, read glossary/terms.json and normalize the user's wording to the glossary canonical term whenever possible.
  • Handle multilingual aliases at the model layer. Do not hardcode localized aliases into service implementations.
  • If the user uses a localized feature label such as a Japanese, Chinese, or English product term, resolve it through the glossary first and then choose the right tool.
  • When both a content object and a feature destination appear in the same request, prioritize the destination feature term for routing. Example: when the destination resolves to inspiration_flow_personal, route to the Inspiration Flow toolchain instead of My Thoughts document search.
  • For Inspiration Flow scene recognition, rely on glossary/terms.json multilingual aliases plus the user's intent together at the model layer. Do not add extra JS scene-detection helpers or localized keyword lists for this routing.
  • Normalize AI mind map feature terms to these internal routing keys:
    • prompt_to_mindmap -> prompt
    • long_text_to_mindmap -> longText
    • file_to_mindmap -> file
    • website_to_mindmap -> link
    • audio_to_mindmap or video_to_mindmap -> audio
    • image_to_mindmap -> image
    • youtube_to_mindmap -> youtube
  • If the user mentions files or thoughts without clearly referring to local files, system files, workspace files, or another external source, default to GitMind My Thoughts.

URL Rules

  • Prefer page_url_resolve or page_open for common pages. Do not hardcode domains.
  • GitMind page links returned to the user must use https.
  • Show raw https URLs directly in the response.
  • Personal flow home: AUTHORIZE_BASE_URL/app/flow
  • Collective flow home: AUTHORIZE_BASE_URL/app/flow/list
  • Subject detail page: AUTHORIZE_BASE_URL/flow/<subject-guid>?subRoute=list

AUTHORIZE_BASE_URL is resolved dynamically from region (cn or overseas) and env (prod or dev).

For common feature pages, the skill generates the https URL with page host rules. When region=overseas and language is neither zh nor en, the language prefix is added automatically, for example https://gitmind.com/jp/pricing or https://dev-gitmind-com.aoscdn.com/jp/app/templates.

Endpoint Rules

  • When reauthenticating, do not clear the entire config.json.
  • Reset only login-state fields such as oauth.auth_code and oauth.api_token.
  • It is also recommended to clear derived login-state fields such as token_type, expires_in, saved_at, and callback_url.
  • Preserve non-login configuration such as oauth.region, oauth.env, oauth.language, and debug.
  • Authorization URLs, passport endpoints, and business API endpoints must always be regenerated from region + env. Do not keep using a stale endpoint snapshot from an old token.
  • oauth.language is the user language and should be a 2-character string such as zh, en, or jp.
  • The browser authorization page should first resolve the host from region + env, then apply the language-specific path rules.
  • GitMind OAuth must always open in the system default browser. Do not replace it with browser, agent-browser, or any browser automation skill.

Current built-in endpoint mapping:

  • region=cn, env=dev
    • authorize_base_url: http://dev-gitmind-cn.aoscdn.com
    • auth_page_base_url
      • language=zh: https://dev-gitmind-cn.aoscdn.com/oauth
      • language=en: https://dev-gitmind-cn.aoscdn.com/oauth
      • language=<other>: https://dev-gitmind-cn.aoscdn.com/oauth
    • passport_base_url: https://devaw.aoscdn.com/base/passport/v2
    • api_base_url: https://devaw.aoscdn.com/app/gitmind/v3
  • region=cn, env=prod
    • authorize_base_url: https://gitmind.cn
    • auth_page_base_url
      • language=zh: https://gitmind.cn/oauth
      • language=en: https://gitmind.cn/oauth
      • language=<other>: https://gitmind.cn/oauth
    • passport_base_url: https://aw.aoscdn.com/base/passport/v2
    • api_base_url: https://aw.aoscdn.com/app/gitmind/v3
  • region=overseas, env=dev
    • authorize_base_url: http://dev-gitmind-com.aoscdn.com
    • auth_page_base_url
      • language=zh: https://dev-gitmind-com.aoscdn.com/oauth
      • language=en: https://dev-gitmind-com.aoscdn.com/oauth
      • language=<other>: https://dev-gitmind-com.aoscdn.com/<language>/oauth
    • passport_base_url: https://devgw.aoscdn.com/base/passport/v2
    • api_base_url: https://devgw.aoscdn.com/app/gitmind/v3
  • region=overseas, env=prod
    • authorize_base_url: https://gitmind.com
    • auth_page_base_url
      • language=zh: https://gitmind.com/oauth
      • language=en: https://gitmind.com/oauth
      • language=<other>: https://gitmind.com/<language>/oauth
    • passport_base_url: https://gw.aoscdn.com/base/passport/v2
    • api_base_url: https://gw.aoscdn.com/app/gitmind/v3

Configuration

  • Read config.json from this directory by default.
  • After OAuth succeeds, the GitMind business api_token is saved to config.json.
  • OAuth success also persists the currently resolved authorize_base_url, auth_page_base_url, passport_base_url, and api_base_url.
  • If config.json already contains region or env, reauthorization should resolve endpoints from those values again.
  • When config.json already contains language, it is used for non-zh and non-en authorization page paths on overseas sites.
  • When oauth_login or oauth_prepare runs with auto_open_browser=true, it must use the user's default browser.
  • HTTP debugging can be enabled through environment variables.