一键导入
add-focus-mode
Create or update OpenMates user-facing focus modes using the existing SKILL.md, app.yml, i18n, docs, and test patterns
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create or update OpenMates user-facing focus modes using the existing SKILL.md, app.yml, i18n, docs, and test patterns
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Create a pull request from dev to main with proper formatting and draft release
Create a pull request from dev to main with proper formatting and draft release
Create a draft GitHub release with proper versioning and release notes
Create a well-structured task with smart field suggestions; GitHub Issues by default, Linear only for retained internal categories
Create a well-structured task with smart field suggestions; GitHub Issues by default, Linear only for retained internal categories
Start an iOS/macOS Apple app development or web-parity audit session — loads design rules, maps web sources to native code, supports Linux static audits, and verifies with Xcode when available
基于 SOC 职业分类
| name | add-focus-mode |
| description | Create or update OpenMates user-facing focus modes using the existing SKILL.md, app.yml, i18n, docs, and test patterns |
| user-invocable | true |
| argument-hint | <appId?> <focusId?> |
Use this skill when the user wants to create or update an OpenMates focus mode. OpenMates focus modes are user-facing chat modes that temporarily change how a mate thinks and responds for a specific goal. They are not OpenCode modes, editor modes, OS notification modes, or backend app skills.
Parse $ARGUMENTS as optional hints:
appId — parent OpenMates app directory, such as web, code, jobs, or studyfocusId — runtime focus mode id, snake_case preferred, such as career_insightsIf either value is missing, infer it during discovery or ask during the clarifying rounds. Do not invent a final app or ID without user confirmation.
Follow this structure closely. The user expects a deliberate plan-before-build flow with two clarification blocks and a draft review gate.
First inspect how focus modes already exist and how the target app is structured.
Read or search these paths as relevant:
docs/architecture/apps/focus-modes.mddocs/architecture/apps/focus-modes-implementation.mddocs/user-guide/apps/focus-modes.mdbackend/apps/*/focus_modes/*/SKILL.mdbackend/apps/{appId}/focus_modes/*/SKILL.mdbackend/apps/{appId}/app.ymlfrontend/packages/ui/src/i18n/sources/focus_modes/frontend/packages/ui/src/i18n/sources/app_focus_modes/frontend/apps/web_app/tests/focus-mode-*.spec.tsfrontend/packages/ui/scripts/generate-apps-metadata.jsIdentify whether the request is:
Ask exactly one clear question per round and wait for the user's answer before continuing. Stop early only if the user explicitly says to skip clarification.
Use these topics unless the repo context reveals more urgent blockers:
Based on the answers, search internal sources for relevant connected information and ideas.
Check:
app.yml, skills, settings/memories, providers, and iconsUse GitHub Issues by default for tracker searches. Do not create or update an issue unless the user asks.
Search externally for ideas and best practices relevant to the requested focus mode.
Use:
Keep this research practical. Extract patterns that improve the OpenMates focus mode contract; do not copy prompts wholesale.
Ask exactly one clear question per round and wait for the user's answer before continuing.
These questions must be informed by the internal and external research. Use them to resolve:
Present a concise draft and ask for feedback before editing product files.
The draft must include:
planning, development, or production)For updates, show a focused diff-style summary of what will change.
Wait for the user's feedback. Do not implement before this gate unless the user explicitly says to proceed without draft approval.
Incorporate feedback and show the final version briefly. Confirm any remaining tradeoffs, such as activation breadth, default-enabled behavior, or safety wording.
Use the current OpenMates implementation reality, not only the future target architecture.
Primary authoring target:
backend/apps/{appId}/focus_modes/{focus-dir}/SKILL.mdCurrent compatibility targets that may also need updates:
backend/apps/{appId}/app.ymlfrontend/packages/ui/src/i18n/sources/focus_modes/{appId}_{focusId}.ymlfrontend/packages/ui/src/i18n/sources/app_focus_modes/{appId}.ymlRules:
id in SKILL.md is snake_case and must match OpenMates metadata.SKILL.md, app.yml, and i18n keys aligned while the migration is incomplete.stage: development for new unverified modes unless the user explicitly asks for planning or production and the mode is tested.preprocessor-hint should be 1-3 sentences that describe when to select the mode, not the full system prompt.## Process bullets should be user-facing and concrete.## System prompt should define role, workflow, boundaries, tool behavior, and output expectations.allowed-skills are currently parsed but not fully enforced at runtime; do not rely on them as the only safety control.Run the smallest checks that prove the change.
Usually relevant:
cd frontend/packages/ui && npm run build:translations after i18n YAML editscd frontend/packages/ui && npm run generate-apps-metadata after focus metadata edits, if available in package.jsonSKILL.mdFor any user-facing focus-mode behavior change, run a real OpenMates CLI chat quality check after the metadata is built and, when testing dev behavior, after the change is deployed to dev. Use the test-account helper or the compiled CLI, for example:
node scripts/openmates_cli_test_account.mjs login --api-url https://api.dev.openmates.orgnode frontend/packages/openmates-cli/dist/cli.js --api-url https://api.dev.openmates.org chats new "<example request>" --jsonRun multiple example requests that match the activation hint and inspect the actual assistant output. Record whether the focus mode activated, which skills were used, whether the answer followed the expected structure, and whether the quality met the draft's success criteria. If the CLI cannot be run, document the blocking reason instead of treating parser/build checks as behavior evidence.
For user-facing focus-mode behavior, propose the relevant E2E test path and use the repo test runner after deploy when running Playwright:
python3 scripts/tests.py run --spec focus-mode-settings.spec.tspython3 scripts/tests.py run --spec focus-mode-mention.spec.tspython3 scripts/tests.py run --spec focus-mode-rejection.spec.tsDo not run Playwright locally.
Every production or development focus mode must have at least one permanent example chat linked from its focus-mode details page. This applies to both new focus modes and prompt/routing improvements to existing focus modes.
Before finishing:
frontend/packages/ui/src/demo_chats/data/example_chats/ for an
existing example with metadata.app_focus_mode_examples containing
"{appId}.{focusId}".scripts/create-example-chat-from-share.mjs.@focus:... wire prefix from public example-chat user text after
scaffolding.metadata.app_focus_mode_examples: ["{appId}.{focusId}"] and
metadata.active_focus_id: "{appId}-{focusId}" on the example chat so the
focus-mode page can surface it and the demo chat opens with the active focus
state visible.scripts/audit_example_chats.py before deploying.Use this structure for Step 6 and Step 8.
## Focus Mode Draft
Name:
App:
Focus ID:
Directory:
Stage:
Description:
Activation hint:
Process:
- ...
How to use:
- ...
- ...
- ...
System prompt:
...
Allowed skills/apps:
Non-goals:
Safety and privacy:
Open questions:
Before finishing, verify:
SKILL.md frontmatter starts and ends with ---id is snake_case and directory is kebab-case## Process, ## How to use, and ## System prompt sections exist when neededapp.yml contains or preserves compatible metadata while backend discovery still needs itmetadata.app_focus_mode_examples for the focus modeUse specify before implementation if the focus mode changes runtime behavior,
adds new persistence, introduces new API routes, changes activation/deactivation
semantics, touches encryption/privacy-sensitive data flows, or requires new app
skills/providers. Pure prompt/content additions can usually follow this skill
without a full spec.