by trailhq
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.
# Add to your Claude Code skills
git clone https://github.com/trailhq/Trail-CodeGuides for using ai agents skills like Trail-Code.
Last scanned: 10/14/2026
{
"issues": [
{
"type": "npm-audit",
"message": "argparse: Vulnerability found",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "gray-matter: Vulnerability found",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "js-yaml: Vulnerability found",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "sprintf-js: sprintf-js vulnerable to denial of service through unbounded precision specifiers",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "undici: undici vulnerable to Denial of Service via unhandled error in WebSocket permessage-deflate decompression",
"severity": "high"
},
{
"file": "README.md",
"line": 370,
"type": "secret-exfiltration",
"message": "Instruction appears to send credentials/secrets to an external endpoint",
"severity": "medium"
}
],
"status": "WARNING",
"scannedAt": "2026-10-14T09:18:05.532Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}See how Trail-Code compares with popular alternatives.
Trail-Code is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by trailhq. 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 has 11,532 GitHub stars.
Trail-Code returned warnings in SkillsLLM's automated security scan. It has no critical vulnerabilities, but review the flagged issues in the Security Report section before adding it to your workflow.
Clone the repository with "git clone https://github.com/trailhq/Trail-Code" and add it to your Claude Code skills directory (see the Installation section above).
Trail-Code is primarily written in TypeScript. It is open-source under trailhq on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh Trail-Code against similar tools.
No comments yet. Be the first to share your thoughts!
Requires a passing catalog security scan.
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM lists this project for discovery and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
Trail-code gives Claude Code, Cursor, Codex and other coding agents a map of your code, and what your team has learned about it.
| Code map (previously graft) | Learnings | |
|---|---|---|
| What is it? | An index of your code: every function and who calls it, so your agent sees what a change can break | What you, your agents and your team have learned and decided |
| What does it do for your agent? | Takes it straight to the right files | Lets it pick up where you and your team left off |
| Where does it come from? | Your code, read on your machine | Your conversations, as you work |
| Cold agent | Agent with the graft map | |
|---|---|---|
| Tool calls, 162 runs | baseline | 46% fewer |
| Uncached input tokens, 162 runs | baseline | 42% fewer |
| Time, 162 runs | baseline | 60% less |
| SWE-bench Verified, 50 real issues | 27 solved (54%) | 33 solved (66%) |
npm install -g @trailhq/trail-code && trail init
[!NOTE] Graft is now Trail-code. Graft lives on as the graft map, and every
graftcommand still works. What's new is learnings. What changed
| Without Trail-code | With Trail-code |
|---|---|
| Greps and opens file after file to find the code it needs | Gets the right files and functions with your prompt |
| Re-explores code a teammate already figured out last week | Starts from their learning: what they decided, what they ruled out, what to watch out for |
| Undoes a teammate's decision, because it never knew about it | trail check flags it before the PR, quoting who decided it and why |
| Finds out at merge time that a teammate changed the same code | Says so right after it edits code a teammate's open branch also changes, and whether the two clash |
| Has to be told the same things every session | Starts from what you've told it before: trail init finds what you said more than once in your past sessions |
| You write and update CLAUDE.md by hand | Learnings are saved from your conversations, in files you can read |
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
Trail-code has two parts. Both run on your machine.
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, and sees what depends on a file right after it edits it.trail init starts you off with what you told Claude more than once in your past sessions, and what reviewers flagged on more than one of the repo's merged PRs.The graft map tells your agent where things are. Learnings tell it why they are that way, and how the work gets done here.
npm install -g @trailhq/trail-code # install the CLI, once
trail init # in your repo: build the graft map, set up .trail/, wire your agents
[!TIP]
npm install -gsays EACCES? Your Node's global folder needs sudo. Skip sudo, or every upgrade will need it too: runmkdir -p ~/.npm-global && npm config set prefix ~/.npm-global, add~/.npm-global/binto yourPATH, open a new terminal and install again. Trail needs Node 22.3 or newer (20.16 works too).
That is the whole setup. trail init asks which of your coding agents to wire up, builds the graft map from your code, creates .trail/ for the repo's learnings, and adds a statusline and hooks to Claude Code. It also reads your past Claude Code sessions in the repo, once, for what you told Claude more than once, and saves those as learnings. Your own Claude Code does that reading, in about a minute. Then work the way you always do. No daemon, no server, nothing to babysit: it is all files.
On a repo whose team hasn't set up trail yet, trail init asks who it's for. My team, which enter picks, sets it up for you to commit once, as below. Just me keeps all of it out of git for your clone only (in .git/info/exclude) and your learnings in ~/.trail, so there is nothing to commit and nothing asks you to share. Run trail init --team when you want your team on it.
Commit the setup so your teammates get it too. The graft map itself, in graft/, is a local cache like node_modules and is added to .gitignore, so it stays out of the commit:
git add .claude .mcp.json .trail .gitignore .ignore && git commit -m "set up Trail-code"
Teammates' Claude Code reads the learnings in .trail/ even before they install anything, and tells them once how to get the rest.
trail init --dry-run shows the agent wiring it would write. trail init --agents claude wires Claude Code and