Skip to content
Back to skills

Serena

ASecurity

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.

  • 65 stars
  • 0 votes
  • 0 copies
  • 23 views
  • Added February 7, 2026
toolspythonshellbashgitapidocumentation

Works with

  • cli
  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 17 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add Dianel555/DSkills --skill serena --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Serena?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Serena
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dianel555-serena/badge)](https://www.skillsdirectory.com/skills/dianel555-serena)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: serena
description: |
  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.
---

# Serena - Semantic Code Understanding

IDE-like semantic code operations via CLI. Provides symbol-level code navigation, editing, and project memory.

## Execution Methods

```bash
# Prerequisites: pip install serena-agent typer
# Environment: SERENA_PROJECT (default: current directory)

# Symbol operations
python -m skills.serena.tools symbol find MyClass --body
python -m skills.serena.tools symbol overview src/main.py
python -m skills.serena.tools symbol refs MyClass/method
python -m skills.serena.tools symbol rename OldName NewName --path src/file.py

# Memory operations
python -m skills.serena.tools memory list
python -m skills.serena.tools memory read project_overview
python -m skills.serena.tools memory write api_notes --content "..."

# File operations
python -m skills.serena.tools file list --recursive
python -m skills.serena.tools file find "**/*.py"
python -m skills.serena.tools file search "TODO:.*" --path src

# Extended tools
python -m skills.serena.tools cmd run "git status"
python -m skills.serena.tools config read config.json
```

## Tool Routing Policy

### Prefer Serena Over Built-in Tools

| 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` |

### When to Use Built-in Tools
- Simple text search (non-code patterns)
- Configuration files (JSON, YAML)
- Documentation files (Markdown)

## Command Reference

### Symbol Commands
| 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 |

### Memory Commands
| 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 |

### File Commands
| 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 |

### Extended Commands
| 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 |

### Workflow Commands
| Command | Description |
|---------|-------------|
| `workflow onboarding` | Run project onboarding |
| `workflow check` | Check onboarding status |
| `workflow tools [--scope all]` | List available tools |

## Workflow

### Phase 1: Exploration
```bash
symbol overview src/main.py           # Understand file structure
symbol find MyClass --depth 1         # Explore class members
symbol find MyClass/method --body     # Get implementation details
```

### Phase 2: Analysis
```bash
symbol refs MyClass/method            # Impact analysis
memory list                           # Check project knowledge
memory read architecture              # Retrieve context
```

### Phase 3: Modification
```bash
symbol find target --body             # Verify target
symbol replace target --path f --body "..."  # Edit
symbol rename old new --path f        # Refactor
```

## Error Handling

```json
{"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 |

## Anti-Patterns

| 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 |

Files in this skill

  • .env.example297 B
  • README.md3.7 KB
  • SKILL.md5.1 KB
  • tools/__init__.py310 B
  • tools/__main__.py94 B
  • tools/cli/__init__.py2.3 KB
  • tools/cli/cmd.py1 KB
  • tools/cli/config.py1.1 KB
  • tools/cli/file.py1.3 KB
  • tools/cli/memory.py1.5 KB
  • tools/cli/symbol.py3.7 KB
  • tools/cli/workflow.py780 B
  • tools/core.py4.7 KB
  • tools/extended/__init__.py30 B
  • tools/extended/cmd_tools.py3.7 KB
  • tools/extended/config_tools.py4.9 KB
  • tools/output.py402 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.