using-neatcontext

Instructions for connecting NeatContext to a Kimi Code session and loading the selected context safely.

In plain words
What is it for?
Use it at the start of a Kimi Code session to bind the session, select a context, and route later requests according to the available mode.
Why use it?
It ensures requests use the right session context without exposing or reusing the session's internal identifier.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/xtsoftwarelabs/neatcontext-plugins/session-start
Any agent
npx skills add XTSoftwareLabs/neatcontext-plugins --skill session-start
Clone the repo
git clone --depth 1 https://github.com/XTSoftwareLabs/neatcontext-plugins

Made for: Claude Code, Codex.

Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 589 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00027 $0.00589
Opus 5 $0.00014 $0.00295
Sonnet 5 $0.00005 $0.00118
Haiku 4.5 $0.00003 $0.00059

Measured 2d ago against content hash 9120b17d5b81, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

using-neatcontext scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/kimi-code/neatcontext/skills/session-start/SKILL.md · 52 lines

What it actually says

NeatContext runtime

NeatContext is installed for this Kimi Code session.

The current Kimi Code session id is ${KIMI_SESSION_ID}. It is an internal routing token. Never display it, quote it to the user, save it as knowledge, or reuse an id from another session.

Kimi Code does not pass its session id to MCP child processes. At the first user request in this session, call the NeatContext bind_session tool with the exact id above before answering. The tool returns the current selection and routing menu, then replaces itself with the context-dependent tools. Call it once per session, not per request. The bridge process can outlive the session it was bound in, so binding this session's id also re-grounds a bridge left over from an earlier session in the same window — the tool reports this session's selection either way.

After binding:

  • Follow the returned routing mode and menu. The plugin itself does not classify prompts; you decide whether the user's standalone request belongs to one of the listed contexts.
  • In ask mode, name the matching context and ask before switching. In auto mode, switch only on a clear match and tell the user. In manual mode, never switch automatically.
  • Do not route on short replies or follow-ups that continue the current topic.
  • Use preview_context only when two contexts are genuinely plausible.
  • Once a context is selected, call get_context for requests in its scope only when its result is not already present since the latest switch or compaction. Reuse current grounding instead of polling.
  • Read a returned profile in full, search the indicated knowledge folder, cite exact local paths used, and say when saved material does not cover the question.

Contexts are connected inside this Kimi Code session with use_context or the explicit /neatcontext:use command. The plugin uses local Contexts; there is no NeatContext Desktop connection right now.

The plugin commands are /neatcontext:save, /neatcontext:use, /neatcontext:disconnect, /neatcontext:list, /neatcontext:status, /neatcontext:create, /neatcontext:import, /neatcontext:delete, and /neatcontext:mode. Each command delegates to a bundled skill that receives this session id through Kimi Code's skill expansion. Use /neatcontext:save to preserve durable work from the visible conversation; never parse Kimi Code transcript files for that workflow.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 52 lines · 27 tokens per session scan A 9120b17d5b81

Subscribe to this mod's changes

using-neatcontext is a skill published in the GitHub repository XTSoftwareLabs/neatcontext-plugins (13 stars, last pushed 9d ago), licensed MIT. It adds 27 tokens to every session and 589 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.