Skip to main content
prompt GP ChatGPT

10-context-and-prompts — Claude Code prompt: what it does

10-context-and-prompts takes the agent through the CLI prompt layer: reads the builder, repairs context collection on Linux, connects memory from CLAUDE.md. The last step is a script that prints the finished prompt.

no license ★ 3,444 updated 2026-10-14

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/10-context-and-prompts.md
Open on GitHub

What 10-context-and-prompts does

This is a work order for anyone rebuilding the prompt layer of the CLI. Parts A through F cover the whole path: what getSystemPrompt() returns, which sections land in the final text, how tool descriptions and MACRO.ISSUES_EXPLAINER get resolved, and where .claude.md and CLAUDE.md files are picked up.

Part B is the one that bites. src/context.ts collects OS, shell and git data, and some of those paths were written on macOS. On Linux the gathering breaks, so the agent is told to find those spots and fix them. Part D leaves you a way to look at the result: scripts/test-prompt.ts prints the assembled prompt and its length, started with bun scripts/test-prompt.ts.

The memory check is concrete. A test CLAUDE.md goes into the project root, the builder runs, and that memory has to show up in the output. Final verification wants a complete dump with no undefined values and no MACRO. leftovers. Everything assumes you work inside /workspaces/claude-code.

What it helps with

  • map the sections that make up the system prompt
  • fix OS and git context gathering on Linux
  • hook CLAUDE.md memory into the system prompt
  • dump the assembled prompt to see what the model receives
  • clear unresolved MACRO references out of the prompt text

Example prompts for the agent

  • /10-context-and-prompts Do Part A only and show me the signature and return type of getSystemPrompt().
  • /10-context-and-prompts Run Part C: drop a test CLAUDE.md in the root and confirm the memory reaches the output.
  • /10-context-and-prompts Handle Part D and run bun scripts/test-prompt.ts so I can read the full prompt.

How to install 10-context-and-prompts

Manually: put the files in place

.claude/commands/10-context-and-prompts.md

Questions about 10-context-and-prompts

How do I install 10-context-and-prompts in Claude Code?

Put the file in your project at .claude/commands/10-context-and-prompts.md. It then runs as /10-context-and-prompts.

What does 10-context-and-prompts do?

It hands the agent a step-by-step job on the CLI prompt layer: read the builder, repair context collection, connect the memory files, and leave a script that prints the finished prompt.

What do I need before running it?

The project at /workspaces/claude-code and bun, since the inspection script is started with bun scripts/test-prompt.ts.

Similar prompts

All prompts for Agent setup: memory, context, orchestration →

From the same set17

The whole set →
13-bridge-ide 13-bridge-ide is a Claude Code prompt for examining the Bridge connection to IDEs and checking CLI behavior with the feature disabled. It also covers activation notes and Chrome modes. GP ChatGPT ★ 3,444repo stars 16-testing The 16-testing prompt wires up Vitest in the claude-code project and writes tests for shims, tools, commands and context. It fires when the leaked-and-rebuilt source has no test suite at all. GP ChatGPT ★ 3,444repo stars 15-production-bundle 15-production-bundle is a Claude Code prompt for configuring production bundling and packaging of CLI tools for Node.js 20+ and Bun 1.1+. GP ChatGPT ★ 3,444repo stars 11-mcp-integration The 11-mcp-integration prompt guides an investigation of Claude Code’s MCP client and server mode. Use it to inspect configuration and outline a client-to-server test. GP ChatGPT ★ 3,444repo stars 05-env-and-auth 05-env-and-auth sets up environment variables and tests API connectivity in claude-code workspaces. Creates a documented .env.example and builds a test script for Bun. GP ChatGPT ★ 3,444repo stars 07-tool-system 07-tool-system is a Claude Code prompt for auditing the CLI tool interface, registry, and imports. It also asks for a smoke test that loads the available tools. GP ChatGPT ★ 3,444repo stars 06-ink-react-terminal-ui 06-ink-react-terminal-ui — a Claude prompt that follows the React + Ink render path in the claude-code repo, checks the components and theme, and ends with a working terminal render test. GP ChatGPT ★ 3,444repo stars 14-dev-runner The 14-dev-runner prompt configures a development runner for Claude Code to execute TypeScript directly with Bun. It eliminates the need for full production builds during iterative work. GP ChatGPT ★ 3,444repo stars

Project sponsors

Companies that keep this analytics open