code-analysis

A code-understanding and refactoring tool that uses a language server, the component that understands a programming language's types and structure. It reports compiler-accurate information instead of relying on guesses.

In plain words
What is it for?
Use it to navigate code, inspect types, find references and call hierarchies, search workspace symbols, apply code actions, rename symbols, and format documents.
Why use it?
It helps locate definitions and usages, inspect types, find diagnostics, and understand relationships across a codebase. This lowers the risk of changing the wrong code during refactoring.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/bug-ops/zeph/code-analysis
Any agent
npx skills add bug-ops/zeph --skill code-analysis
Clone the repo
git clone --depth 1 https://github.com/bug-ops/zeph

Made for: Claude Code, Codex.

Per session 105 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,172 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00105 $0.02172
Opus 5 $0.00053 $0.01086
Sonnet 5 $0.00021 $0.00434
Haiku 4.5 $0.00011 $0.00217

Measured 2d ago against content hash 21c3c46ecd01, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-analysis 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 2d 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.

.zeph/skills/code-analysis/SKILL.md · 200 lines

How it starts

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

Code Analysis with LSP

Use LSP tools for accurate, compiler-verified code understanding. These tools require the mcpls MCP server to be configured.

Positions

Positions are 1-based: line 1, column 1 is the first character. If you read a file and see line numbers in the output, use those directly — no conversion needed (mcpls translates to 0-based LSP positions internally).

File paths must be absolute. Relative paths will not resolve correctly.

Tool Reference

Code Intelligence

Tool Purpose When to use
get_hover Type signature, inferred type, and documentation at a position "What type is X?", "What does this function do?"
get_definition Navigate to where a symbol is defined Read a function/type implementation before reasoning about it
get_references Find all usages of a symbol across the workspace Before renaming, deleting, or changing a symbol's signature
get_completions Context-aware suggestions respecting types and scope Exploring unknown APIs, discovering available methods
get_document_symbols Structured outline of a file (functions, types, constants, fields) Understanding file structure without reading every line
workspace_symbol_search Search for a symbol by name across the entire workspace Know a name but not which file defines it

Diagnostics and Correctness

Tool Purpose When to use
get_diagnostics Real compiler errors and warnings for a file After editing code — always call to verify correctness
get_cached_diagnostics Previously cached diagnostics (no fresh check) Quick check when file has not changed recently
get_code_actions Quick fixes, refactorings, source actions at a position Fix diagnostics automatically, add missing imports

Refactoring

Tool Purpose When to use
rename_symbol Workspace-wide rename with full reference tracking Always prefer over manual find-and-replace
format_document Apply language-specific formatting rules After editing, before committing

Read the full file on GitHub · 200 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. 2d ago First seen · 200 lines · 105 tokens per session scan A 21c3c46ecd01

Subscribe to this mod's changes

code-analysis is a skill published in the GitHub repository bug-ops/zeph (57 stars, last pushed 7d ago), licensed MIT. It adds 105 tokens to every session and 2,172 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-08-30.