Skip to content

feat(ai-config): add agent choices for skills/instruction locations#1664

Merged
damyanpetev merged 55 commits intomasterfrom
copilot/update-ai-config-agent-agnostic
May 8, 2026
Merged

feat(ai-config): add agent choices for skills/instruction locations#1664
damyanpetev merged 55 commits intomasterfrom
copilot/update-ai-config-agent-agnostic

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 24, 2026

ig ai-config hard-coded .claude/skills as the only skill destination. The CLI positions this as general AI tooling, but the implementation only supported Claude Code.

Core (packages/core/util/ai-skills.ts)

  • Add AIAgentTarget type: claude | copilot | cursor | codex | windsurf | gemini | junie | generic
  • Add AI_AGENT_SKILLS_DIRS mapping each agent to its conventional skills directory
  • Add getSkillsDir(target?) resolver
  • copyAISkillsToProject(skillsDir?) now accepts an optional output directory; defaults to .claude/skills for backward compat

CLI (packages/cli/lib/commands/ai-config.ts)

  • --agent (-a) — pick a known agent target
  • --skills-dir (-d) — arbitrary path, overrides --agent
  • configureSkills() and configure() thread through the resolved directory

Angular Schematics (packages/ng-schematics/src/cli-config)

  • ai-config schematic now accepts agent and skillsDir options, matching the CLI command behavior
  • Added ai-config-schema.json with agent (enum of supported targets) and skillsDir (custom path) properties
  • Updated collection.json to reference the schema
  • addAIConfig() resolves skillsDir from agent/skillsDir options (skillsDir overrides agent)
  • aiConfig() passes the resolved directory through to copyAISkillsToProject()

Agent → directory mapping

Agent Directory
claude .claude/skills
copilot .github/skills
cursor .cursor/skills
codex .codex/skills
windsurf .windsurf/skills
gemini .gemini/skills
junie .junie/skills
generic .agents/skills

Usage

ig ai-config                         # default (.claude/skills)
ig ai-config --agent cursor          # .cursor/skills
ig ai-config --agent generic         # .agents/skills
ig ai-config --skills-dir my/path    # custom

Tests

15 new core specs covering agent-aware destinations, getSkillsDir() for each target, custom paths, and the AI_AGENT_SKILLS_DIRS shape. 6 new schematic specs verifying agent/skillsDir option resolution and passthrough. Existing tests pass unchanged — no-arg calls still write to .claude/skills.

Copilot AI and others added 2 commits April 24, 2026 07:42
…ions

- Add AIAgentTarget type and AI_AGENT_SKILLS_DIRS mapping for claude,
  copilot, cursor, codex, windsurf, gemini, junie, and generic agents
- Add getSkillsDir() utility to resolve agent name to skills directory
- Accept optional skillsDir parameter in copyAISkillsToProject()
- Add --agent (-a) and --skills-dir (-d) CLI options to ig ai-config
- Default to .claude/skills for backward compatibility when no option given
- Add 15 new unit tests for agent-aware destinations and getSkillsDir

Agent-Logs-Url: https://github.com/IgniteUI/igniteui-cli/sessions/6ffa80e2-ee1c-4982-8606-c428fb045137

Co-authored-by: kdinev <1472513+kdinev@users.noreply.github.com>
Copilot AI changed the title [WIP] Make ig ai-config agent-agnostic instead of hard-coding .claude/skills Make ig ai-config agent-agnostic instead of hard-coding .claude/skills Apr 24, 2026
Copilot AI requested a review from kdinev April 24, 2026 07:46
@Marina-L-Stoyanova
Copy link
Copy Markdown
Contributor

@copilot Update angular schematics to accepts an optional output directory, when copying the skills. The ai-config schematic should work same as ai-config cli command

…lls-dir options

- Add ai-config-schema.json with agent and skillsDir properties
- Update collection.json to reference the schema
- Update aiConfig() to accept and pass through skillsDir
- Update addAIConfig() to resolve skillsDir from agent/skillsDir options
- Add 6 new schematic tests verifying agent-aware skill copy

