codeTree: Instructions file for Codex

AGENTS.md

codeTree AGENTS.md is an instructions file for Codex, OpenCode from ThinkyMiner/codeTree. It costs 4,091 tokens per session, scanned A, original, MIT.

Project instructions for codeTree, a Python MCP server that uses tree-sitter to give coding agents structured information about source code. It can expose details such as file skeletons, symbols, references, call graphs, and imports.

In plain words
What is it for?
Use it to find classes and functions, read a selected symbol, trace references and calls, or inspect imports across supported source files. The project requires activating its virtual environment before commands.
Why use it?
It lets agents inspect the relevant structure of a codebase without reading every complete file, making code navigation more focused.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions AGENTS.md; mentions Codex.

This is ThinkyMiner/codeTree's own configuration. It tells Codex and OpenCode how to work on codeTree itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything codeTree configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ThinkyMiner/codeTree. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ThinkyMiner/codeTree/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/ThinkyMiner/codeTree

Made for: Codex, OpenCode.

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 codeTree AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/thinkyminer/codetree/agents-md/github.svg)](https://agentmods.dev/instructions/thinkyminer/codetree/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/thinkyminer/codetree/agents-md"><img src="https://agentmods.dev/badge/instructions/thinkyminer/codetree/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for codeTree AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/thinkyminer/codetree/agents-md"><img src="https://agentmods.dev/badge/instructions/thinkyminer/codetree/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,091 This file is loaded in full into every session.
When invoked 4,091 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.04091 $0.04091
Opus 5.5 $0.01636 $0.01636
Sonnet 5.5 $0.00818 $0.00818
Haiku 4.5 $0.00409 $0.00409

Measured 2mo ago against content hash 3c7878c9693a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

codeTree AGENTS.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 2mo 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.

AGENTS.md · 209 lines

How it starts

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

AGENTS.md

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

What This Is

codetree is a Python MCP (Model Context Protocol) server that gives coding agents structured code understanding via tree-sitter. Instead of reading entire files, an agent can ask "what classes are in this file?" or "what does this function call?" and get precise, structured answers.

It exposes 23 tools over MCP:

Tool Purpose Returns
get_file_skeleton(file_path, format?) Classes, functions, methods with line numbers + doc comments; format="compact" omits doc lines class Foo → line 5, "A calculator.", def bar(x, y) (in Foo) → line 7
get_symbol(file_path, symbol_name) Full source of a function/class # path:line\n<source code>
find_references(symbol_name) All usages across the repo file.py:12, other.py:34
get_call_graph(file_path, function_name) What it calls + what calls it → callee, ← file.py:20
get_imports(file_path) Import/use statements with line numbers 1: import os, 2: from pathlib import Path
get_skeletons(file_paths, format?) Skeletons for multiple files in one call; format="compact" omits doc lines === calc.py ===\nclass Foo → line 1
get_symbols(symbols) Full source of multiple symbols # calc.py:1\nclass Foo:
get_complexity(file_path, function_name) Cyclomatic complexity of a function Complexity of foo() in calc.py: 5\n if: 2, for: 1
find_dead_code(file_path?) Symbols defined but never referenced Dead code in calc.py:\n function unused() → line 15
get_blast_radius(file_path, symbol_name) Transitive impact analysis Direct callers:\n main.py: run() → line 4
detect_clones(file_path?, min_lines?) Duplicate/near-duplicate functions Clone group 1 (2 functions, 12 lines each):
search_symbols(query?, type?, parent?, ..., format?) Flexible symbol search; format="compact" omits doc lines calc.py: class Calculator → line 1
find_tests(file_path, symbol_name) Find test functions for a symbol test_calc.py: test_add() → line 3 (name match)
index_status() Graph index freshness and stats {files: 42, symbols: 315, edges: 580}
get_repository_map(max_items?) Compact repo overview for onboarding {languages: {py: 20}, hotspots: [...], start_here: [...]}
resolve_symbol(query, kind?, path_hint?) Disambiguate short name into qualified matches calc.py::Calculator.add → line 11
search_graph(query?, kind?, file_pattern?) Graph search with degree filters and pagination {total: 5, results: [...]}
get_change_impact(symbol_query?, diff_scope?) Impact analysis via symbol or git diff {impact: {CRITICAL: [...], HIGH: [...]}}
analyze_dataflow(file_path, function_name, mode?, depth?) Variable dataflow (mode="flow"), taint analysis ("taint"), or cross-function taint ("cross_taint") {variables, sinks} or {paths: [{verdict, risk}]}
find_hot_paths(top_n?) High-complexity × high-call-count optimization targets file:line — name (complexity=N, callers=M)
get_dependency_graph(file_path?, format?) File-level dependency graph as Mermaid or list graph LR\n main.py --> calc.py
git_history(mode?, file_path?, top_n?, since?, min_commits?) Git blame (mode="blame"), file churn ("churn"), or change coupling ("coupling") Author summary, churn list, or coupled file pairs
suggest_docs(file_path?, symbol_name?) Find undocumented functions with context for doc generation file:line — name(params), calls: [...]

Read the full file on GitHub · 209 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. 2mo ago First seen · 209 lines · 4,091 tokens per session scan A 3c7878c9693a

Subscribe to this mod's changes

codeTree AGENTS.md is an instructions file published in the GitHub repository ThinkyMiner/codeTree (30 stars, last pushed 4mo ago), licensed MIT. It adds 4,091 tokens to every session, about $0.0164 per session on Opus 5.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.

Related

codeTree AGENTS.md compared with instructions from other repositories

codeTree AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
codeTree AGENTS.mdThinkyMiner/codeTreeInstructions file304mo agoMITA4,091Codex, OpenCode
plan-forge database.instructions.mdsrnichols/plan-forgeInstructions file63d agoMITA1,890GitHub Copilot
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot