create

A guided command for creating a local NeatContext context around an existing knowledge folder. The context stores a domain profile and points to the folder without copying or moving it.

In plain words
What is it for?
Use it to define the context’s purpose, behavior, and restrictions, connect an existing folder of documents, and choose a name for later use.
Why use it?
It gives an agent a consistent set of instructions and reference material for a particular area of work.

Command

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 commands/xtsoftwarelabs/neatcontext-plugins/create
Clone the repo
git clone --depth 1 https://github.com/XTSoftwareLabs/neatcontext-plugins
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 825 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00012 $0.00825
Opus 5 $0.00006 $0.00413
Sonnet 5 $0.00002 $0.00165
Haiku 4.5 $0.00001 $0.00082

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

Security

Grade B, and why

create scanned grade B with 1 finding 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.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

Ask these three questions **one at a time**, waiting for each answer. Do not run any command until all three are answered.
plugins/claude-code/neatcontext/commands/create.md · 69 lines

What it actually says

Guide the user through creating a Context: one domain profile and one knowledge folder. It is stored locally by the plugin.

This remains the deliberate flow for a fresh context. If the user wants to distill work already present in the current conversation, direct them to /neatcontext:save instead.

Ask these three questions one at a time, waiting for each answer. Do not run any command until all three are answered.

  1. What is this context for? Ask them to describe what it covers, what you should do, what you should avoid, and how you should behave. This becomes the domain profile — your primary behavioral guide whenever the context is connected, so encourage specifics over generalities.
  2. Which folder holds the knowledge? Ask for a path to an existing folder, and tell them to put their TSGs, runbooks, postmortems, or other docs there. The folder is referenced where it is — nothing is copied or moved.
  3. What should the context be called? A short name they will type after /neatcontext:use.

Then, before creating anything:

  • Shape answer 1 into a markdown profile with the sections ## Purpose, ## What to do, ## What to avoid, and ## Behavior, keeping their wording and adding nothing they did not say. Start it with # <context name>.
  • Derive a routing description from that profile: one sentence, under 200 characters, saying what kinds of question belong to this context. Name the systems, symptoms, ticket prefixes, repos, and terminology someone would actually type — this is what a future session matches a request against when deciding whether to switch here.
    • Describe scope only. No instructions about tone, format, or how to answer: this line is read while another context is connected, and behavioral text in it would bleed into unrelated answers.
    • Run /neatcontext:list first and make it contrastive. If a context already covers something adjacent, say what distinguishes this one. Two contexts that both describe themselves as "payments questions" cannot be told apart by anything downstream.
  • Show the drafted profile and the routing description to the user and ask them to confirm or amend both. The profile is the whole behavioral contract of the context, and the routing description decides when it gets used, so they should see both before anything is saved.

Once they confirm, write the profile with the Write tool to a file in your scratchpad directory (e.g. profile.md) — never pass the prose as a command-line argument, it will not survive shell quoting — then run:

node "${CLAUDE_PLUGIN_ROOT}/src/claude/neatcontext-cli.mjs" create --name "<name>" --knowledge "<folder>" --profile-from "<scratchpad>/profile.md" --use-when "<routing description>"

The routing description is a single line, so it does survive quoting — but keep it free of double quotes.

On Windows, strip any trailing backslash from the folder path before quoting it — "C:\docs\" escapes the closing quote and mangles the argument.

Relay the result. On success it prints the exact /neatcontext:use command — show that to the user so they can connect it. Do not connect it yourself.

If it reports a problem (missing folder, duplicate name, empty profile), tell the user what it said, ask for a corrected answer to just that question, and run the command again.

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 · 69 lines · 12 tokens per session scan B 5465de4776b8

Subscribe to this mod's changes

create is a command published in the GitHub repository XTSoftwareLabs/neatcontext-plugins (13 stars, last pushed 9d ago), licensed MIT. It adds 12 tokens to every session and 825 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.