本文へ移動
cccskills
無料GitHub で公開

serena

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.

インストール方法を見る

含まれるファイル(29)

  • SKILL.md7.1 KB
  • .env.example619 B
  • README.md6.8 KB
  • tools/__init__.py310 B
  • tools/__main__.py94 B
  • tools/cli/__init__.py3.4 KB
  • tools/cli/cmd.py1.0 KB
  • tools/cli/config.py1.1 KB
  • tools/cli/dashboard.py5.3 KB
  • tools/cli/file.py1.4 KB
  • tools/cli/memory.py1.5 KB
  • tools/cli/symbol.py3.7 KB
  • tools/cli/workflow.py780 B
  • tools/core.py7.8 KB
  • tools/extended/__init__.py30 B
  • tools/extended/cmd_tools.py3.7 KB
  • tools/extended/config_tools.py4.9 KB
  • tools/output.py402 B
  • tools/paths.py1.5 KB
  • tools/server/__init__.py110 B
  • tools/server/dashboard_server.py14.1 KB
  • tools/tests/__init__.py30 B
  • tools/tests/conftest.py256 B
  • tools/tests/test_cli_dashboard.py3.0 KB
  • tools/tests/test_cli_file.py3.4 KB
  • tools/tests/test_cli_memory.py2.6 KB
  • tools/tests/test_core.py5.4 KB
  • tools/tests/test_module_path.py3.0 KB
  • tools/tests/test_paths.py2.8 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Serena - Semantic Code Understanding

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

Prerequisites

pip install serena-agent typer pyyaml

Quick Start

First-time setup: Launch the Web Dashboard to initialize and register the project:

python -m tools dashboard serve --open-browser

This will:

  • Initialize Serena configuration
  • Register the current project in ~/.serena/serena_config.yml
  • Open the Web Dashboard for monitoring and configuration

Configuration: Edit .env file in skills/serena/ directory:

SERENA_CONTEXT=claude-code
SERENA_MODES=interactive,editing,onboarding
SERENA_PROJECT=.

Usage

Basic Command Structure

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)

Working with Different Projects

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.

Common Operations

# 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

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

Dashboard Commands

CommandDescription
dashboard serve [--open-browser] [--browser-cmd <path>]Start Web Dashboard server
dashboard infoShow current configuration
dashboard toolsList active and available tools
dashboard modesList active and available modes
dashboard contextsList active and available contexts

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 Examples

Phase 1: Exploration

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

Phase 2: Analysis

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

Phase 3: Modification

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

Error Handling

All CLI output is JSON:

// Success
{"result": <data>}

// Error
{"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

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

ace-tool

無料

Semantic codebase search, code indexing, and prompt enhancement via standalone CLI. Use when: (1) Semantic code search with natural language queries, (2) Code indexing for remote codebase retrieval, (3) Prompt enhancement with codebase context, (4) Before grep/find/glob operations for better accuracy, (5) Complex requirements clarification, (6) Large codebase navigation. Triggers: "search context", "enhance prompt", "find code that", "index project", "clarify requirements". IMPORTANT: Always use ace-tool BEFORE grep/find/glob for semantic-level code location.

日本語の概要は準備中です。原文の説明を表示しています。

Dianel555/DSkills652026年10月12日 更新

Incremental LLM-friendly wiki generator for Obsidian note vaults. Use when: (1) Building wiki from notes, (2) Ingesting notes to wiki, (3) Obsidian LLM wiki, (4) Incremental knowledge base management. Triggers: 'build wiki from notes', 'ingest notes to wiki', 'Obsidian LLM wiki', 'incremental knowledge base'.

日本語の概要は準備中です。原文の説明を表示しています。

Dianel555/DSkills652026年10月12日 更新

Self-evolution workflow for the agent. Before substantive work, recall past outcomes from evolution memory; while editing, detect improvement signals; at task end, record the outcome; when reusable, distill or search the EvoMap network for proven genes/capsules. Use when the user starts non-trivial work (a feature, a fix, a refactor) or asks the agent to "evolve", "learn from this", or "remember how this went".

日本語の概要は準備中です。原文の説明を表示しています。

Dianel555/DSkills652026年10月12日 更新

cc-agy

無料

Delegates coding/research tasks to the Google Antigravity CLI (`agy`) for external-model execution (Gemini 3.x, Claude Sonnet/Opus 4.6, GPT-OSS). Replaces the broken `collaborating-with-gemini` skill. Use when: (1) External-model delegation via Antigravity, (2) Multi-model prototyping (switch model per call), (3) Backend/logic implementation, (4) Algorithm design and optimization, (5) Bug analysis and debugging, (6) API/database code generation, (7) Code review. Triggers: "delegate to agy", "use Antigravity", "external model", "agy", "Gemini 3.5", "Claude Sonnet 4.6", "GPT-OSS". IMPORTANT: Always request unified diff patches only. Supports multi-turn sessions via SESSION_ID.

日本語の概要は準備中です。原文の説明を表示しています。

Dianel555/DSkills652026年10月12日 更新

cc-codex

無料

Delegates coding tasks to Codex CLI for prototyping, debugging, and code review. Use when: (1) Backend/logic implementation, (2) Algorithm design and optimization, (3) Bug analysis and debugging, (4) API/database code generation, (5) Code quality review and refactoring. Triggers: "implement algorithm", "debug", "analyze code", "backend task", "API implementation", "optimize performance", "refactor", "generate prototype", "code review". IMPORTANT: Default sandbox="read-only" (analysis/review/patch generation); use sandbox="workspace-write" only when codex must run tests/builds to verify. Always request unified diff patches only. Supports multi-turn sessions via SESSION_ID.

日本語の概要は準備中です。原文の説明を表示しています。

Dianel555/DSkills652026年10月12日 更新

codex-cc

無料

Delegates coding tasks from Codex to local Claude Code in print mode while preserving Claude's normal runtime customizations by default. Use when: (1) You want Codex to call Claude Code locally, (2) You need Claude-side skills, plugins, MCP servers, custom commands, CLAUDE.md rules, or workspace settings to stay active, (3) You want resumable Claude sessions from Codex via SESSION_ID, (4) You need thin `claude mcp` / `claude plugin` passthrough from the same bridge.

日本語の概要は準備中です。原文の説明を表示しています。

Dianel555/DSkills652026年10月12日 更新

Dianel555 のスキルをすべて見る

このスキルの問題を報告する