mo-shared
Original:🇨🇳 Chinese
Translated
Mowen CLI Shared Rules: Application configuration initialization, Mowen API Key configuration and management, basic parsing of Mowen CLI responses, and Mowen CLI security rules. Triggered when users use Mowen CLI.
2installs
Sourcemowenxd/cli
Added on
NPX Install
npx skill4agent add mowenxd/cli mo-sharedTags
Translated version includes tags in frontmatterSKILL.md Content (Chinese)
View Translation Comparison →mocli - Mowen CLI Shared Rules
This skill is a prerequisite skill for the Mowen CLI skill library, guiding you on how to complete configuration initialization, API Key configuration, interaction response parsing with , display rules, and security rules through .
moclimocliPrerequisite References
- How to Obtain Mowen API Key
- mocli Output Protocol
- mocli Common Output Fields
General Execution Flow
- First determine the specific subcommand corresponding to the user's intent; do not use search commands instead of more precise list commands.
mocli - If the command requires a UID and the user provides a name, nickname, or alias, prioritize using to find the UID; if not found, use user search or ask the user to supplement the UID.
mo-remark - After executing , first read the top-level
mocli,code, andstatus; only parsereasonafter confirming success.reply - When displaying list results, prioritize using ordered ID lists in the reply (such as ,
note_ids,uids); then retrieve details from the corresponding Map (such asevents,notes) to avoid order errors caused by directly traversing the Map.users
Configuration Initialization
For first-time use, users need to provide a Mowen API Key and use to complete initialization.
mocli auth init --apik <api-key>API Key Configuration and Management
- During use, if returns an
moclierror (the user may have reset the API Key on the Mowen platform or lost local configuration), remind the user to re-provide the API Key and useAUTHto re-initialize or replace (mocli auth init --apik <api-key> [--force]) the API Key.--force - You can use to view current configuration information; use
mocli auth info [--profile]to additionally obtain the Profile information of the account corresponding to the current API Key on the Mowen platform.--profile
Response Parsing Rules
- and
code=0indicate success; business data is usually instatus=OK.reply - represents important prompts, which may appear on success or failure; prioritize attention and determine the display position based on the prompt type. For example, CLI new version reminders are usually attached after business results.
meta.alerts - or
status=FAILindicates failure; prioritize displayingcode!=0,reason, and executable suggestions inmsg.meta.hints - : Remind the user to re-provide the API Key and use
reason=AUTHto update the configuration; do not output the old API Key.mocli auth init --apik <api-key> --force - : Indicates invalid parameters, and provide optional corrections based on the parameter range of the current skill.
reason=VALIDATE - : Indicates network or proxy failure; if executed in a restricted environment, prompt that network/proxy permissions are required.
reason=NETWORK - and
reason=APIexists: Display theapi_error.trace_idto facilitate problem feedback, but do not disclose authentication information.trace_id - If an empty list or empty Map is returned, clearly state "No data matching the criteria found" and do not fabricate results.
Response Display Rules
<a id="reply-display-rules"></a>
General Rule: Based on the user's requirements and the amount of data entries, display the content as clearly, explicitly, and beautifully formatted as possible
Detailed Rules:
- Avoid dull data; appropriately add emojis to increase data interest
- Format timestamps into readable time
- Display Bool values with emojis as much as possible
- If there is little data, display information in detail
- If there is a lot of data, use forms/lists and other formats to display it as clearly, explicitly, and beautifully formatted as possible. For table field selection:
- First, select fields that the user cares about according to their requirements
- If the user does not specify fields, display fields that most data entries have to maximize display space while avoiding columns with only a small amount of data
- If the above detailed rules are inconsistent with the user's requirements, the user's requirements take precedence
Note List Display Suggestions:
- When there is little data, display core information item by item: time, author, note title, abstract. If the user focuses on a certain field (such as reading count, paid status, public status), supplement that field first.
- When there is a lot of data, first give a brief overview (quantity, time range, main authors or topics), then list several of the most relevant or latest key notes; do not only summarize and omit specific entries.
- Prioritize using for note titles; if the title itself does not contain 「」 or 『』, wrap it with 『』; prioritize using
note.titlefor authors; prioritize usingusers[note.uid].namefor abstracts.note.brief - Do not fabricate content when fields are missing. You can omit missing fields or use clear placeholders such as "Untitled", "Unknown Author", "No Abstract".
Update Reminders
When detects that a new version of the CLI is available, it will return an update reminder via . This reminder is important information and should be clearly and explicitly displayed to the user while avoiding repeated displays that cause annoyance.
moclimeta.alertsWhen displaying update reminders:
- Retain key information such as current version, latest version, build time, and update command.
- You can use a prominent emoji + short text to indicate that this is a CLI update reminder, but do not rewrite or omit the specific update command.
- If the same update reminder has been clearly and explicitly displayed in the current session (judged by current version + build time, latest version + build time first), you can continue to remind in subsequent responses, but weaken it to a short footnote that does not occupy the main content area.
- Do not automatically execute the update command unless the user explicitly requests an update.
- If there are both business data and update reminders in the response, display the user's requested business results first, then attach the update reminder.
Security Rules
- Prohibited from outputting keys (user_key, api_key) in plain text to the terminal.
- Must confirm user intent before performing write/delete operations.