# How to Extend Support for New AI Coding Platforms Like Gemini CLI

> Easily extend support for new AI coding platforms like Gemini CLI using our single-source-of-truth architecture. Add new agents without code duplication and streamline your development.

- Repository: [JCodesMore/ai-website-cloner-template](https://github.com/JCodesMore/ai-website-cloner-template)
- Tags: how-to-guide
- Published: 2026-07-04

---

**The repository uses a single-source-of-truth architecture where [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) contains all agent instructions, and platform-specific pointer files import its content to support new AI coding agents without code duplication.**

The `JCodesMore/ai-website-cloner-template` repository streamlines multi-platform AI agent management through a centralized configuration system. Rather than maintaining separate instruction files for each coding assistant, the project consolidates all rules in [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) and employs automated scripts to propagate changes across Gemini CLI, Claude Code, and other supported platforms.

## Understanding the Single-Source-of-Truth Architecture

### The Central Configuration File ([`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md))

All agent-specific instructions live in **[`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md)** at the repository root. This file contains the authoritative project description, detailed pipeline instructions, and a supported-platforms table that automatically feeds into the README documentation. When you modify this file, you update the behavior for every platform simultaneously.

### Platform Pointer Files

Files like **[`GEMINI.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/GEMINI.md)** and **[`CLAUDE.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/CLAUDE.md)** act as thin wrappers containing only `@AGENTS.md` imports. According to the source code, [`GEMINI.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/GEMINI.md) uses this syntax at lines 1-2 to reference the central file. When the sync script runs, it resolves these imports and generates full configuration files for agents that cannot read [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) natively.

### Automated Sync Scripts

The **[`scripts/sync-agent-rules.sh`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/scripts/sync-agent-rules.sh)** bash script processes [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md), resolves `@` imports, and writes generated files for platforms requiring static configurations. The script already handles Gemini CLI (lines 18-19) and outputs confirmations like `✓ .github/copilot-instructions.md` and `✓ .clinerules`. The **`scripts/sync-skills.mjs`** Node.js script regenerates the `/clone-website` skill definitions across all platforms after changes to [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md).

## Step-by-Step Guide to Adding a New Platform

### Step 1: Update the Supported Platforms Table

Add your platform to the table in **[`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md)** (lines 56-68). This entry makes the platform visible to users and establishes it as officially supported.

```markdown
| Agent                                 | Status                     |
| ------------------------------------- | -------------------------- |
| [Gemini CLI](https://github.com/google-gemini/gemini-cli) | Supported |
| [MyNewAI](https://github.com/example/mynewai)                | Supported |

```

### Step 2: Create a Platform Pointer File

Create a new markdown file at the repository root (e.g., [`MYNEWAI.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/MYNEWAI.md)) containing only the import directive:

```markdown
@AGENTS.md

```

This follows the pattern established in [`GEMINI.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/GEMINI.md), instructing the sync system to inject the full [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) content here when generating the final configuration.

### Step 3: Ensure Sync Script Recognition

The [`scripts/sync-agent-rules.sh`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/scripts/sync-agent-rules.sh) (lines 5-19) reads [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) and resolves imports for all registered platforms. When you re-run the script after creating your pointer file, it automatically processes the new `@AGENTS.md` reference and outputs the resolved content into your new file.

### Step 4: Add Optional Platform-Specific Skills

If the platform requires a custom `/clone-website` skill wrapper, copy the canonical definition from **[`.github/skills/clone-website/SKILL.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/.github/skills/clone-website/SKILL.md)** and adjust the metadata (name, description, and invocation command). The `scripts/sync-skills.mjs` script references these files when regenerating skills for each platform, ensuring your custom logic integrates with the core workflow.

### Step 5: Execute the Sync Scripts

Run the following commands to materialize all changes:

```bash

# Regenerate agent config files from AGENTS.md

bash scripts/sync-agent-rules.sh

# Regenerate the /clone-website skill for all platforms

node scripts/sync-skills.mjs

```

The first command outputs confirmation for each generated file, including your new platform configuration. The second ensures the skill definitions match the updated [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) content.

## Summary

- **Single-source-of-truth**: Edit only [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) to update rules for all platforms simultaneously.
- **Pointer files**: Create thin wrapper files containing `@AGENTS.md` imports to link to the central configuration.
- **Automation**: Run [`scripts/sync-agent-rules.sh`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/scripts/sync-agent-rules.sh) to resolve imports and generate static config files for agents like Gemini CLI.
- **Skills**: Use `scripts/sync-skills.mjs` to propagate `/clone-website` skill updates across all supported platforms.
- **Extensibility**: This architecture supports any new AI coding platform with minimal maintenance overhead and zero configuration drift.

## Frequently Asked Questions

### What is the purpose of AGENTS.md?

[`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) serves as the central repository for all AI agent instructions, containing the supported-platforms table and detailed pipeline instructions. It eliminates configuration drift by providing one authoritative location for project rules that all platforms reference, including the specific content blocks found at lines 56-68 that define platform capabilities.

### How do pointer files like GEMINI.md work?

Pointer files contain only an `@AGENTS.md` import statement. When [`scripts/sync-agent-rules.sh`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/scripts/sync-agent-rules.sh) executes (lines 33-55), it resolves these imports and writes the full [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) content into the pointer file, creating a static configuration that agents like Gemini CLI can read directly without supporting the import syntax natively.

### Do I need to manually edit README.md when adding support for a new platform?

No. The README pulls platform information directly from the supported-platforms table in [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md). Adding your platform to this table automatically updates the documentation that users see, maintaining consistency between the source of truth and the project documentation.

### What if the new AI platform requires custom logic not covered in AGENTS.md?

Create a platform-specific skill file by copying [`.github/skills/clone-website/SKILL.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/.github/skills/clone-website/SKILL.md) to a new file (e.g., [`MYNEWAI_SKILL.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/MYNEWAI_SKILL.md)) and adjusting the metadata headers. The `scripts/sync-skills.mjs` script will incorporate this custom logic while maintaining the core `/clone-website` functionality defined in the canonical skill file, allowing platform-specific optimizations without fragmenting the main instruction set.