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.
npx agentmods add skills/mehdic/bazinga/codebase-analysisnpx skills add mehdic/bazinga --skill codebase-analysisgit clone --depth 1 https://github.com/mehdic/bazingaWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00019 | $0.00558 |
| Opus 5 | $0.00010 | $0.00279 |
| Sonnet 5 | $0.00004 | $0.00112 |
| Haiku 4.5 | $0.00002 | $0.00056 |
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 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.
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
What ships with it
9 files 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.
- references/usage.md 6.8 KB
- scripts/analyze_codebase.py 19 KB runs code
- scripts/analyze.ps1 914 B runs code
- scripts/analyze.py 13 KB runs code
- scripts/analyze.sh 841 B runs code
- scripts/cache_manager.py 4.9 KB runs code
- scripts/pattern_detector.py 7.5 KB runs code
- scripts/patterns.py 10 KB runs code
- scripts/similarity.py 8.6 KB runs code
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.
- 2d ago First seen · 89 lines · 19 tokens per session scan A 2fb542e97bc1
codebase-analysis is a skill published in the GitHub repository mehdic/bazinga (21 stars, last pushed 7mo ago), licensed MIT. It adds 19 tokens to every session and 558 once invoked, about $0.0001 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.
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.
context-manager
Context management skill providing discovery, fetching, harvesting, extraction, compression, organization, cleanup, and guided workflows for project context.
gsd-codebase-mapper
Explores codebase and writes structured analysis documents. Spawned by map-codebase with a focus area.
Jupyter Live Kernel
Guides notebook-first analysis with reproducible kernels, inspectable data loading, and explicit promotion paths back into durable code.
explain-codebase
Drop into any repo and generate a structured architecture overview. Maps the codebase, identifies entry points, frameworks, and dependencies — then produces a "start here" guide for new contributors.
context-manager
Context management skill providing discovery, fetching, harvesting, extraction, compression, organization, cleanup, and guided workflows for project context.