Claude Code config

Trail Code

One shared memory for every coding agent on your team. Claude Code, Cursor and Codex get a map of your code and your team's past decisions, so they pick up where you left off.

11,064 stars 984 forksConfig & memory Source

Install

Install
npm install -g @trailhq/trail-code && trail init

Found in the project README. Check it for setup steps after installing.

From source
git clone https://github.com/trailhq/Trail-Code.git

From the README

The self-learning context layer for coding agents.

Trail-code gives Claude Code, Cursor, Codex and other coding agents a map of your code, and what your team has learned about it.

46% fewer tool calls, 60% less time, and more real issues solved.

Graft is now Trail-code. Graft lives on as the graft map, and every graft command still works. What's new is learnings. What changed

What changes in your agent

Same model, more tasks solved. On SWE-bench Verified (real GitHub issues, graded by the maintainers' own tests), Claude Sonnet 5 solved 33 of 50 issues with the graft map and 27 of 50 without it, using 23% fewer tokens. Details

Cheaper and faster. Across 162 runs of the same agent on the same tasks: 32% lower cost, 42% fewer uncached input tokens, 60% less time, and the same share of correct answers. On PocketBase, 15 real tasks ran 21% cheaper and 14% faster. Details

Contents

- How it works
- Quick start
- Part 1: The graft map, your code
- Part 2: Learnings, what you, your agents and your team know
  - Learnings and skills, three places · One decision, two teammates · A learning is a file · Your agent does the saving
- Your team
- What stays on your machine
- Benchmark · SWE-bench Verified · Tested on popular repos
- FAQ
- Reference: How the graph gets built · Supported languages · What's in a node · What runs where · Agent integration · CLI · Search & orient · Monorepos · Visualize it · Development

How it works

Trail-code has two parts. Both run on your machine.

1. The graft map: your code. trail init parses your repo with tree-sitter into a map of every file, function and who calls what. No model, no API key. It refreshes itself when the code changes, uncommitted edits included. Your agent gets pointers to the matching files and functions with each prompt,…
Read the full README on GitHub

Details

Language
TypeScript
License
MIT
Last updated
3 November 2026
Topics
ai-agentsanthropicclaude-codeclicode-graphcodexcontext-engineeringcursordeveloper-toolsgeminiknowledge-graphllm

FAQ

What is Trail Code?

One shared memory for every coding agent on your team. Claude Code, Cursor and Codex get a map of your code and your team's past decisions, so they pick up where you left off. It is a config for Claude Code, from trailhq/Trail-Code on GitHub.

How do I install Trail Code?

Run npm install -g @trailhq/trail-code && trail init, then follow the setup in the README.

Is Trail Code popular?

trailhq/Trail-Code has 11,064 GitHub stars and 984 forks, and is included in 1 curated Claude Code list. It was last updated on 3 November 2026.

More config & memory

Browse the most popular Claude Code mods, all config & memory, or the skills and MCP server directories.