All skills
egonex-ai avatar

/understand

@a84b3db
by EgonexAIegonex-ai/understand-anything85k stars
7,160

Analyze a codebase to produce an interactive knowledge graph for understanding architecture, components, and relationships

Use this Skill: https://skilld.dev/gh/egonex-ai/understand-anything/understand

This session only. Nothing lands on disk.

frameworksdjango.md

≈1.2k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Django Framework Addendum

Injected into file-analyzer and architecture-analyzer prompts when Django is detected. Do NOT use as a standalone prompt — always appended to the base prompt template.

Django Project Structure

When analyzing a Django project, apply these additional conventions on top of the base analysis rules.

Canonical File Roles

File / Pattern Role Tags
manage.py CLI entry point for dev server, migrations, management commands entry-point, config
*/settings.py, */settings/*.py Project-wide configuration (DB, installed apps, middleware) config
*/urls.py URL routing — maps URL patterns to views api-handler, routing
*/views.py, */views/*.py Request handlers (function-based or class-based views) api-handler, controller
*/models.py, */models/*.py ORM models — map to database tables data-model
*/serializers.py DRF serializers — convert models to/from JSON serialization, api-handler
*/forms.py Django forms — validation and rendering logic validation, ui
*/admin.py Admin site registrations — exposes models in Django admin config
*/signals.py Signal handlers — cross-cutting side effects on model events event-handler
*/tasks.py Celery async task definitions service, event-handler
*/middleware.py, */middleware/*.py Request/response middleware classes middleware
*/permissions.py DRF permission classes middleware, validation
*/filters.py DRF filter backends utility
*/migrations/*.py Auto-generated schema migrations — do not summarize individually config
*/templates/**/*.html Django HTML templates ui
*/templatetags/*.py Custom template filters and tags utility
*/management/commands/*.py Custom management commands (./manage.py mycommand) config, entry-point
wsgi.py, asgi.py WSGI/ASGI server adapter — production entry point config, entry-point
*/apps.py App configuration and startup hooks (AppConfig) config
*/tests.py, */tests/*.py Unit and integration tests test

Edge Patterns to Look For

URL routing graph — Create calls edges from urls.py nodes to their corresponding view nodes when path() or re_path() maps a URL pattern to a view function or class. These edges represent the HTTP routing chain.

Signal wiring — When signals.py uses post_save.connect(handler, sender=Model) or @receiver(post_save, sender=Model), create subscribes edges from the signal handler function to the model class. Create publishes edges from the model to the signal handler to show the trigger direction.

ORM relationships — When models.py defines ForeignKey, OneToOneField, or ManyToManyField, create depends_on edges between the model classes with a description indicating the relationship type and cardinality.

Serializer-to-model binding — When a DRF serializer has model = MyModel in its Meta class, create a depends_on edge from the serializer to the model.

View-to-serializer binding — When a DRF ViewSet or APIView references a serializer class, create a depends_on edge from the view to the serializer.

Architectural Layers for Django

Assign nodes to these layers when detected:

Layer ID Layer Name What Goes Here
layer:api API Layer views.py, serializers.py, urls.py, DRF ViewSets and APIViews
layer:data Data Layer models.py, migrations/, database utility files
layer:service Service Layer signals.py, tasks.py, custom managers, service modules
layer:ui UI Layer templates/, forms.py, templatetags/
layer:middleware Middleware Layer middleware.py, permissions.py, authentication backends
layer:config Config Layer settings.py, urls.py (root), wsgi.py, asgi.py, apps.py, manage.py
layer:test Test Layer tests.py, tests/ directory, conftest.py

Notable Patterns to Capture in languageLesson

  • Fat models vs. thin views: Django encourages business logic in model methods, keeping views thin HTTP adapters
  • Django ORM lazy evaluation: QuerySets are not evaluated until iterated — chain filters without DB hits
  • Class-based views (CBVs): Mixins like LoginRequiredMixin, PermissionRequiredMixin compose behavior through multiple inheritance
  • Signal anti-patterns: Signals create invisible coupling; a signal in signals.py may be triggered by a save() call anywhere in the codebase
  • App isolation: Each Django app (INSTALLED_APPS) should be self-contained with its own models, views, urls, and migrations

Source: SKILL.md on GitHub

No alerts19d3 checks · Risk SAFE
  • Gen Agent Trust Hub19d

    This skill is a sophisticated codebase analysis tool used to generate interactive architectural knowledge graphs. It leverages a series of deterministic Node.js and Python scripts alongside AI sub-agents to perform tasks like file scanning, import resolution, and relationship mapping. The skill incorporates strong security practices by explicitly instructing its agents to treat project data (such as READMEs and manifests) as untrusted and ignore any prompt-like directives within them. All script behaviors, including shell command execution and local dependency builds, are consistent with its primary purpose and follow least-privilege principles.

  • Socket19d

    No alerts

  • Snyk19d

    Risk: LOW · No issues

Signed by skilld at a84b3db. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 4 weeks ago
Other metadata
argument-hint
[
  "[path] [--full|--auto-update|--no-auto-update|--review|--language <lang>|--exclude <patterns>]"
]

README badge

README badge for egonex-ai/understand-anything/understand