/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
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install serena-skill - 安装完成后,直接呼叫该 Skill 的名称或使用
/serena-skill触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Serena 是什么?
Use Serena-backed semantic code navigation and editing when working in existing software projects with non-trivial structure, especially multi-file repos whe... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 80 次。
如何安装 Serena?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install serena-skill」即可一键安装,无需额外配置。
Serena 是免费的吗?
是的,Serena 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Serena 支持哪些平台?
Serena 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Serena?
由 juanclaw(@juanclaw)开发并维护,当前版本 v0.1.7。