Skip to main content

AI Prompt Templates

This document contains reusable prompt templates for common development tasks in the LayerFive project.

Table of Contents

  1. Backend Development
  2. Frontend Development
  3. Testing
  4. Debugging
  5. Code Review
  6. Documentation

Backend Development

Create Django Model

Create API Endpoint

Create Django Service

Database Migration

External API Integration

Frontend Development

Create Angular Component

Create Angular Service

Create Form

Add Route

Create Chart

Testing

Unit Tests for Django

Unit Tests for Angular

Integration Tests

Debugging

Debug Error

Performance Issue

Database Query Debug

Code Review

Self Review

Refactoring Suggestions

Documentation

Generate Docstrings

API Documentation

Generate README

Feature Development

Complete Feature Planning

Code Generation for Feature

Tips for Using Templates

  1. Fill in ALL placeholders: Replace [PLACEHOLDERS] with specific details
  2. Add context: Include relevant code, files, or documentation
  3. Be specific: The more specific you are, the better the output
  4. Iterate: Start with basic prompt, then refine based on results
  5. Customize: Adjust templates for your specific needs
  6. Save variations: Keep track of effective prompt variations
  7. Share: Share successful prompts with the team

Creating Your Own Templates

When you find an effective prompt pattern:
  1. Generalize it by identifying common elements
  2. Add placeholders for variable parts
  3. Include context requirements
  4. Add it to this document
  5. Share with the team

Template Variables Reference

Common placeholders used in templates:
  • [APP_NAME] - Django app name
  • [MODEL_NAME] - Django model name
  • [COMPONENT_NAME] - Angular component name
  • [SERVICE_NAME] - Service class name
  • [FEATURE_NAME] - Feature being developed
  • [FILE_PATH] - Path to file
  • [ENDPOINT] - API endpoint URL
  • [METHOD] - HTTP method
  • [TYPE] - TypeScript type
  • [DESCRIPTION] - Description of purpose
  • [REQUIREMENTS] - Specific requirements