/install serena-skill
\r \r
Serena\r
\r Use Serena as the first choice for understanding and editing existing codebases when the necessary tools are available.\r \r
What this skill is for\r
\r Use this skill when another agent needs to integrate Serena into its normal coding workflow instead of treating the repo as a pile of text files.\r \r Aim for this behavior:\r \r
- activate the project once\r
- inspect structure semantically before reading large files\r
- trace references before editing\r
- prefer symbol-scoped edits when possible\r
- fall back to normal file tools only when Serena is missing a capability or fails\r
\r
For extra examples and trigger patterns, read
references/integration-patterns.md.\r \r
Core workflow\r
\r
- Resolve the target project path.\r
- Call
serena_activate_project.\r - Start with structure discovery:\r
serena_project_overview\rserena_find_symbol\rserena_list_dir\rserena_find_file\rserena_session_statuswhen you need to inspect active Serena sessions\r
- Narrow scope with:\r
serena_find_references\rserena_search_pattern\rserena_read_symbol\rserena_read_file\r
- Prefer semantic edits when changing existing code:\r
serena_replace_symbol_body\rserena_insert_before_symbol\rserena_insert_after_symbol\rserena_rename_symbol\r
- Use broader edit tools only when symbol-scoped tools are not a good fit:\r
serena_replace_content\rserena_create_text_file\r
- Use
serena_execute_shell_commandonly as an advanced escape hatch when project-context shell execution is genuinely the right tool.\r - Use
serena_call_toolonly when the normalized surface does not cover the needed Serena capability.\r - Fall back to ordinary file tools only when Serena cannot answer safely or reliably.\r \r
When Serena is worth the overhead\r
\r Prefer Serena when:\r \r
- the project spans multiple files\r
- the user asks about references, call chains, or symbol relationships\r
- the user wants a precise edit to an existing class, function, method, or module\r
- reading whole files would be noisy or wasteful\r
- the repo already has real structure and semantic lookup is available\r \r Skip or delay Serena when:\r \r
- the task is a tiny one-file change and the target location is already obvious\r
- you are creating a brand-new file with little dependency on existing code\r
- Serena is unavailable or failing and direct file tools are simpler\r
- the user already provided the exact file region and semantic lookup adds no value\r \r
Tool preference order\r
\r For existing codebases, prefer this order:\r \r
serena_activate_project\rserena_project_overview/serena_find_symbol/serena_find_file\rserena_find_references/serena_search_pattern\rserena_read_symbol/serena_read_file\r- symbol-scoped edit tools\r
- broader Serena edit tools\r
serena_session_statusfor session inspection/debugging\rserena_execute_shell_commandonly when semantic tools are not the right mechanism\r- fallback to
read,edit, andexeconly when needed\r \r
Integration guidance for agent authors\r
\r When you want another agent to use Serena well, instruct it to:\r \r
- activate the project before semantic reads or edits\r
- inspect symbols and references before modifying code\r
- use normalized Serena tools first\r
- keep edits narrow and structured\r
- avoid whole-file rewrites when a symbol-scoped edit is possible\r
- treat passthrough as an escape hatch, not the default workflow\r \r A good instruction pattern is:\r \r
Use Serena on the repo. Start with
serena_activate_project, then narrow scope withserena_find_symbol,serena_find_references, andserena_read_symbolbefore editing.\r \r
Practical usage patterns\r
\r
Understand a repo area\r
\r Use this sequence:\r \r
serena_activate_project\rserena_find_fileorserena_list_dir\rserena_project_overview\rserena_find_symbol\rserena_read_symbol\r \r
Trace impact before changing code\r
\r Use this sequence:\r \r
serena_find_symbol\rserena_find_references\rserena_search_patternif naming or text-level usage matters\rserena_read_symbolfor the most relevant callers/callees\r \r
Make a targeted edit\r
\r Use this sequence:\r \r
- locate the exact symbol\r
- read the symbol body\r
- inspect references if behavior changes could ripple outward\r
- choose the narrowest valid edit tool\r
- re-read the changed symbol or nearby references when confidence is low\r \r
Editing rules\r
\r
- Keep edits as narrow as possible.\r
- Prefer symbol-targeted edits over text replacement across a whole file.\r
- Prefer semantic rename over manual multi-file rename logic.\r
- Re-read the relevant symbol or references after a material edit when confidence is low.\r
- If semantic identity is ambiguous, do not guess; disambiguate using path or extra lookup.\r
- In read-only mode, do not attempt mutating Serena tools.\r \r
Safety and fallback behavior\r
\r If Serena fails:\r \r
- Explain briefly what failed.\r
- Fall back to standard file-based workflow.\r
- Keep using the smallest possible read/edit scope.\r
- Do not pretend the semantic result was confirmed if it was not.\r \r If a raw Serena passthrough tool is available:\r \r
- use it only when the normalized tool surface does not cover the needed capability\r
- prefer stable normalized tools for repeated workflows\r
- avoid passthrough for routine actions that already have a clear normalized tool\r
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install serena-skill - After installation, invoke the skill by name or use
/serena-skill - Provide required inputs per the skill's parameter spec and get structured output
What is Serena?
Use Serena-backed semantic code navigation and editing when working in existing software projects with non-trivial structure, especially multi-file repos whe... It is an AI Agent Skill for Claude Code / OpenClaw, with 80 downloads so far.
How do I install Serena?
Run "/install serena-skill" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Serena free?
Yes, Serena is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Serena support?
Serena is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Serena?
It is built and maintained by juanclaw (@juanclaw); the current version is v0.1.7.