Skip to content

Comments

Add AI coding skills prompt to cli-config schematic with agent selection#1502

Open
Copilot wants to merge 9 commits intomasterfrom
copilot/add-ai-coding-instructions
Open

Add AI coding skills prompt to cli-config schematic with agent selection#1502
Copilot wants to merge 9 commits intomasterfrom
copilot/add-ai-coding-instructions

Conversation

Copy link
Contributor

Copilot AI commented Feb 23, 2026

Extends the cli-config schematic to optionally scaffold AI coding assistant instruction files into the user's project during ng add, copying skill files from node_modules/igniteui-angular/skills/ to agent-specific destinations based on user selection.

Changes

  • cli-config/schema.json — New schema with:
    • addAISkills boolean (default: true, x-prompt for interactive confirmation)
    • aiSkillsTargets multi-select array for agent selection (Copilot, Claude, Cursor, VS Code Agents, Custom path)
    • aiSkillsCustomPath string for user-specified custom destination
  • collection.json — Wire schema to cli-config schematic entry
  • cli-config/index.ts:
    • CliConfigOptions interface with addAISkills, aiSkillsTargets, aiSkillsCustomPath
    • Agent destination mapping: Copilot → .github/copilot-instructions.md, Claude → CLAUDE.md, Cursor → .cursor/skills/, VS Code Agents → .agents/skills/, Custom → user-specified path
    • copySkillFile() copies from source to destination, skips existing files with informational logging
    • addAISkillsFiles() reads all files from node_modules/igniteui-angular/skills/ and copies to each selected agent's destination
    • Default export now accepts CliConfigOptions; AI skills rule included when addAISkills is not false and targets are provided
  • cli-config/index_spec.ts — 14 new tests: each agent target (copilot, claude, cursor, agents), multi-target, custom path, custom path missing, opt-in, opt-out, existing file preservation (copilot, claude, cursor, agents), FEED_ANGULAR package support
  • .gitignore — Exclude *.d.ts build artifacts from packages

Companion change needed

The igniteui-angular repo needs:

  1. addAISkills, aiSkillsTargets, and aiSkillsCustomPath properties added to its ng-add/schema.json to surface the prompts and pass through to this schematic
  2. Skill files published under a skills/ directory in the package
Original prompt

This section details on the original issue you should resolve

<issue_title>Prompt to add AI coding assistant instructions (copilot-instructions.md / CLAUDE.md) during ng add</issue_title>
<issue_description>### 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.
  • The .github/copilot-instructions.md in igniteui-angular already contains comprehensive Ignite UI / Angular coding best practices, examples, and style guidance that AI agents (GitHub Copilot, Claude, etc.) consume automatically when present in a project.

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
    • Content should reference Ignite UI for Angular best practices, signals, standalone components, modern Angular patterns, and link to relevant resources.
    • Content can be either:
      • Bundled locally within the schematics package (as template files), or
      • Fetched from a stable URL (e.g., https://raw.githubusercontent.com/IgniteUI/igniteui-angular/main/.github/copilot-instructions.md) at install time.
    • Bundled locally is preferred for offline reliability; the content can be periodically synced from the upstream source.
  3. Do not overwrite existing files:
    If .github/copilot-instructions.md or CLAUDE.md already exist in the target project, skip writing (or merge/append) and log an informational message.

  4. Ensure .github/ directory is created if it doesn't already exist when writing copilot-instructions.md.

  5. 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).
  6. More info for Copilot:

  • Use fetch from a URL, the Skill resources will be provided in the igniteui-angular repository under /skills folder
  • 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, .github/copilot-instructions.md and CLAUDE.md are written to the project root with Ignite UI for Angular–specific AI instructions.
  • The files are committed to git 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).

UX Flow

$ ng add igniteui-angular
✔ Add CSS library to reset HTML element styles across browsers? (Y/n)
✔ Would you like to add AI coding skills for your IDE? (Y/n)
  → writes .github/copilot-instructions.md
  → writes CLAUDE.md
✔ Packages installed successfully.

References