Agent-Logs-Url: https://github.com/IgniteUI/igniteui-cli/sessions/235a5b72-55c7-4dda-a33d-47abfb77073e

Co-authored-by: Marina-L-Stoyanova <6087266+Marina-L-Stoyanova@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 24, 2026

@copilot Update angular schematics to accepts an optional output directory, when copying the skills. The ai-config schematic should work same as ai-config cli command

Done in d4478a9. The ai-config schematic now accepts --agent and --skillsDir options, matching the CLI command behavior:

  • Added ai-config-schema.json with agent (enum of supported targets) and skillsDir (custom path) properties
  • Updated collection.json to reference the schema
  • addAIConfig() resolves skillsDir from agent/skillsDir options (with skillsDir overriding agent)
  • aiConfig() passes the resolved directory through to copyAISkillsToProject()
  • Added 6 schematic tests verifying: default (no args), agent-based resolution (cursor, copilot, generic), custom skillsDir, and skillsDir overriding agent

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: /usr/local/bin/node node packages/cli/bin/execute.js new --help de_modules/.bin/tsx (dns block)
    • Triggering command: /usr/local/bin/node node packages/cli/bin/execute.js config --help (dns block)
    • Triggering command: /usr/local/bin/node node packages/cli/bin/execute.js generate --help (dns block)

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

@Marina-L-Stoyanova Marina-L-Stoyanova marked this pull request as ready for review April 24, 2026 11:11
Copilot AI review requested due to automatic review settings April 24, 2026 11:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates ig ai-config to support multiple AI agents by resolving agent-specific (or custom) skills destination directories instead of always writing to .claude/skills.

Changes:

  • Core: add agent target type + agent→directory mapping, getSkillsDir(), and allow copyAISkillsToProject() to accept an optional output directory (defaulting to .claude/skills).
  • CLI: add --agent / --skills-dir options and thread the resolved directory through skills configuration.
  • Angular schematics: add ai-config schema/options for agent/skillsDir, pass resolved directory through, and add schematic specs.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/core/util/ai-skills.ts Introduces agent targets + mapping + resolver; makes skills copy destination configurable.
packages/cli/lib/commands/ai-config.ts Adds CLI flags to select agent/custom directory and passes destination into core copy routine.
packages/ng-schematics/src/cli-config/index.ts Adds schematic options and resolves skillsDir from agent/skillsDir.
packages/ng-schematics/src/cli-config/ai-config-schema.json Defines schema for agent enum and skillsDir override.
packages/ng-schematics/src/collection.json Wires the new schema into the ai-config schematic entry.
packages/ng-schematics/src/cli-config/index_spec.ts Adds tests validating option resolution and passthrough behavior.
spec/unit/ai-skills-spec.ts Adds core unit coverage for agent-aware destinations, resolver, and mapping shape.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/core/util/ai-skills.ts Outdated
Comment thread packages/core/util/ai-skills.ts Outdated
…llsDir handling

Co-authored-by: Copilot <copilot@github.com>
Comment thread packages/core/util/ai-skills.ts Fixed
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 27, 2026

Coverage Status

coverage: 86.922% (+0.6%) from 86.279% — copilot/update-ai-config-agent-agnostic into master

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/cli/lib/commands/ai-config.ts Outdated
Comment thread packages/core/util/ai-skills.ts Outdated
Comment thread spec/unit/ai-config-spec.ts
Comment thread packages/cli/lib/commands/ai-config.ts Outdated
… Google Analytics event tracking

Co-authored-by: Copilot <copilot@github.com>
Comment thread packages/cli/lib/commands/ai-config.ts
… updating skills directory handling

Co-authored-by: Copilot <copilot@github.com>
@damyanpetev damyanpetev changed the title Make ig ai-config agent-agnostic instead of hard-coding .claude/skills feat(ai-config): add agent choices for skills/instruction locations May 8, 2026
@damyanpetev damyanpetev merged commit 26d958b into master May 8, 2026
3 checks passed
@damyanpetev damyanpetev deleted the copilot/update-ai-config-agent-agnostic branch May 8, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CLI MCP] Make ig ai-config agent-agnostic instead of hard-coding .claude/skills

7 participants