Create context
The bundled CLI path and Kimi session id below are expanded by Kimi Code at skill activation.
Keep this workflow distinct from /neatcontext:save: create starts from user-provided purpose and existing knowledge; save distills work already in the conversation.
Collect these inputs, asking one question at a time only for information the user has not already supplied:
- What the context covers, what Kimi Code should do and avoid, and how it should behave.
- The path to an existing folder containing its knowledge.
- A short context name.
Run list before drafting so the routing description can distinguish adjacent contexts:
KIMI_PLUGIN_ROOT="${KIMI_SKILL_DIR}/../.." kimi __plugin_run_node "${KIMI_SKILL_DIR}/../../src/kimi/neatcontext-cli.mjs" -- --session-id "${KIMI_SESSION_ID}" list
Draft a Markdown profile beginning with # <name> and containing ## Purpose, ## What to do, ## What to avoid, and ## Behavior. Preserve the user's meaning and add no unsupported rules.
Draft one routing description under 200 characters. Describe scope only, using systems, symptoms, repos, ticket prefixes, and terminology someone would type. Make it contrastive with existing contexts. Do not include tone, behavior, or output-format instructions.
Show both drafts and wait for confirmation.
After confirmation, write the profile to a unique temporary Markdown file. Prefer a host scratch directory; otherwise use the workspace and remove the file after the CLI finishes. Run:
KIMI_PLUGIN_ROOT="${KIMI_SKILL_DIR}/../.." kimi __plugin_run_node "${KIMI_SKILL_DIR}/../../src/kimi/neatcontext-cli.mjs" -- --session-id "${KIMI_SESSION_ID}" create --name "<name>" --knowledge "<folder>" --profile-from "<profile-file>" --use-when "<routing-description>"
Pass each value as one argument. On Windows, remove a trailing backslash from the knowledge-folder argument before quoting it.
Relay the result and remove only the temporary profile file. Do not connect the new context automatically.