Skip to content
alyn
Gentleman-Programming

Angular Architecture skill

Angular architecture: Scope Rule, project structure, file naming, style guide. Trigger: When structuring Angular projects or deciding where to place components.

$npx skills add Gentleman-Programming/Gentleman-Skills --skill angular-architecture
View this skill on GitHubGentleman-Programming/Gentleman-Skills/curated/angular/architecture/SKILL.md
Pack stars
665
Pack installs
5.6k
Alyn Score
42/99
Updated
8 months ago
License
MIT
– views – installs via Alyn

Gentleman-Programming

Angular Architecture

Install Angular Architecture

Pick your agent. Every command is ready to paste.

$npx skills add Gentleman-Programming/Gentleman-Skills --skill angular-architecture

The open skills CLI detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.

01

Install it

Run the command above, or upload the folder in Claude.

02

Ask naturally

Describe the task. Your agent loads angular-architecture when the request matches its description.

03

Name it if needed

If it does not trigger, say “use the angular-architecture skill”. In Codex, type $angular-architecture.

The skill itself

SKILL.md

FolderGitHub

The Scope Rule (REQUIRED)

"Scope determines structure" - Where a component lives depends on its usage.

Usage Placement
Used by 1 feature features/[feature]/components/
Used by 2+ features features/shared/components/

Example

features/
  shopping-cart/
    shopping-cart.ts          # Main component = feature name
    components/
      cart-item.ts            # Used ONLY by shopping-cart
      cart-summary.ts         # Used ONLY by shopping-cart
  checkout/
    checkout.ts
    components/
      payment-form.ts         # Used ONLY by checkout
  shared/
    components/
      button.ts               # Used by shopping-cart AND checkout
      modal.ts                # Used by multiple features

Project Structure

src/app/
  features/
    [feature-name]/
      [feature-name].ts       # Main component (same name as folder)
      components/             # Feature-specific components
      services/               # Feature-specific services
      models/                 # Feature-specific types
    shared/                   # ONLY for 2+ feature usage
      components/
      services/
      pipes/
  core/                       # App-wide singletons
    services/
    interceptors/
    guards/
  app.ts
  app.config.ts
  routes.ts
  main.ts

File Naming (REQUIRED)

No .component, .service, .model suffixes. The folder tells you what it is.

✅ user-profile.ts
❌ user-profile.component.ts

✅ cart.ts
❌ cart.service.ts

✅ user.ts
❌ user.model.ts

Style Guide

What We Follow (from official docs)

  • inject() over constructor injection
  • class and style bindings over ngClass/ngStyle
  • protected for template-only members
  • readonly for inputs, outputs, queries
  • Name handlers for action (saveUser) not event (handleClick)
  • Keep lifecycle hooks simple - delegate to well-named methods
  • One concept per file
@Component({...})
export class UserProfileComponent {
  // 1. Injected dependencies
  private readonly userService = inject(UserService);
  
  // 2. Inputs/Outputs
  readonly userId = input.required<string>();
  readonly userSaved = output<User>();
  
  // 3. Internal state
  private readonly _loading = signal(false);
  readonly loading = this._loading.asReadonly();
  
  // 4. Computed
  protected readonly displayName = computed(() => ...);
  
  // 5. Methods
  save(): void { ... }
}

What We Override

Official Says We Do Why
user-profile.component.ts user-profile.ts Redundant - folder tells context
user.service.ts user.ts Same

Commands

# New project
ng new my-app --style=scss --ssr=false

# Component in feature
ng g c features/products/components/product-card --flat

# Service in feature  
ng g s features/products/services/product --flat

# Guard in core
ng g g core/guards/auth --functional

Resources

Tips for Angular Architecture

  • • Start a fresh session after installing so your agent picks up the new skill.
  • • It is part of a pack with 24 skills. Install only the ones you need with --skill to keep triggers precise.
  • • If two skills overlap, mention the one you want by name.

Questions about Angular Architecture

What does the Angular Architecture skill do?

Angular architecture: Scope Rule, project structure, file naming, style guide. Trigger: When structuring Angular projects or deciding where to place components.

How do I install Angular Architecture?

Run "npx skills add Gentleman-Programming/Gentleman-Skills --skill angular-architecture" in your project. The skills CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.

Does Angular Architecture work in Cursor and Codex?

Yes. Angular Architecture uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.

Is Angular Architecture free?

Angular Architecture is open source on GitHub under the MIT license. It is free to install; check the license before commercial use.

Who made Angular Architecture?

Angular Architecture is published by Gentleman-Programming in the Gentleman-Programming/Gentleman-Skills repository, together with 23 other skills.

Similar skills. From other creators.