PyCodeKG Thorough Repository Analysis Skill

Analyze Python repository architecture and generate Markdown and JSON reports.

1|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/Flux-Frontiers/doc_kg --skill pycodekg-thorough-repository-analysis-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: PyCodeKG Thorough Repository Analysis Skill
Source: https://github.com/Flux-Frontiers/doc_kg/tree/main/.claude/skills/pycodekg-thorough-analysis
Command: npx skills add https://github.com/Flux-Frontiers/doc_kg --skill pycodekg-thorough-repository-analysis-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill turns an opaque Python codebase into a measurable architecture map by identifying hotspots, integration points, coupling risks, and actionable refactoring opportunities.

Core Features & Use Cases

  • Complexity Hotspots: Finds the most critical functions using highest fan-in (most called) and flags likely bottlenecks.
  • Architectural Pattern Detection: Surfaces core modules, integration bridges, layering violations, and risk indicators such as unusually large files and orphaned code.
  • Dependency Analysis: Analyzes imports and containment relationships to detect circular dependencies, tight coupling, and isolated components.
  • Actionable Reporting: Produces both a detailed Markdown report and a JSON snapshot for further review, including critical paths and recommended next steps.

Real-world use case: you suspect performance or maintainability issues in a large Python service and need a structured report pinpointing where changes will have the biggest impact.

Quick Start

Use the command pycodekg analyze . (in your repository directory) after asking for a complete pycodekg analysis to generate the Markdown report and JSON snapshot.

Frequently Asked Questions about PyCodeKG Thorough Repository Analysis Skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze a Python repository architecture to find complexity hotspots?

To analyze Python repository architecture, traverse the code graph to calculate fan-in and fan-out metrics, identifying highly called functions and orchestration hubs that indicate performance bottlenecks. This process maps critical paths to guide refactoring planning.

What is dependency analysis in Python and how does it detect circular imports?

Dependency analysis in Python examines import and containment relationships across modules to detect circular dependencies, tight coupling, and isolated components. It maps structural connections to reveal hidden architectural risks and layering violations.

Can I use code graph statistics for automated architecture review in large Python projects?

Yes, you can use code graph statistics for architecture review in large Python projects by baselining graph metrics, ranking fan-in and fan-out, and detecting architectural patterns to pinpoint layering violations and unusually large files.

How do I identify refactoring opportunities and critical paths in a Python codebase?

To identify refactoring opportunities in a Python codebase, analyze the code graph to rank fan-in and fan-out, detect orchestration hubs, and flag orphaned code. This generates structured Markdown and JSON reports highlighting critical paths and recommended next steps.

Does Python repository analysis work for detecting layering violations and coupling risks?

Yes, Python repository analysis detects layering violations and coupling risks by traversing import relationships and containment hierarchies. It surfaces integration bridges and architectural pattern deviations that signal tight module coupling.

What are the limitations of using a knowledge graph for Python codebase analysis?

The knowledge graph approach for Python codebase analysis focuses strictly on structural architecture mapping, detecting coupling and complexity hotspots based on code graph statistics rather than executing code or profiling runtime performance.