Skip to content

Prompt to add AI coding assistant instructions (copilot-instructions.md / CLAUDE.md) during ng add #1501

@zdrawku

Description

@zdrawku

Overview

Extend the ng add igniteui-angular schematic to optionally scaffold AI coding assistant instruction files into the user's project. During installation, the schematic should prompt the user: "Would you like to add AI coding skills for your IDE?" and upon confirmation, write the appropriate instruction files to the project root. This leverages the natural Angular ng add workflow to give new users zero-friction access to AI-assisted development with Ignite UI for Angular.

Background

  • The igniteui-angular package already has an ng-add schematic that currently handles dependency installation, CSS reset setup, and optional HammerJS configuration via schema.json prompts.

Requirements

  1. Add a new prompt to the ng-add schema:
    Add an addAISkills (or similar) boolean property with an x-prompt in schema.json:

    "Would you like to add AI coding skills for your IDE? (writes .github/copilot-instructions.md and/or CLAUDE.md)"

  2. Write AI instruction files to the user's project when confirmed:

    • .github/copilot-instructions.md — for GitHub Copilot
    • CLAUDE.md — for Anthropic Claude / Claude Code
    • .cursor/skills/ - for Cursor
  3. Do not overwrite existing files:

  • Cover only Copy->Paste of the Skills from, node_modules/igniteui-angular/skills into your_project_root/skills based on your Agent based:
    • Copilot
    • Claude
    • Cursor
  • If .github/copilot-instructions.md or CLAUDE.md already exist in the target project, skip writing (or merge/append) and log an informational message.
  1. Unit tests:

    • Test that the prompt default is handled correctly (both opt-in and opt-out paths).
    • Test that files are created with expected content when the user opts in.
    • Test that existing files are not overwritten.
    • Follow the existing test patterns (e.g., index.spec.ts using SchematicTestRunner, UnitTestTree).
  2. More info for Copilot:

  • Default value for the prompt: addAISkills should default to true

Acceptance Criteria

  • Running ng add igniteui-angular prompts the user: "Would you like to add AI coding skills for your IDE?"
  • On confirmation, you are asked to pick an Agent that will use the skill - Copilot, Clause, Cursor and a 4th option "add custom path"
  • Upon picking an agent add/update the corresponding folder that the agent uses for SKILL files. IF the custom path option is picked, use the manually typed in path.
  • The files are committed to the developers project as part of the normal project setup — no extra manual steps required.
  • From that point forward, AI coding agents (Copilot, Claude, etc.) automatically pick up the instructions.
  • Existing instruction files in the project are not overwritten.
  • The feature is covered by unit tests.
  • The prompt defaults to true to encourage adoption (or false if the team prefers opt-in).

References

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions