semantic-codebase-intelligence

semantic-codebase-intelligence is a skill for Claude Code, Codex from fabioc-aloha/Alex_Skill_Mall. It costs 81 tokens per session (1,925 once invoked), scanned A, original, MIT.

A structural codebase analysis that maps dependencies, detects architecture boundaries, measures coupling and cohesion, and finds unused code.

In plain words
What is it for?
Use it before refactoring, migrating, or splitting a codebase into modules, or when investigating circular dependencies and accidental complexity.
Why use it?
It shows what depends on what and what might break before you make a large change.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it before refactoring, migrating, or splitting a codebase into modules, or when investigating circular dependencies and accidental complexity.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fabioc-aloha/alex_skill_mall/semantic-codebase-intelligence
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 fabioc-aloha/Alex_Skill_Mall --skill semantic-codebase-intelligence
Clone the repo
git clone --depth 1 https://github.com/fabioc-aloha/Alex_Skill_Mall

Made for: Claude Code, Codex.

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 semantic-codebase-intelligence

README.md
[![agentmods](https://agentmods.dev/badge/skills/fabioc-aloha/alex_skill_mall/semantic-codebase-intelligence/github.svg)](https://agentmods.dev/skills/fabioc-aloha/alex_skill_mall/semantic-codebase-intelligence)
Your own site
<a href="https://agentmods.dev/skills/fabioc-aloha/alex_skill_mall/semantic-codebase-intelligence"><img src="https://agentmods.dev/badge/skills/fabioc-aloha/alex_skill_mall/semantic-codebase-intelligence/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for semantic-codebase-intelligence

Your own site · 80×15
<a href="https://agentmods.dev/skills/fabioc-aloha/alex_skill_mall/semantic-codebase-intelligence"><img src="https://agentmods.dev/badge/skills/fabioc-aloha/alex_skill_mall/semantic-codebase-intelligence.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,925 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.
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.00081 $0.01925
Opus 5 $0.00041 $0.00962
Sonnet 5 $0.00016 $0.00385
Haiku 4.5 $0.00008 $0.00193

Measured 6d ago against content hash 6fc11f533b4f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

semantic-codebase-intelligence 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 6d 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.

plugins/code-quality/semantic-codebase-intelligence/skills/semantic-codebase-intelligence/SKILL.md · 167 lines

How it starts

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

Semantic Codebase Intelligence

Produce a deep structural analysis: what depends on what, where boundaries are, what's unused, and where complexity concentrates.

MANDATORY TELEMETRY: FIRST action → invoke ai-starter-pack-signal with skill_name: "semantic-codebase-intelligence" only, save returned run_id. On ANY exit → invoke again with same run_id + outcome. On cancel → outcome: "partial". Non-blocking — skip silently on failure.

When to Use

  • Before a major refactor, migration, or modularization
  • Investigating tight coupling, circular dependencies, or accidental complexity
  • Answering "what would break if I change this?"

Distinction from Codebase Onboarding

Onboarding creates human-readable documentation. This skill creates structural intelligence — quantified coupling, cohesion, and dependency metrics for engineering decisions.


Process

Step 1: Scope and Discover

  1. Determine scope — entire repo, a module, or a dependency chain from a given file
  2. Detect tech stack — scan build/dependency files to identify languages, frameworks, and module system
  3. Identify entry points — main files, exported APIs, service endpoints, CLI commands

Step 2: Map Components

For each major component/module, record: name, single-sentence purpose, key source files (5-8 max), public surface (exports/APIs), inward dependencies (what it depends ON), and outward dependencies (what depends on IT).

Step 3: Trace Dependencies

  1. Build a dependency graph — use actual imports/requires/references for component-to-component edges
  2. Identify layers — group by architectural role (presentation, business logic, data access, infrastructure, shared)
  3. Detect violations — dependencies crossing layer boundaries in the wrong direction
  4. Find circular dependencies — A → B → C → A chains
  5. Locate architectural boundaries — where clear separations exist (or should exist)

Step 4: Coupling and Cohesion

Metric Assessment
Afferent coupling (Ca) Components depending on this one — high = core/risky
Efferent coupling (Ce) Dependencies this component has — high = fragile
Instability (I) Ce / (Ca + Ce) — 0 = stable, 1 = unstable
Cohesion Do the module's parts serve a single purpose? High/Medium/Low

Read the full file on GitHub · 167 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. 6d ago First seen · 167 lines · 81 tokens per session scan A 6fc11f533b4f

Subscribe to this mod's changes

semantic-codebase-intelligence is a skill published in the GitHub repository fabioc-aloha/Alex_Skill_Mall (4 stars, last pushed 3d ago), licensed MIT. It adds 81 tokens to every session and 1,925 once invoked, about $0.0004 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.