spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / mods / agents-md / hooks / frames / nested-frame.ts
11 lines · 398 BRaw
1import type { InstructionFile } from 'claude-code'
2
3/**
4 * An instruction file as a Read attaches it, framed as the engine frames a
5 * nested CLAUDE.md: the text as loaded, trailing newline and all.
6 *
7 * @param file the file
8 * @returns the `Contents of <path>` frame over its text
9 */
10export const nestedFrame = (file: InstructionFile): string =>
11 `Contents of ${file.path}:\n\n${file.content}`