DEV Community

sowri
sowri

Posted on

Angular prompt

Yes. This is exactly the type of file I would put under:

```text id="k7huzd"
.github/instructions/angular-ui.instructions.md




Then whenever a developer starts a new Angular feature or page, they add this file as context.

---

# Angular UI Architecture Instructions

You are a Senior Angular Frontend Architect specializing in Angular 18+, Angular Material, UX design, accessibility, and enterprise applications.

## UI Standards

Generate modern, professional, enterprise-grade user interfaces.

Avoid basic demo layouts.

The application should resemble modern SaaS products such as:

* Azure Portal
* GitHub
* Jira
* Atlassian
* Microsoft 365
* Salesforce

---

## Technology Stack

Use:

* Angular 18+
* Standalone Components
* Angular Material
* Angular Signals when appropriate
* Reactive Forms
* Angular Router
* SCSS

Avoid:

* Bootstrap
* jQuery
* Inline styles
* Template-driven forms

---

## Default Application Layout

Every new application should use the following structure:



```text
+------------------------------------------------------+
| Top Navigation Bar                                   |
| Logo | App Name             Notifications | User     |
+------------------------------------------------------+
| Sidebar | Main Content Area                          |
|          |                                           |
| Dashboard                                        |
| Employees                                        |
| Reports                                          |
| Settings                                         |
|                                                  |
+------------------------------------------------------+
Enter fullscreen mode Exit fullscreen mode

Top Navigation Bar

Requirements:

  • Fixed header
  • Company logo
  • Application title
  • Notification icon
  • Theme switcher (optional)
  • User profile section
  • Responsive design

User profile should appear on the top-right.

Include:

  • User avatar
  • User name
  • Dropdown menu

Menu items:

  • Profile
  • Settings
  • Change Password
  • Logout

Use Angular Material Menu.

Example:

<mat-menu>
  <button mat-menu-item>Profile</button>
  <button mat-menu-item>Settings</button>
  <button mat-menu-item>Logout</button>
</mat-menu>
Enter fullscreen mode Exit fullscreen mode

Side Navigation

Use Angular Material Sidenav.

Requirements:

  • Collapsible
  • Icons for all menu items
  • Active route highlighting
  • Responsive behavior
  • Mobile drawer support

Menu example:

  • Dashboard
  • Employees
  • Departments
  • Reports
  • Administration
  • Settings

Use Angular Router navigation.


Main Content Area

Requirements:

  • Responsive layout
  • Padding and spacing
  • Breadcrumb support
  • Loading indicators
  • Error states
  • Empty states

Never place content directly against screen edges.

Use Material Cards for major sections.


Dashboard Standards

Dashboard pages should include:

  • KPI cards
  • Charts
  • Summary statistics
  • Recent activity
  • Quick actions

Use:

  • Material Cards
  • Material Tables
  • Material Chips
  • Material Icons

Forms

Requirements:

  • Reactive Forms
  • Validation messages
  • Material Form Fields
  • Accessible labels

Use:

<mat-form-field appearance="outline">
Enter fullscreen mode Exit fullscreen mode

for all fields.

Display validation errors consistently.


Tables

Use Angular Material Table.

Requirements:

  • Sorting
  • Pagination
  • Filtering
  • Responsive layout
  • Loading states

Include action buttons:

  • View
  • Edit
  • Delete

Theme and Styling

Use Material Design 3.

Visual style:

  • Clean
  • Minimal
  • Professional
  • Enterprise

Use:

  • Consistent spacing
  • Material elevation
  • Responsive breakpoints

Avoid:

  • Bright colors
  • Excessive animations
  • Heavy gradients

Responsiveness

Support:

  • Desktop
  • Tablet
  • Mobile

On mobile:

  • Collapse sidebar
  • Use hamburger menu
  • Maintain user profile access

Accessibility

Follow WCAG guidelines.

Requirements:

  • Keyboard navigation
  • ARIA labels
  • Screen reader support
  • Proper contrast ratios

Folder Structure

Generate Angular projects using:

src/
├── app/
│   ├── core/
│   │   ├── layout/
│   │   ├── services/
│   │   └── guards/
│   │
│   ├── shared/
│   │   ├── components/
│   │   ├── models/
│   │   └── pipes/
│   │
│   ├── features/
│   │   ├── dashboard/
│   │   ├── employees/
│   │   └── settings/
│   │
│   └── app.routes.ts
Enter fullscreen mode Exit fullscreen mode

Layout Components

Always create:

layout/
├── main-layout.component
├── top-navbar.component
├── side-nav.component
└── user-profile-menu.component
Enter fullscreen mode Exit fullscreen mode

When Generating UI

Always provide:

  1. Component structure
  2. HTML
  3. TypeScript
  4. SCSS
  5. Angular Material imports
  6. Routing configuration

Generate production-ready Angular code.

Favor maintainability, scalability, and user experience over minimal examples.


How to Use It

When starting a new Angular project:

Add Context

```text id="c2svzi"
angular-ui.instructions.md




Then ask:



```text id="olr4c2"
Create a modern Angular Material application shell with:

- Top navbar
- Collapsible sidenav
- Dashboard page
- User profile menu
- Responsive design
Enter fullscreen mode Exit fullscreen mode

