bazinga: Skill for Claude Code

.claude/skills/codebase-analysis/SKILL.md

codebase-analysis is a skill for Claude Code from mehdic/bazinga. It costs 19 tokens per session (558 once invoked), scanned A, original, MIT.

A codebase analysis tool that examines an existing project for similar features, reusable utilities, and established design patterns.

In plain words
What is it for?
Use it to find related files and functions, identify patterns to follow, and produce implementation guidance for a requested task.
Why use it?
It helps an agent understand how the project is structured before changing it, reducing duplicated or inconsistent code.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

This is mehdic/bazinga's own configuration. It tells Claude Code how to work on bazinga itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything bazinga configures →

Reuse

Borrowing it

Nothing to install: this file belongs to mehdic/bazinga. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/mehdic/bazinga/main/.claude/skills/codebase-analysis/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/mehdic/bazinga

Made for: Claude Code.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/mehdic/bazinga/codebase-analysis"><img src="https://agentmods.dev/badge/skills/mehdic/bazinga/codebase-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 558 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.00558
Opus 5.5 $0.00008 $0.00223
Sonnet 5.5 $0.00004 $0.00112
Haiku 4.5 $0.00002 $0.00056

Measured 2mo ago against content hash 2fb542e97bc1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

codebase-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 2mo ago.

The scan reads SKILL.md. This mod also ships 8 executable files (scripts/analyze_codebase.py, scripts/analyze.ps1, scripts/analyze.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.

.claude/skills/codebase-analysis/SKILL.md · 89 lines

How it starts

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

Codebase Analysis Skill

You are the codebase-analysis skill. Your role is to analyze a codebase and provide developers with relevant context for their implementation tasks.

When to Invoke This Skill

  • Developer needs to understand existing patterns before implementation
  • Complex features require architectural guidance
  • Reusable utilities need to be discovered
  • Similar features exist that could be referenced

Your Task

When invoked with a task description and session ID, you must:

Step 1: Execute Analysis Script

python3 .claude/skills/codebase-analysis/scripts/analyze_codebase.py \
  --task "$TASK_DESCRIPTION" \
  --session "$SESSION_ID" \
  --cache-enabled

Note: Output path defaults to bazinga/artifacts/{session_id}/skills/codebase-analysis/report.json (session-isolated)

Step 2: Read Analysis Results

# Read from session-isolated artifact directory
cat bazinga/artifacts/$SESSION_ID/skills/codebase-analysis/report.json

Step 3: Return Actionable Summary

Return a concise summary including:

  • Similar features found (with file paths and similarity %)
  • Reusable utilities (with function names)
  • Architectural patterns to follow
  • Suggested implementation approach

Example Output Format

CODEBASE ANALYSIS COMPLETE

## Similar Features Found
- User registration (auth/register.py) - 85% similarity
  * Email validation pattern
  * Token generation approach
  * Database transaction handling

## Reusable Utilities
- EmailService (utils/email.py) - send_email(), validate_email()
- TokenGenerator (utils/tokens.py) - generate_token(), verify_token()

## Architectural Patterns
- Service layer pattern (business logic in services/)
- Repository pattern for data access

## Suggested Implementation Approach
1. Create PasswordResetService in services/
2. Reuse EmailService for sending reset emails
3. Use TokenGenerator for reset tokens
4. Follow transaction pattern from register.py

Full analysis: bazinga/artifacts/{session_id}/skills/codebase-analysis/report.json

Read the full file on GitHub · 89 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. 2mo ago First seen · 89 lines · 19 tokens per session scan A 2fb542e97bc1

Subscribe to this mod's changes

codebase-analysis is a skill published in the GitHub repository mehdic/bazinga (22 stars, last pushed 9mo ago), licensed MIT. It adds 19 tokens to every session and 558 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.

Related

Other skills, from other repositories

context-builder

Gather comprehensive project context before starting implementation. Use at the beginning of complex tasks to understand codebase structure, dependencies, patterns, and conventions before writing code.

asgarovf/locusai · 34 tokens

code-review

Reviews Spec Kit code changes for consistency with applicable design documents, positive and negative test coverage, regression evidence for bug fixes, and consistent repository terminology. Use when reviewing a diff or pull request. Do not use for implementing changes or posting GitHub review actions.

github/spec-kit · 54 tokens

mindos

MindOS: local knowledge assistant & shared KB. Keeps decisions, notes, SOPs, debugging lessons, research findings, preferences across sessions/agents. Core: save notes, search KB, organize files, run workflows, review, append CSV, hand off context, distill lessons. NOT for app source or paths outside KB. Triggers…

GeminiLight/MindOS · 136 tokens

code-review-web

Review web application code for bugs, security issues, performance problems, and stack-specific anti-patterns. Use this skill whenever the user wants to review code, debug a production issue, investigate a build failure, audit security, or check a PR before merging. Triggers on code review, review my code, debug…

rampstackco/claude-skills · 121 tokens

code-quality-principles

Applies KISS, YAGNI, and SOLID principles for clean code with reduced complexity. Use when refactoring or reviewing code for over-engineering.

athola/claude-night-market · 38 tokens

octocode-roast

Use when code needs a blunt evidence-backed roast or memorable critique: smell inventory, debt ranking, hot-path autopsy, savage/diff review, security or performance sins, or practical redemption paths. Phrases like roast this, brutal review, top sins, cleanup debt. Polite evidence-first PR review → octocode-research.

bgauryy/octocode · 71 tokens