skills/serena/SKILL.md
Semantic code understanding with IDE-like symbol operations. Use when: (1) Large codebase analysis (>50 files), (2) Symbol-level operations (find, rename, refactor), (3) Cross-file reference tracking, (4) Project memory and session persistence, (5) Multi-language semantic navigation. Triggers: "find symbol", "rename function", "find references", "symbol overview", "project memory". IMPORTANT: Prioritize Serena's symbolic tools over file-based grep/read for code exploration.
npx skillsauth add dianel555/dskills serenaInstall 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.
IDE-like semantic code operations via CLI. Provides symbol-level code navigation, editing, and project memory.
pip install serena-agent typer pyyaml
First-time setup: Launch the Web Dashboard to initialize and register the project:
python -m tools dashboard serve --open-browser
This will:
~/.serena/serena_config.ymlConfiguration: Edit .env file in skills/serena/ directory:
SERENA_CONTEXT=claude-code
SERENA_MODES=interactive,editing,onboarding
SERENA_PROJECT=.
python -m tools [GLOBAL OPTIONS] <command> [COMMAND OPTIONS]
Global Options (must be specified before the command):
-p, --project PATH - Project directory (default: current directory, env: SERENA_PROJECT)-c, --context TEXT - Execution context (auto-detected if not specified, env: SERENA_CONTEXT)-m, --mode TEXT - Operation modes (can be specified multiple times, env: SERENA_MODES)Important: When working with projects in different locations (especially cross-drive on Windows), use --project:
# Correct: Use --project for different project locations
python -m tools --project "/path/to/project" symbol find MyClass
python -m tools --project "E:\MyProject" file search "pattern"
# Incorrect: Don't use --path with absolute paths from different drives
python -m tools file search "pattern" --path "E:\MyProject" # Will fail!
The --path option in subcommands expects relative paths within the project. Always use --project to set the project root first.
# Dashboard
python -m tools dashboard serve --open-browser
python -m tools dashboard info
# Symbol operations
python -m tools symbol find MyClass --body
python -m tools symbol overview src/main.py
python -m tools symbol refs MyClass/method
python -m tools symbol rename OldName NewName --path src/file.py
# Memory operations
python -m tools memory list
python -m tools memory read project_overview
python -m tools memory write api_notes --content "..."
# File operations
python -m tools file list --recursive
python -m tools file find "**/*.py"
python -m tools file search "TODO:.*" --path src
# Extended tools
python -m tools cmd run "git status"
python -m tools config read config.json
| Task | Avoid | Use Serena CLI |
|------|-------|----------------|
| Find function | grep "def func" | symbol find func --body |
| List file structure | cat file.py | symbol overview file.py |
| Find usages | grep "func(" | symbol refs func |
| Edit function | Edit tool | symbol replace func --path file.py |
| Rename | Manual find/replace | symbol rename old new --path file.py |
| Command | Description |
|---------|-------------|
| dashboard serve [--open-browser] [--browser-cmd <path>] | Start Web Dashboard server |
| dashboard info | Show current configuration |
| dashboard tools | List active and available tools |
| dashboard modes | List active and available modes |
| dashboard contexts | List active and available contexts |
| Command | Description |
|---------|-------------|
| symbol find <name> [--body] [--depth N] [--path file] | Find symbols by name |
| symbol overview <path> | List all symbols in file |
| symbol refs <name> [--path file] | Find symbol references |
| symbol replace <name> --path <file> --body <code> | Replace symbol body |
| symbol insert-after <name> --path <file> --content <code> | Insert after symbol |
| symbol insert-before <name> --path <file> --content <code> | Insert before symbol |
| symbol rename <name> <new> --path <file> | Rename symbol |
| Command | Description |
|---------|-------------|
| memory list | List all memories |
| memory read <name> | Read memory content |
| memory write <name> --content <text> | Create/update memory |
| memory edit <name> --content <text> | Edit memory |
| memory delete <name> | Delete memory |
| Command | Description |
|---------|-------------|
| file list [--path dir] [--recursive] | List directory |
| file find <pattern> | Find files by glob pattern |
| file search <pattern> [--path dir] | Search for regex pattern |
| Command | Description |
|---------|-------------|
| cmd run <command> [--cwd dir] [--timeout N] | Execute shell command |
| cmd script <path> [--args "..."] | Execute script file |
| config read <path> [--format json\|yaml] | Read config file |
| config update <path> <key> <value> | Update config value |
| Command | Description |
|---------|-------------|
| workflow onboarding | Run project onboarding |
| workflow check | Check onboarding status |
| workflow tools [--scope all] | List available tools |
python -m tools symbol overview src/main.py # Understand file structure
python -m tools symbol find MyClass --depth 1 # Explore class members
python -m tools symbol find MyClass/method --body # Get implementation details
python -m tools symbol refs MyClass/method # Impact analysis
python -m tools memory list # Check project knowledge
python -m tools memory read architecture # Retrieve context
python -m tools symbol find target --body # Verify target
python -m tools symbol replace target --path f --body "..." # Edit
python -m tools symbol rename old new --path f # Refactor
All CLI output is JSON:
// Success
{"result": <data>}
// Error
{"error": {"code": "ERROR_CODE", "message": "description"}}
| Error Code | Recovery |
|------------|----------|
| INVALID_ARGS | Check --help |
| TOOL_NOT_FOUND | Use workflow tools |
| INIT_FAILED | Check serena-agent installation |
| RUNTIME_ERROR | Check error message |
| Prohibited | Correct |
|------------|---------|
| Read entire file to find function | symbol find func --body |
| Grep for function calls | symbol refs func |
| Manual search-replace rename | symbol rename old new --path f |
| Skip impact analysis | symbol refs before editing |
testing
Time and timezone utilities for getting current time and converting between timezones. Use when: (1) Getting current time in any timezone, (2) Converting time between different timezones, (3) Working with IANA timezone names, (4) Scheduling across timezones, (5) Time-sensitive operations. Triggers: "what time is it", "current time", "convert time", "timezone", "time in [city]".
development
Multi-step reasoning engine for complex analysis and systematic problem solving. Use when: (1) Complex debugging scenarios with multiple layers, (2) Architectural analysis and system design, (3) Problems requiring hypothesis testing and validation, (4) Multi-component failure investigation, (5) Performance bottleneck identification. Triggers: "--think", "--think-hard", "--ultrathink", "analyze step by step", "break down this problem", "systematic analysis". IMPORTANT: Do NOT use for simple single-step tasks.
tools
Enhanced web search and real-time content retrieval via Grok API with forced tool routing. Use when: (1) Web search / information retrieval / fact-checking, (2) Webpage content extraction / URL parsing, (3) Breaking knowledge cutoff limits for current information, (4) Real-time news and technical documentation, (5) Multi-source information aggregation. Triggers: "search for", "find information about", "latest news", "current", "fetch webpage", "get content from URL". IMPORTANT: This skill REPLACES built-in WebSearch/WebFetch with Grok Search tools.
development
High-precision semantic search and content retrieval via Exa API. Use when: (1) Deep research requiring semantic understanding, (2) Code documentation and examples lookup, (3) Company/professional research, (4) AI-powered comprehensive research tasks, (5) URL content extraction with structured output. Triggers: "research", "find papers", "code examples", "company info", "LinkedIn profiles", "deep analysis". Differentiator: Exa excels at semantic/neural search while grok-search is better for real-time news and general web content.