serena-code-architecture

serena-code-architecture is a skill for Claude Code from rjmurillo/ai-agents. It costs 91 tokens per session (2,092 once invoked), scanned A, original, MIT.

A workflow for mapping a project's architecture, including its components and dependencies.

In plain words
What is it for?
Use it to trace component relationships, inspect code structure, and optionally save architectural knowledge for later use.
Why use it?
It helps make an unfamiliar codebase easier to understand before changing it or documenting it.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Part of the project-toolkit plugin — 95 skills, 26 commands, 33 agents, 4 hooks shipped together

Good fit Use it to trace component relationships, inspect code structure, and optionally save architectural knowledge for later use.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rjmurillo/ai-agents/serena-code-architecture
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add rjmurillo/ai-agents --skill serena-code-architecture
Clone the repo
git clone --depth 1 https://github.com/rjmurillo/ai-agents

Made for: Claude Code.

Or install project-toolkit, the plugin that ships this one along with the rest of its 95 skills, 26 commands, 33 agents, 4 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for serena-code-architecture

README.md
[![agentmods](https://agentmods.dev/badge/skills/rjmurillo/ai-agents/serena-code-architecture.svg)](https://agentmods.dev/skills/rjmurillo/ai-agents/serena-code-architecture)
Your own site
<a href="https://agentmods.dev/skills/rjmurillo/ai-agents/serena-code-architecture"><img src="https://agentmods.dev/badge/skills/rjmurillo/ai-agents/serena-code-architecture.svg" alt="Measured on agentmods" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,092 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00091 $0.02092
Opus 5 $0.00046 $0.01046
Sonnet 5 $0.00018 $0.00418
Haiku 4.5 $0.00009 $0.00209

Measured 4d ago against content hash 3ed05926c2ca, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

serena-code-architecture scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/serena-code-architecture/SKILL.md · 284 lines

How it starts

The opening of the file, as written. The whole thing — 284 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Architectural Analysis with Serena + Forgetful

This skill guides systematic architectural analysis using Serena's symbol-level understanding, with optional persistence to Forgetful's knowledge graph.

Triggers

Trigger Phrase Operation
analyze the architecture of this project Full 6-phase analysis workflow
map out the codebase structure Phase 1-3 discovery and component mapping
trace dependencies for this component Phase 4 dependency tracing
create architecture memories Phase 5-6 memory and entity creation
what components does this project have Phase 3 core component mapping

When to Use This Skill

Use this skill when:

  • Analyzing a new codebase before implementing changes
  • Documenting existing architecture for a project
  • Creating component entities and relationships in Forgetful
  • Understanding dependencies and call hierarchies
  • Building a knowledge graph from code structure

Use using-serena-symbols instead when:

  • Quick symbol lookup without memory persistence
  • Finding a specific class or method definition
  • Tracing references for a single symbol

Analysis Workflow

Phase 1: Project Structure Discovery

Understand the high-level layout:

# Get directory structure
mcp__plugin_serena_serena__list_dir({
  "relative_path": ".",
  "recursive": false
})

# Identify key directories (src/, app/, lib/, etc.)
mcp__plugin_serena_serena__list_dir({
  "relative_path": "src",
  "recursive": true
})

Goal: Identify entry points, main modules, and organizational patterns.

Phase 2: Entry Point Analysis

Find the application entry points:

# Look for main/app files
mcp__plugin_serena_serena__search_for_pattern({
  "substring_pattern": "if __name__.*==.*__main__|def main\\(|app\\s*=\\s*FastAPI|createApp",
  "restrict_search_to_code_files": true
})

# Get symbols from entry file
mcp__plugin_serena_serena__get_symbols_overview({
  "relative_path": "src/main.py",
  "depth": 1
})

Read the full file on GitHub · 284 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 284 lines · 91 tokens per session scan A 3ed05926c2ca

Subscribe to this mod's changes

serena-code-architecture is a skill published in the GitHub repository rjmurillo/ai-agents (45 stars, last pushed today), licensed MIT. It adds 91 tokens to every session and 2,092 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.