<agent_instructions>Follow the issue description fo...


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits February 23, 2026 07:03
Co-authored-by: zdrawku <11193764+zdrawku@users.noreply.github.com>
- Add schema.json with addAISkills boolean option (default: true, with x-prompt)
- Update collection.json to reference cli-config schema
- Implement addAISkillsFiles() that fetches content from remote URL
  and creates .github/copilot-instructions.md and CLAUDE.md
- Skip creation if files already exist (log info message)
- Handle fetch failures gracefully (log warning)
- Add 6 unit tests covering opt-in, opt-out, default behavior,
  existing file preservation, and fetch failure
- Update .gitignore to exclude *.d.ts build artifacts from packages

Co-authored-by: zdrawku <11193764+zdrawku@users.noreply.github.com>
Co-authored-by: zdrawku <11193764+zdrawku@users.noreply.github.com>
Copilot AI changed the title [WIP] Add prompt to include AI coding assistant instructions during ng add Add AI coding skills prompt to cli-config schematic Feb 23, 2026
Copilot AI requested a review from zdrawku February 23, 2026 07:09
@zdrawku zdrawku marked this pull request as ready for review February 23, 2026 07:54
@zdrawku
Copy link
Contributor

zdrawku commented Feb 23, 2026

@copilot I have changed entirely the instructions in the issue, plase discard these changes and start a new implementation based on the new issue description:

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

Copilot AI and others added 3 commits February 23, 2026 12:20
Discard URL-based fetch approach in favor of new requirements:
- Copy skill files from node_modules/igniteui-angular/skills/
- Support agent selection (Copilot, Claude, Cursor, Custom path)
- Multi-select prompt for target agents

Co-authored-by: zdrawku <11193764+zdrawku@users.noreply.github.com>
New implementation based on updated requirements:
- schema.json with addAISkills boolean, aiSkillsTargets multi-select
  (copilot, claude, cursor, custom), and aiSkillsCustomPath
- Copy skill files from node_modules/igniteui-angular/skills/
- Agent-specific destinations: Copilot→.github/, Claude→CLAUDE.md,
  Cursor→.cursor/skills/, Custom→user-specified path
- Skip existing files with informational logging
- 12 new unit tests covering all agent targets, opt-in/out, existing
  file preservation, custom path, multi-target, and FEED_ANGULAR
- Update .gitignore for *.d.ts build artifacts

Co-authored-by: zdrawku <11193764+zdrawku@users.noreply.github.com>
…illsFiles

Co-authored-by: zdrawku <11193764+zdrawku@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 23, 2026

@copilot I have changed entirely the instructions in the issue, plase discard these changes and start a new implementation based on the new issue description:

Overview

...

Discarded the previous URL-fetch implementation and reimplemented based on your updated requirements in 56be65b:

  • Schema: addAISkills boolean (default: true), aiSkillsTargets multi-select (copilot, claude, cursor, custom), aiSkillsCustomPath string
  • Source: Copies skill files from node_modules/igniteui-angular/skills/ (no URL fetching)
  • Agent destinations: Copilot→.github/copilot-instructions.md, Claude→CLAUDE.md, Cursor→.cursor/skills/, Custom→user-specified path
  • Existing files: Not overwritten (logged as info)
  • Tests: 12 new tests covering all agent targets, multi-target, opt-in/out, existing file preservation, custom path (with/without value), and FEED_ANGULAR package

