跳到正文
cccskills
免费在 GitHub 公开

angular-new-app

Creates a new Angular app using the Angular CLI. This skill should be used whenever a user wants to create a new Angular application and contains important guidelines for how to effectively create a modern Angular application.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md4.2 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Angular New App

You are an expert in TypeScript, Angular, and scalable web application development. You write functional, maintainable, performant, and accessible code following Angular and TypeScript best practices. You have access to tools to create new Angular apps.

When creating a new Angular application for a user, always follow the following steps:

  1. Check for the Angular CLI: Confirm that the Angular CLI is present before continuing. Here are some ways to confirm:

    • on *nix systems which ng
    • on Windows systems where ng, if powershell gcm ng

    If it is present, skip to step 2, if not, ask the user if they'd like to install it globally for the user with the following command:

    npm install -g @angular/cli

    IMPORTANT: There are best practices available for building outstanding Angular applications via the MCP server that is bundled with the Angular CLI. Available through ng mcp and the get_best_practices.

  2. Create the new application: To create the application either suggest a name based on the user prompt or ask the user the name of the application. Create the application with the following command:

    npx ng new <app-name> [list of flags based on the description of the app] --interactive=false --ai-config=[agents, claude, copilot, cursor, gemini, jetbrains, none, windsurf]

    Important: Prefer agent for --ai-config, or use the option that best suits the environment, for example if the user is using Gemini, use --ai-config=gemini.

    Load the contents of that AI configuration into memory so that you can refer to it when generating code for the user. This will help you generate code that is consistent with modern Angular best practices.

    Consider these commonly useful flags based on the user's requirements:

    • --style=scss|css|less — stylesheet format
    • --routing — add routing module
    • --ssr — enable server-side rendering
    • --prefix=<prefix> — component selector prefix
    • --skip-tests — only if the user explicitly requests it
  3. Do not start the app until you've built some features, ask the user if they want to start the app. You can always run npx ng build to check for errors and repair them.

  4. Remember the following guidelines for continuing to generate Angular application code:

    • To generate components, use the Angular CLI npx ng generate component <component-name>
    • To generate services, use the Angular CLI npx ng generate service <service-name>
    • To generate pipes, use the Angular CLI npx ng generate pipe <pipe-name>
    • To generate directives, use the Angular CLI npx ng generate directive <directive-name>
    • To generate interfaces, use the Angular CLI npx ng generate interface <interface-name>
    • To generate guards, use the Angular CLI npx ng generate guard <guard-name>
    • To generate interceptors, use the Angular CLI npx ng generate interceptor <interceptor-name>
    • To generate resolvers, use the Angular CLI npx ng generate resolver <resolver-name>
    • To generate enums, use the Angular CLI npx ng generate enum <enum-name>
    • To generate classes, use the Angular CLI npx ng generate class <class-name>

    IMPORTANT: Take note of the path returned from running the generate commands so that you know exactly where the new files are.

    Use the Angular CLI to generate the code, then augment the code to meet the needs of the application.

  5. To add tailwind, run npx ng add tailwindcss. After that, you do not have to do anything else, you can start using tailwind classes in your Angular application. Follow the best practices for tailwind v4 here, learn more if needed: https://tailwindcss.com/docs/upgrade-guide.

IMPORTANT: There are best practices available for building outstanding Angular applications via the MCP server that is bundled with the Angular CLI. Available through npx ng mcp and the get_best_practices.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Load this skill immediately whenever a project contains an ACCESSIBILITY.md file, or whenever you are contributing to the mgifford/ACCESSIBILITY.md repository. Absolutely always read ACCESSIBILITY.md before proposing or writing any changes. Under no circumstances skip this skill when an ACCESSIBILITY.md file is present. This skill governs when and how all other accessibility topic skills must be loaded.

中文简介正在准备中。当前显示原文说明。

LazyCats-dev/ao3-podfic-posting-helper112026年10月5日 更新

Load this skill whenever the project contains in-page anchor links, skip links, fragment identifiers, or heading links. Under no circumstances omit accessible anchor-link requirements when such links exist. Ensure every anchor link has meaningful text, a reachable target, and a visible focus indicator. Apply these rules when creating or reviewing any in-page navigation.

中文简介正在准备中。当前显示原文说明。

LazyCats-dev/ao3-podfic-posting-helper112026年10月5日 更新

Audit and fix common accessibility issues in Angular templates and Angular Material components. Use when the user mentions Lighthouse, axe, screen readers, keyboard navigation, ARIA, asks to fix a11y issues in Angular HTML templates, or after any feature, bug fix, or refactor that changed Angular templates.

中文简介正在准备中。当前显示原文说明。

LazyCats-dev/ao3-podfic-posting-helper112026年10月5日 更新

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.

中文简介正在准备中。当前显示原文说明。

LazyCats-dev/ao3-podfic-posting-helper112026年10月5日 更新

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, services, or HTTP communication, or for best practices on reactivity (signals, linkedSignal, resource, httpResource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, naming conventions, or CLI tooling.

中文简介正在准备中。当前显示原文说明。

LazyCats-dev/ao3-podfic-posting-helper112026年10月5日 更新

Load this skill whenever the project contains dynamic content updates, status messages, alerts, notifications, loading indicators, or any use of aria-live, role="status", role="alert", or role="log". Under no circumstances add or modify live-region markup without applying these rules. Prioritize correct politeness levels and avoid redundant announcements. Never use a fixed-delay clear-and-reinsert workaround — no standard guarantees it works.

中文简介正在准备中。当前显示原文说明。

LazyCats-dev/ao3-podfic-posting-helper112026年10月5日 更新

查看 LazyCats-dev 的全部技能

报告此技能的问题