code-analysis

code-analysis is a skill for Claude Code, Codex from Dqz00116/skill-lib. It costs 19 tokens per session (2,496 once invoked), scanned A, original, MIT.

A structured way to study unfamiliar code, its architecture, and its important components. It uses code structure and reference counts to focus attention before refactoring or documenting a system.

In plain words
What is it for?
Use it to analyze modules, identify core components, document implementation details, understand design patterns, and prepare code for refactoring or integration.
Why use it?
Large or unfamiliar codebases are difficult to understand line by line. Focusing first on central modules and frequently referenced components gives a clearer picture of how the system is organized.

Skill for Claude CodeCodex

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

Good fit Use it to analyze modules, identify core components, document implementation details, understand design patterns, and prepare code for refactoring or integration.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dqz00116/skill-lib/code-analysis
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 Dqz00116/skill-lib --skill code-analysis
Clone the repo
git clone --depth 1 https://github.com/Dqz00116/skill-lib

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 code-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/dqz00116/skill-lib/code-analysis/github.svg)](https://agentmods.dev/skills/dqz00116/skill-lib/code-analysis)
Your own site
<a href="https://agentmods.dev/skills/dqz00116/skill-lib/code-analysis"><img src="https://agentmods.dev/badge/skills/dqz00116/skill-lib/code-analysis/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 code-analysis

Your own site · 80×15
<a href="https://agentmods.dev/skills/dqz00116/skill-lib/code-analysis"><img src="https://agentmods.dev/badge/skills/dqz00116/skill-lib/code-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,496 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.00019 $0.02496
Opus 5.5 $0.00008 $0.00998
Sonnet 5.5 $0.00004 $0.00499
Haiku 4.5 $0.00002 $0.00250

Measured 1mo ago against content hash 888fdc1fa5a9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (attention_focus.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

code-analysis/SKILL.md · 368 lines

How it starts

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

Code Analysis Skill

Overview

Standardized workflow for reading, analyzing, and documenting codebases with attention-driven focus.

When to Use

Use this skill when you need to:

  • Understand a new code module or system
  • Analyze architecture and design patterns
  • Document technical implementation details
  • Prepare for code refactoring or integration
  • Create technical documentation for teams
  • Focus on core components (high-attention code analysis)

Attention-Driven Code Analysis (NEW in v1.2)

Identify core components in code using heuristic rules, optimizing analysis focus.

Attention Scoring System

# Use the attention_focus.py module
from attention_focus import CodeAttentionScorer

scorer = CodeAttentionScorer()
components = scorer.analyze_code_structure(file_content, file_name)
focus = scorer.get_analysis_focus(components)

Scoring Criteria

Factor Weight Description
Core Keywords +3 Manager, Controller, Handler, System, Core
Important Keywords +2 Helper, Util, Factory, Provider
Lines of Code +2 (>100 lines) / +1 (50-100 lines) Scale metric
Reference Count +2 (>5 refs) / +1 (2-5 refs) Dependency metric
Complexity +1 Methods>10 or Conditional statements>5

Attention Levels

Level Score Analysis Depth
High 8-10 Detailed analysis + Full code + Design principles
Medium 5-7 Focused analysis + Key code snippets
Low 0-4 Brief mention + Function description

Workflow with Attention Focus

1. Read code file
       ↓
2. Run attention_focus.py analysis
       ↓
3. Get prioritized component list
       ↓
4. Analyze HIGH attention components in detail
5. Analyze MEDIUM attention components briefly
6. Reference LOW attention components as needed
       ↓
7. Generate focused documentation

Benefits

  • Reduce token consumption: Focus on 20% core code that provides 80% value
  • Faster analysis: Skip boilerplate and utility code
  • Better documentation: Highlight architectural decisions and critical paths
  • Estimated improvement: 20-30% token reduction, 30% faster analysis

Read the full file on GitHub · 368 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 368 lines · 19 tokens per session scan A 888fdc1fa5a9

Subscribe to this mod's changes

code-analysis is a skill published in the GitHub repository Dqz00116/skill-lib (22 stars, last pushed 4mo ago), licensed MIT. It adds 19 tokens to every session and 2,496 once invoked, about $0.0001 per session on Opus 5.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.