CommunityCoding & Developmentgithub.com

context

Open a local page with the context tree of this project, for each mode of the main session and each agent, showing what is loaded at start (Claude Code's own files, the hecpack hook, the agent body) and what it may read by link. It also lists the files that cost most, the rules by path, the docs nobody reads and the repeated text, with the change since the last run. A script builds it with no model call. Use when the user runs /hecpack:context or asks how much context an agent or mode starts wit

What is context?

context is a Claude Code agent skill that open a local page with the context tree of this project, for each mode of the main session and each agent, showing what is loaded at start (Claude Code's own files, the hecpack hook, the agent body) and what it may read by link. It also lists the files that cost most, the rules by path, the docs nobody reads and the repeated text, with the change since the last run. A script builds it with no model call. Use when the user runs /hecpack:context or asks how much context an agent or mode starts wit.

Works with✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Hecmatyar/hecpack/tree/HEAD/skills/context

Installed? Explore more Coding & Development skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

hecpack context

The page in the user's language

The page comes in the language the user writes in; for English skip this step. Otherwise, with <lang> the code of that language (ru, de, pt-BR):

node "${CLAUDE_PLUGIN_ROOT}/scripts/i18n.mjs" --lang <lang> --dir "${CLAUDE_PLUGIN_DATA}/i18n" --pages context

When count is above 0, translate every value of missing, short and plain, keeping each {placeholder} and the product, command and file names as they are (each key under plurals is one number category: write that grammatical form). Store them all in one call, then resend whatever comes back under rejected, fixed:

node "${CLAUDE_PLUGIN_ROOT}/scripts/i18n.mjs" --lang <lang> --dir "${CLAUDE_PLUGIN_DATA}/i18n" --merge <<'JSON'
{"context.title": "...", ...}
JSON

The translation stays in the plugin's data folder: this happens once per language, and again only for strings a hecpack update adds or changes.

Build and open

One command, no analysis by you (--lang <lang> drops out for English):

node "${CLAUDE_PLUGIN_ROOT}/scripts/context-tree.mjs" --project "${CLAUDE_PROJECT_DIR}" --out "${CLAUDE_PLUGIN_DATA}/context" --lang <lang> --open $ARGUMENTS

The script reads the project's .md files, the context map (.claude/hecpack/context-map.json, or .claude/context-map.json in a setup of the same format), the agents, the rules and the auto memory index, and writes the page, report.json and a short history into the plugin's data folder. Nothing in the project changes.

The page lists, for each reader, what loads at start: CLAUDE.md files and their imports, rules without paths:, the memory index, the agent and skill lists, the hook's files for the prompt tag or the agent, and the agent's own instructions. Next to it is what those files link to, with the line that says when to read it. Then come the files that cost most at start (tokens times readers), every file with its readers, the rules that load by path, the docs nobody reaches, the pairs of files that repeat each other, and a warning where the hook's parts are too few for a reader's files. Tokens are characters / 4, an estimate.

Retell the script's summary lines in the user's language, keeping the numbers as they are, and give the page path. Add nothing unless the user asks what to trim; then name the top two or three rows of «what costs most» and the repeats, one line each, and change nothing. If the script fails, show its error line and stop.

Related Skills