askill
serena

serenaSafety 90Repository

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.

57 stars
1.2k downloads
Updated 2/11/2026

Package Files

Loading files...
SKILL.md

Serena - Semantic Code Understanding

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

Execution Methods

# 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

TaskAvoidUse Serena CLI
Find functiongrep "def func"symbol find func --body
List file structurecat file.pysymbol overview file.py
Find usagesgrep "func("symbol refs func
Edit functionEdit toolsymbol replace func --path file.py
RenameManual find/replacesymbol 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

CommandDescription
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

CommandDescription
memory listList 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

CommandDescription
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

CommandDescription
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

CommandDescription
workflow onboardingRun project onboarding
workflow checkCheck onboarding status
workflow tools [--scope all]List available tools

Workflow

Phase 1: Exploration

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

symbol refs MyClass/method            # Impact analysis
memory list                           # Check project knowledge
memory read architecture              # Retrieve context

Phase 3: Modification

symbol find target --body             # Verify target
symbol replace target --path f --body "..."  # Edit
symbol rename old new --path f        # Refactor

Error Handling

{"error": {"code": "ERROR_CODE", "message": "description"}}
Error CodeRecovery
INVALID_ARGSCheck --help
TOOL_NOT_FOUNDUse workflow tools
INIT_FAILEDCheck serena-agent installation
RUNTIME_ERRORCheck error message

Anti-Patterns

ProhibitedCorrect
Read entire file to find functionsymbol find func --body
Grep for function callssymbol refs func
Manual search-replace renamesymbol rename old new --path f
Skip impact analysissymbol refs before editing

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

95/100Analyzed 2/12/2026

A comprehensive and highly actionable skill for semantic code navigation and manipulation using the Serena tool. It includes clear triggers, command references, workflow phases, and error handling.

90
98
85
98
95

Metadata

Licenseunknown
Version-
Updated2/11/2026
PublisherDianel555

Tags

github-actions