The companion change in igniteui-angular will need:

  1. addAISkills, aiSkillsTargets, aiSkillsCustomPath properties added to its ng-add/schema.json
  2. Skill files published under a skills/ directory in the package

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • www.google-analytics.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/igniteui-cli/igniteui-cli/node_modules/.bin/jasmine src/app-projects/index_spec.js src/cli-config/index_spec.js src/component/index_spec.js src/ng-new/index_spec.js src/upgrade-packages/index.spec.js ndor/bin/git (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/igniteui-cli/igniteui-cli/node_modules/.bin/jasmine src/app-projects/index_spec.js src/cli-config/index_spec.js src/component/index_spec.js src/ng-new/index_spec.js src/upgrade-packages/index.spec.js ages/ng-schematics/node_modules/.bin/sh (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Co-authored-by: zdrawku <11193764+zdrawku@users.noreply.github.com>
Copilot AI changed the title Add AI coding skills prompt to cli-config schematic Add AI coding skills prompt to cli-config schematic with agent selection Feb 23, 2026
@pmoleri
Copy link

pmoleri commented Feb 23, 2026

Besides:

  • .github/copilot-instructions.md — for GitHub Copilot
  • CLAUDE.md — for Anthropic Claude / Claude Code
  • .cursor/skills/ - for Cursor

Shouldn't we have a forth option for general .agents?

  • .agents/skills/ - for other Agents

This comes from VS Code docs:
image

I guess the whole AGENTS.md and .agents/ directory will become standard at some point?

@zdrawku
Copy link
Contributor

zdrawku commented Feb 23, 2026

Besides:

  • .github/copilot-instructions.md — for GitHub Copilot
  • CLAUDE.md — for Anthropic Claude / Claude Code
  • .cursor/skills/ - for Cursor

Shouldn't we have a forth option for general .agents?

  • .agents/skills/ - for other Agents

This comes from VS Code docs: image

I guess the whole AGENTS.md and .agents/ directory will become standard at some point?

@copilot can you address that, we should add an option for general .agents also (.agents/skills/ - for other Agents)

Add "agents" as a new agent target that maps to .agents/skills/
directory, alongside copilot, claude, cursor, and custom options.
Includes tests for agents target and existing file preservation.

Co-authored-by: zdrawku <11193764+zdrawku@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 23, 2026

Besides:

  • .github/copilot-instructions.md — for GitHub Copilot
    ...

Added .agents/skills/ as a new "VS Code Agents" option in 2dd0a82. The agent selection now includes:

  • GitHub Copilot (.github/copilot-instructions.md)
  • Claude (CLAUDE.md)
  • Cursor (.cursor/skills/)
  • VS Code Agents (.agents/skills/) ← new
  • Add custom path

Tests added for the new target and existing file preservation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure Angular's pre-defined prompts work like step-by-step without some connection, pretty likely this will prompt all 3 in sequence
addAISkills?
aiSkillsTargets?
aiSkillsCustomPath?
regardless of answers, which is not what we intend, no?
If this works though, might belong on the main ng add schematic as well, since those will be passed here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, @copilot do you have any information if those prompts will actually depend on each other?
And if this configuration doesn't do it, is there an option that will?
Do not make changes, just provide review information.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Angular's x-prompt in schema.json does not support conditional/dependent prompts. All properties with x-prompt are prompted sequentially regardless of previous answers. So yes, the user would be asked all three questions (addAISkills?, aiSkillsTargets?, aiSkillsCustomPath?) in sequence even if they answer "no" to the first one.

The Angular schematics schema.json spec has no built-in mechanism for conditional prompts (no if/when/dependsOn support). To make prompts conditional, the logic would need to move into the schematic's TypeScript code itself — for example, by removing the x-prompt from aiSkillsTargets and aiSkillsCustomPath in the schema and instead using programmatic prompting (e.g., via @angular-devkit/schematics's SchematicContext or a custom prompt library) inside the index.ts rule function, only when addAISkills is true.

That said, the current implementation guards the actual file operations: even if all prompts fire, no files are written unless addAISkills !== false AND aiSkillsTargets has selections. So the behavior is correct, just the UX is suboptimal with extra prompts shown unnecessarily.

@damyanpetev
Copy link
Member

Besides:

  • .github/copilot-instructions.md — for GitHub Copilot
  • CLAUDE.md — for Anthropic Claude / Claude Code
  • .cursor/skills/ - for Cursor

Shouldn't we have a forth option for general .agents?

  • .agents/skills/ - for other Agents

This comes from VS Code docs: image

I guess the whole AGENTS.md and .agents/ directory will become standard at some point?

Yeah, the standard for that is bullsh- (╯°□°)╯︵ ┻━┻
Hopefully, all will eventually settle on something like .agents/skills which is actually not even on GitHub's docs (-.-'), but sure. I think the choices provided should actually probably list paths directly, so it's clear where they go and sure we can add that one too I suppose :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

4 participants