serena

serena is an agent for coding agents from svyatov/handrail. It costs 0 tokens per session (525 once invoked), scanned A, original, MIT.

A repository-navigation agent for Go code that uses an LSP, a tool that understands code structure, through gopls. It can find symbols, locate references, and replace a function or method body.

In plain words
What is it for?
Use it to navigate symbols and their references, make focused body replacements, and check the Serena project setup.
Why use it?
It reduces the need to search through Go files manually when tracing or changing code.

Agent

Part of the handrail plugin — 2 skills, 4 agents, 1 hook shipped together

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 agents/svyatov/handrail/serena
Clone the repo
git clone --depth 1 https://github.com/svyatov/handrail

Or install handrail, the plugin that ships this one along with the rest of its 2 skills, 4 agents, 1 hook.

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 serena

README.md
[![agentmods](https://agentmods.dev/badge/agents/svyatov/handrail/serena.svg)](https://agentmods.dev/agents/svyatov/handrail/serena)
Your own site
<a href="https://agentmods.dev/agents/svyatov/handrail/serena"><img src="https://agentmods.dev/badge/agents/svyatov/handrail/serena.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 525 The whole file, excluding the scripts and references it only reads on demand.
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 $0.00000 $0.00525
Opus 5 $0.00000 $0.00262
Sonnet 5 $0.00000 $0.00105
Haiku 4.5 $0.00000 $0.00052

Measured 5d ago against content hash e2d636e4b763, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

serena 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 5d 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.

docs/agents/serena.md · 50 lines

How it starts

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

Serena

Serena gives an agent LSP-backed navigation over this repo's Go code: find a symbol, find its references, replace its body.

It is optional. Nothing in task test, task lint, or CI touches it. The repo builds without it.

Setup

Serena needs gopls on PATH. It does not install it:

go install golang.org/x/tools/gopls@latest

Start the server with the claude-code context. That context drops Serena's own file and shell tools, which duplicate the ones a harness already has:

serena start-mcp-server --context=claude-code --project-from-cwd

On first load Serena writes .serena/, detects Go, and starts gopls. To confirm the setup, run serena project health-check .. It ends in Health check passed.

.serena/ is not committed

Serena rewrites .serena/project.yml into its own annotated form every time it loads the project. A hand-edited file does not survive that. The whole directory is gitignored, so there is nothing to keep in sync. This page is the setup, and Serena generates the rest.

To override a setting for yourself, write it to .serena/project.local.yml. That file takes precedence over project.yml key by key, and Serena does not regenerate it.

What is deliberately unset

  • ignored_paths. The default ignore_all_files_in_gitignore: true already covers the built binary, cover.out, dist/, and the worktree directory. The symbol index reads only .go files, of which this repo has fifteen.
  • excluded_tools. The claude-code context already drops the duplicated tools.
  • initial_prompt and memories/. CLAUDE.md, CONTEXT.md, and the rest of docs/agents/ carry the vocabulary, the source-of-truth pointers, and the commands. Filling Serena's knowledge layer would duplicate them.
  • activation_command and ls_specific_settings. Serena honours both only for a project matched by trusted_project_path_patterns in the user's global serena_config.yml.

Read the full file on GitHub · 50 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. 5d ago First seen · 50 lines · 0 tokens per session scan A e2d636e4b763

Subscribe to this mod's changes

serena is an agent published in the GitHub repository svyatov/handrail (2 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 525 tokens. 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-31.

Related

Other agents, from other repositories

developer

Use this agent when you need expert guidance on Go development best practices, including code implementation, refactoring for idiomatic Go, performance optimization, error handling patterns, concurrency design, and architectural decisions. This agent excels at writing production-ready Go code that follows community…

jaswdr/faker · 377 tokens

pm

Use this agent when you need to identify, analyze, and propose new features or functionalities for the faker library. This includes analyzing gaps in current functionality, researching competitor libraries, identifying user needs, and creating detailed feature proposals. Examples:\n\n \nContext: The user wants to…

jaswdr/faker · 350 tokens

reviewer

Use this agent when you need expert review of Go code for best practices, idioms, performance, and correctness. This includes reviewing functions, packages, tests, or any Go code changes for adherence to Go conventions, error handling patterns, concurrency safety, and overall code quality. Examples:\n\n \nContext: The…

jaswdr/faker · 354 tokens

architect

Go CLI architecture specialist for system design, package structure, and technical decision-making. Use PROACTIVELY when planning new features, refactoring, or making architectural decisions.

future-architect/uzomuzo-oss · 36 tokens

planner

Expert planning specialist for Go CLI features and refactoring. Use PROACTIVELY when users request feature implementation, architectural changes, or complex refactoring.

future-architect/uzomuzo-oss · 32 tokens

code-reviewer

Go code review specialist. Proactively reviews code for quality, DDD compliance, idioms, and security. Use immediately after writing or modifying code.

future-architect/uzomuzo-oss · 34 tokens