glyph CLAUDE.md

glyph CLAUDE.md is an instructions file for Claude Code from benmyles/glyph. It costs 1,133 tokens per session, scanned A, original, MIT.

Project instructions for Glyph, a Go server that extracts named code elements such as functions, classes, and types from source files. It creates compact maps of code structure so AI coding agents can understand a codebase with less text.

In plain words
What is it for?
Use it when developing or maintaining Glyph, adding language queries, extracting symbols, finding files, or formatting its code maps.
Why use it?
It helps agents inspect the important structure of many files without reading every line. This makes code exploration more focused and uses less context.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

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 instructions/benmyles/glyph/claude-md
Clone the repo
git clone --depth 1 https://github.com/benmyles/glyph

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for glyph CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/benmyles/glyph/claude-md.svg)](https://agentmods.dev/instructions/benmyles/glyph/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/benmyles/glyph/claude-md"><img src="https://agentmods.dev/badge/instructions/benmyles/glyph/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,133 This file is loaded in full into every session.
When invoked 1,133 The same file — it is already loaded in full.
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.1 $0.01133 $0.01133
Opus 5 $0.00566 $0.00566
Sonnet 5 $0.00227 $0.00227
Haiku 4.5 $0.00113 $0.00113

Measured 6d ago against content hash 77560ca64351, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

glyph CLAUDE.md 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 6d 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.

CLAUDE.md · 168 lines

How it starts

The opening of the file, as written. The whole thing — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

glyph is a Model Context Protocol (MCP) server written in Go that extracts symbol outlines from codebases using Tree-sitter's declarative query language. It helps LLM coding agents understand code structure by providing clean, multi-file symbol maps with minimal token usage.

Installation

macOS

Install Go:

$ brew install go

Install the latest version of glyph:

$ GOBIN=/usr/local/bin go install "github.com/benmyles/glyph@latest"

Architecture

The project uses a modern, declarative approach:

  • Tree-sitter queries (queries.go) - Declarative patterns for symbol extraction
  • MCP Go SDK (github.com/mark3labs/mcp-go) for the Model Context Protocol server implementation
  • Modular design with clear separation of concerns

Key Components

  • queries.go - Language-specific Tree-sitter query patterns
  • symbol_extractor.go - Query-based symbol extraction engine
  • file_utils.go - File discovery and language detection
  • types.go - Core data structures (Symbol, DetailLevel)
  • formatter.go - Output formatting for different detail levels
  • extract_symbols.go - Main extraction orchestration
  • main.go - CLI and MCP server entry points

Development Commands

Building

make build

Running Tests

make test

Installing

make install DESTDIR=/usr/local/bin

Cleaning

make clean

Manual commands (if needed)

go build         # Build manually
go test ./...    # Run tests manually
go mod download  # Install dependencies
go mod tidy      # Update dependencies

Key Implementation Notes

Query-Based Symbol Extraction

  • Uses Tree-sitter's S-expression query syntax for precise symbol matching
  • Each language has dedicated query patterns in queries.go
  • Queries capture symbol names and types declaratively
  • Much simpler and more maintainable than manual AST traversal

Read the full file on GitHub · 168 lines

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. 6d ago First seen · 168 lines · 1,133 tokens per session scan A 77560ca64351

Subscribe to this mod's changes

glyph CLAUDE.md is an instructions file published in the GitHub repository benmyles/glyph (24 stars, last pushed 1y ago), licensed MIT. It adds 1,133 tokens to every session, about $0.0057 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.