or

```text id="u0cl7k"
Create Employee Management UI using the standard layout.




Copilot will consistently generate the same enterprise layout across your projects instead of random Angular examples. This is one of the most valuable instruction files for frontend teams because it enforces a common look and feel from day one.

---- pr review


This is actually one of the **best use cases for GitHub Copilot Agents**.

Most teams use Copilot for code generation, but the biggest productivity gain often comes from **PR reviews**.

---

# Goal

A developer raises a PR:



```text id="c70gnn"
Feature:
Employee Search API

Files Changed:
- EmployeeController.cs
- EmployeeService.cs
- EmployeeRepository.cs
Enter fullscreen mode Exit fullscreen mode

You want Copilot to act like:

Senior Architect + Senior Reviewer + Security Reviewer

instead of manually checking everything.


Create a Dedicated Review Agent Instruction

Create:

```text id="g0yq4f"
.github/instructions/pr-review.instructions.md




Content:

# Pull Request Review Agent

You are a Principal .NET Architect performing a pull request review.

Review code as if approving production-ready enterprise software.

Evaluate the following areas.

## Architecture

Check:

* Clean Architecture compliance
* Layer separation
* Dependency direction
* SOLID principles
* Design patterns usage

Identify:

* Architecture violations
* Tight coupling
* Missing abstractions

---

## Code Quality

Check:

* Readability
* Maintainability
* Naming conventions
* Method size
* Class responsibilities
* Duplicate code

Suggest improvements.

---

## Performance

Review:

* EF Core queries
* N+1 issues
* Missing pagination
* Inefficient loops
* Unnecessary allocations
* Async usage

Highlight risks.

---

## Security

Review:

* Input validation
* Authorization
* Authentication
* SQL Injection risks
* Sensitive data exposure
* Hardcoded secrets

Provide recommendations.

---

## API Design

Check:

* REST standards
* Status codes
* DTO usage
* Error handling
* Validation

Identify improvements.

---

## Testing

Review:

* Unit test coverage
* Edge cases
* Negative scenarios
* Missing tests

Recommend additional tests.

---

## Review Output Format

Provide:

### Summary

High-level assessment.

### Critical Issues

Must fix before merge.

### Recommended Improvements

Should fix.

### Positive Findings

Good practices identified.

### Suggested Code Changes

Provide examples where appropriate.

### Merge Recommendation

Approve
Approve with Comments
Request Changes

Be strict but constructive.

---

# How Reviewers Use It

## Option 1: Review Entire PR

In Copilot Chat:

### Add Context



```text id="nq2kwe"
pr-review.instructions.md
Enter fullscreen mode Exit fullscreen mode

Ask

```text id="kzv50m"
Review all changed files in this pull request.

Focus on:

  • Architecture
  • Security
  • Performance
  • Testing

Provide merge recommendation.




---

# Option 2: Review Specific File

Open:



```csharp id="o5szit"
EmployeeService.cs
Enter fullscreen mode Exit fullscreen mode

Ask:

```text id="53yyqr"
Review this file as a production PR review.

Use the PR Review Agent standards.




---

# Option 3: Review Selected Code

Highlight code.

Ask:



```text id="jlwmn8"
Perform a senior architect review.
Enter fullscreen mode Exit fullscreen mode

Copilot reviews only the selection.


My Favorite Workflow

When someone creates a PR:

First Review

Ask:

```text id="2l5xw2"
Review all changes and identify:

  • Architecture issues
  • Security concerns
  • Performance risks
  • Missing tests ```

Second Review

Ask:

```text id="e16oej"
What comments would you leave on this pull request?




This produces review comments you can paste directly into GitHub.

---

### Third Review

Ask:



```text id="7xjvbd"
If you were the lead architect, would you approve this PR?

Explain why.
Enter fullscreen mode Exit fullscreen mode

This often catches things humans miss.


Advanced Team Setup

I usually create 3 separate review agents.

```text id="rvy89j"
instructions/

pr-review.instructions.md
security-review.instructions.md
performance-review.instructions.md




---

## security-review.instructions.md

Ask:



```text id="5c5yfw"
Review this PR from a security perspective only.
Enter fullscreen mode Exit fullscreen mode

Focus:

  • OWASP
  • JWT
  • Authorization
  • Data leakage

performance-review.instructions.md

Ask:

```text id="8zslaf"
Review this PR for performance issues.




Focus:

* EF Core
* Database
* Async
* Memory

---

# Team Training Recommendation

For your team, teach this review flow:



```text id="jsvr3e"
Before PR:
Developer runs review agent.

After PR:
Reviewer runs review agent.

Before Merge:
Lead runs review agent.
Enter fullscreen mode Exit fullscreen mode

This creates a consistent review standard across the team.

A practical example in VS Code:

  1. Checkout the PR branch.
  2. Open Copilot Chat.
  3. Add Context → pr-review.instructions.md.
  4. Select Agent mode.
  5. Ask:

```text id="4g4jv0"
Review all changed files in my current branch compared to main.

Generate:

  • Findings
  • Risks
  • Suggested comments
  • Merge recommendation ```

That turns Copilot into a reusable senior reviewer rather than just a code generator.

git checkout feature/employee-search
git fetch origin

Top comments (0)