dqz00116/skill-lib/code-analysis
Claude Code and agent skill by dqz00116/skill-lib
- community
Checking that the SKILL.md file is still in the repository.
Use when analyzing unfamiliar code modules, understanding system architecture, or preparing for refactoring
Install
npx vskill@latest install dqz00116/skill-lib/code-analysisSKILL.md
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
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
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
Workflow Template
Every code analysis task MUST follow this 4-step structure:
1. Objective
Definition: Clear statement of what needs to be understood
Format:
Examples:
- Understand how the Tinker serialization library works
- Analyze the architecture design of PlayerSubsystem
- Master the SharedTable data table loading mechanism
2. Deliverables
Definition: Concrete outputs that will be produced
Format:
Documentation Standards:
- Place in
repository/projects/[Project]/docs/ordocs/ - Use descriptive filenames:
[Topic]-[Type].md - Include code snippets and diagrams
3. Content
Definition: What will be covered in the analysis
Format:
4. Token Estimation
Definition: Estimated token consumption for the analysis
Format:
Estimation Guidelines:
| Complexity | Code reading | Documentation | Total | Time | |
|---|---|---|---|---|---|
| Simple (1-2 files) | 3K-5K | 2K-3K | 5K-8K | 15-20min | |
| Medium (module-level) | 10K-20K | 5K-10K | 15K-30K | 30-50min | |
| Complex (system-level) | 30K-50K | 15K-25K | 45K-75K | 60-90min |
Execution Flow
Usage Examples
Example 1: Simple Module Analysis
User: "Analyze PlayerQuest's progress update mechanism"
Plan Output:
Example 2: Complex System Analysis
User: "Understand the overall skill system architecture"
Plan Output:
Important Rules
Definition Location Confirmation Rule (Critical)
Rule: When definition locations are unclear during code analysis, must ask the requester to explicitly specify the location in advance
Execution Steps:
- After receiving an analysis request, first attempt to locate the definition files of key classes/functions
- If the location cannot be determined through file name or class name search, immediately stop analysis
- Ask the requester: "Please provide the definition file path for [ClassName]"
- After receiving a clear path, continue analysis
Example:
Best Practices
Do's
✅ Define clear scope boundaries, avoid over-analysis ✅ Provide specific file paths and line numbers ✅ Include actual code snippets ✅ Use diagrams to aid understanding (text descriptions) ✅ Estimates should be conservative, leave buffer
Don'ts
❌ Don't use vague scopes ("analyze the entire project") ❌ Don't omit key deliverable information ❌ Don't underestimate token consumption for complex systems ❌ Don't mix multiple unrelated objectives ❌ Don't blindly guess when definition locations are unclear (must ask the requester to explicitly specify file paths)
Integration with Other Skills
- knowledge-base-cache: Store analysis results in knowledge base
- git-workflow: Commit analysis documents
- skill-creator: Create specialized analysis skills from patterns
Template Quick Reference
Version History
- v1.2 (2026-02-12) - Added Attention-Driven Analysis
- Added: attention_focus.py module
- Added: Heuristic code attention scoring
- Added: Three-level analysis depth (High/Medium/Low)
- Optimized: 20-30% token reduction
- Optimized: 30% faster analysis speed
- v1.1 (2026-02-10) - Added critical rule
- Added: Definition location confirmation rule
- Added: Important Rules section
- Updated: Execution Flow added path confirmation step
- Updated: Best Practices added Don'ts rules
- v1.0 (2026-02-10) - Initial release
- 4-step workflow structure
- Token estimation guidelines
- Usage examples and templates
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcode-analysis/SKILL.md
Popularity
- Repository stars
- 20
- Repository forks
- 6
- 7-day trend score
- 15
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 26 Apr 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dqz00116/skill-lib/code-analysis)