skills/using-serena-lsp/SKILL.md
Explores and edits code using semantic tools and LSP plugins. Use when reading code, understanding structure, finding symbols, or performing surgical edits to functions and classes.
npx skillsauth add jaggerxtrm/jaggers-agent-tools using-serena-lspInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Core Principle: Use semantic, symbol-level access to understand and edit code without reading entire files. Combine with LSP plugins for real-time analysis.
Full Tool Documentation: See REFERENCE.md
| Tool | Purpose |
|------|---------|
| get_symbols_overview | Start here. See high-level structure of a file. |
| find_symbol | Read specific functions/classes (set include_body=true). |
| find_referencing_symbols | Find usages before editing. |
| replace_symbol_body | Surgically replace a function/class. |
| insert_after_symbol | Add new code after an existing symbol. |
| search_for_pattern | Regex search when symbol names are unknown. |
🚨 MANDATORY FIRST STEP FOR ALL WORKFLOWS:
Before using ANY Serena semantic tools (get_symbols_overview, find_symbol, replace_symbol_body, etc.), you MUST activate the project:
mcp__plugin_serena_serena__activate_project({ project: "/path/to/current/working/directory" })
Why this is critical: Without project activation, Serena cannot locate code symbols and will fail or loop indefinitely. This step establishes the working context for all symbolic operations.
Avoid reading full files >300 LOC.
mcp__plugin_serena_serena__activate_project()get_symbols_overview(depth=1)find_symbol(name_path="...", include_body=true)think_about_collected_information()mcp__plugin_serena_serena__activate_project() (if not already done)find_symbol(include_body=true) to get current code.find_referencing_symbols() to find usages.replace_symbol_body(...) to update.python -m py_compile).mcp__plugin_serena_serena__activate_project() (if not already done)read_memory() or get_symbols_overview() to understand patterns.find_symbol() to find where to insert.insert_after_symbol(...) to add new class/function.| Lines of Code | Recommended Approach |
|---------------|----------------------|
| < 100 LOC | Read is acceptable. |
| 100-300 LOC | get_symbols_overview → find_symbol. |
| > 300 LOC | Semantic only. Do not read full file. |
Read() on a Python file automatically triggers Pyright analysis. Use the feedback to fix type errors surgically.substring_matching=true if you aren't sure of the exact name.development
Operational service-knowledge system for a project's services. One skill that creates, discovers, activates, updates, and scopes per-service expert skill packages (SKILL.md + diagnostic scripts + references), kept in sync with the code via a GitNexus-aware drift engine. Use when onboarding to a service, routing a task to the right expert, scaffolding a missing skill, or syncing a skill after the implementation drifted. Triggers: /service-skills, /creating-service-skills, /using-service-skills, /updating-service-skills, /scope, or any task that touches a registered service territory.
development
Bootstrap a complete security pipeline (Dependabot + OSV + Semgrep + gitleaks + pre-commit hooks + Codex review) on any GitHub repo. Designed for free user-private repos where GitHub Advanced Security is unavailable. Reusable across Python/TypeScript/Go/Rust stacks.
testing
Merges queued PRs from xt worktree sessions in the correct order (FIFO), maintaining linear history by rebasing remaining PRs after each merge. Use this skill whenever the user has multiple open PRs from xt worktrees, asks to "merge my PRs", "process the PR queue", "drain the queue", "merge worktree branches", or says "what PRs do I have open". Also activate after any xt-end completion when other PRs are already open, or when the user asks "can I merge yet" or "is CI green". Handles the full sequence: list → sort → CI check → merge oldest → rebase cascade → repeat until queue is empty.
testing
Autonomous session close flow for xt worktree sessions. Use this skill whenever the user says "done", "finished", "wrap up", "close session", "ship it", "I'm done", "ready to merge", or similar. Also activate when all beads issues in the session are closed, or when the user explicitly runs /xt-end. This skill is designed for headless/specialist use: it must make deterministic decisions, auto-remediate common anomalies, and avoid clarification questions unless execution is truly blocked.