codebase-indexing

Regenerate MODEL_MAP.md from Django model relationships via introspection script.

4|1|Updated Feb 4, 2024
One-click install
npx skills add https://github.com/Arx-Game/arxii --skill codebase-indexing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codebase-indexing
Source: https://github.com/Arx-Game/arxii/tree/main/tools/skills/codebase-indexing
Command: npx skills add https://github.com/Arx-Game/arxii --skill codebase-indexing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Regenerate the auto-generated model relationship map to reflect schema changes and clarify cross-app connections, reducing costly codebase searches.

Core Features & Use Cases

  • Regenerates docs/systems/MODEL_MAP.md to reflect current Django relationships
  • Outputs model relationships (FK/OneToOne/M2M) and reverse relations
  • Exposes public service function signatures from each app (via introspection)
  • Use cases: after migrations, adding apps, or when MODEL_MAP.md is stale

Quick Start

Execute the introspection script to regenerate docs/systems/MODEL_MAP.md with the latest model relationships.

Frequently Asked Questions about codebase-indexing

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

FAQPage Schema
How do I regenerate a Django model relationship map after applying schema migrations?

To regenerate a Django model relationship map after migrations, run the introspection script to enumerate models, foreign keys, reverse relations, and service signatures, outputting the updated results to MODEL_MAP.md.

What is the best way to document cross-app foreign keys and reverse relations in Django?

Documenting cross-app foreign keys and reverse relations is done by running an introspection script that automatically enumerates Django models and generates a comprehensive relationship map in MODEL_MAP.md.

When should I update my auto-generated Django model map?

You should update your auto-generated Django model map when adding new apps, applying schema migrations, or when the existing MODEL_MAP.md file diverges from the actual source code relationships.

Does this introspection process capture public service function signatures across Django apps?

Yes, the introspection process captures public service function signatures by enumerating models and relationships across all Django apps, exposing them within the generated MODEL_MAP.md documentation.

Why does my MODEL_MAP.md file show stale foreign key relationships?

Your MODEL_MAP.md file shows stale foreign key relationships because it has diverged from the source code after recent schema migrations or the addition of new Django apps, requiring regeneration.

Can I use codebase introspection to map OneToOne and ManyToMany relationships in Django?

Yes, you can use codebase introspection to map OneToOne and ManyToMany relationships by running the script to enumerate all Django model connections and output them to MODEL_MAP.md.