angular/angular-cli · warning

Skipping configuration file for '${toolName}' at '${path}' b

Error message

Skipping configuration file for '${toolName}' at '${path}' because it already exists.
This is to prevent overwriting a potentially customized file. If you want to regenerate it with Angular recommended defaults, please delete the existing file and re-run the command.
You can review the latest recommendations at https://angular.dev/ai/develop-with-ai.

What it means

A warning from addBestPracticesMarkdown in packages/schematics/angular/ai-config/file_utils.ts. The ai-config schematic generates a best-practices markdown file (AI tool rules file) for the selected tool. If the target file already exists in the tree, the schematic skips generation to avoid overwriting a potentially customized file, logging this warning instead.

Source

Thrown at packages/schematics/angular/ai-config/file_utils.ts:136

  );
}

/**
 * Create an Angular best practices Markdown.
 * If the file exists, the configuration is skipped.
 */
export function addBestPracticesMarkdown({
  tree,
  context,
  fileInfo,
  tool,
}: FileConfigurationHandlerOptions): Rule {
  const { name, directory } = fileInfo;
  const path = `${directory}/${name}`;

  if (tree.exists(path)) {
    const toolName = strings.classify(tool);
    context.logger.warn(
      `Skipping configuration file for '${toolName}' at '${path}' because it already exists.\n` +
        'This is to prevent overwriting a potentially customized file. ' +
        'If you want to regenerate it with Angular recommended defaults, please delete the existing file and re-run the command.\n' +
        'You can review the latest recommendations at https://angular.dev/ai/develop-with-ai.\n',
    );

    return noop();
  }

  return mergeWith(
    apply(url('./files'), [
      filter((path) => path.includes('__bestPracticesName__')),
      applyTemplates({
        ...strings,
        bestPracticesName: name,
      }),
      move(directory),
    ]),

View on GitHub (pinned to bb72145f9a)

Solutions

  1. Keep the file if you customized it; no action needed — Angular defaults are skipped intentionally.
  2. Delete the existing file and re-run the command to regenerate with Angular recommended defaults.
  3. Review https://angular.dev/ai/develop-with-ai and merge recommended practices into your existing file manually.
  4. Use a different tool target in the schematic if you intended to generate a file for another tool.

Example fix

# before
$ ng g config ai-config --tool windsurf
# Skipping configuration file for 'Windsurf' at '.windsurfrules' ...
# after
$ rm .windsurfrules
$ ng g config ai-config --tool windsurf  # regenerates with defaults
Defensive patterns

Strategy: validation

Validate before calling

if (!fs.existsSync(path.join(workspaceRoot, toolConfigPath))) {
  // safe to run the ai-config schematic
}

Prevention

When it happens

Trigger: Calling the ai-config schematic (via `ng g config ai-config --tool <tool>`) when `tree.exists(path)` is true for `${directory}/${name}` — i.e., the tool's config file (e.g. .windsurfrules, GEMINI.md, .claude rules file) is already present in the target directory.

Common situations: Re-running the generator after a prior run; having created the AI rules file manually; scaffolded repo that already ships with the file; running the schematic in an updated workspace after an Angular upgrade.

Related errors


AI-assisted analysis of angular/angular-cli@bb72145f9a (2026-08-30). Data as JSON: /api/errors/9f317516b7c465e0. Report an issue: GitHub.