# How Platform-Specific Instructions Are Handled for Different AI Coding Agents: A Centralized Approach

> Learn how the AI website cloner template manages platform-specific instructions centrally in AGENTS.md and generates config files via scripts for diverse AI coding agents.

- Repository: [JCodesMore/ai-website-cloner-template](https://github.com/JCodesMore/ai-website-cloner-template)
- Tags: architecture
- Published: 2026-07-22

---

**The JCodesMore/ai-website-cloner-template repository handles platform-specific instructions by maintaining a single source of truth in [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) and automatically generating agent-specific configuration files through shell scripts, while supporting direct import references for agents like Gemini and Claude that support runtime file inclusion.**

Managing consistent behavior across multiple AI coding agents—such as GitHub Copilot, Claude, and Gemini—typically requires maintaining disparate configuration files for each platform. The ai-website-cloner-template solves this challenge by centralizing platform-specific instructions for different AI coding agents in one canonical file and propagating changes through automated scripts.

## Centralizing Instructions in AGENTS.md

All agent-specific rules, prompts, and workflows live in [[`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md)](https://github.com/JCodesMore/ai-website-cloner-template/blob/master/AGENTS.md) at the repository root. This file serves as the single source of truth that every supported AI agent ultimately consumes.

The file supports modular composition through import directives. For example, pointer files can reference the master content using:

```markdown
@AGENTS.md

```

This allows compatible agents to resolve the full instruction set at runtime without maintaining duplicate copies. The master file also contains self-referential directives reminding contributors to regenerate platform files after editing.

## Automated Distribution to Agent-Specific Formats

The [[`scripts/sync-agent-rules.sh`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/scripts/sync-agent-rules.sh)](https://github.com/JCodesMore/ai-website-cloner-template/blob/master/scripts/sync-agent-rules.sh) script parses [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md), resolves any `@AGENTS.md` imports, and writes the processed markdown to each agent's required configuration location. The script prepends a header comment indicating the file is auto-generated:

```bash
HEADER="<!-- AUTO-GENERATED from AGENTS.md — do not edit directly.
     Run \`bash scripts/sync-agent-rules.sh\` to regenerate. -->"

```

The script generates the following platform-specific instruction files:

- **GitHub Copilot Chat** → [`.github/copilot-instructions.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/.github/copilot-instructions.md)
- **Cline / Roo Code** → `.clinerules`
- **Continue** → [`.continue/rules/project.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/.continue/rules/project.md) (with additional front-matter)
- **Amazon Q** → [`.amazonq/rules/project.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/.amazonq/rules/project.md)

To regenerate all agent configurations after modifying the master instructions, run:

```bash
bash scripts/sync-agent-rules.sh

```

## Direct Import Support for Select Agents

Some AI coding agents support runtime file inclusion and therefore do not require generated copies. Instead, they use pointer files that import [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) directly:

- **Gemini CLI** uses [[`GEMINI.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/GEMINI.md)](https://github.com/JCodesMore/ai-website-cloner-template/blob/master/GEMINI.md), which contains the single line `@AGENTS.md` that the CLI resolves at load time.
- **Claude Code** uses [[`CLAUDE.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/CLAUDE.md)](https://github.com/JCodesMore/ai-website-cloner-template/blob/master/CLAUDE.md) with the same import pattern. Additionally, Claude's specialized skill definition is stored in [[`/.claude/skills/clone-website/SKILL.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main//.claude/skills/clone-website/SKILL.md)](https://github.com/JCodesMore/ai-website-cloner-template/blob/master/.claude/skills/clone-website/SKILL.md), which ultimately derives from the master instructions.

When these agents initialize, they resolve the `@AGENTS.md` directive to dynamically embed the full content.

## Synchronizing Claude Skills

Because Claude Code supports specialized skill definitions separate from general instructions, the repository includes [`scripts/sync-skills.mjs`](https://github.com/JCodesMore/ai-website-cloner-template/blob/master/scripts/sync-skills.mjs). This Node.js script rebuilds the Claude skill files after any section of [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) is modified, ensuring that Claude's project-specific capabilities remain synchronized with the central instruction set.

The complete workflow for updating instructions is:

1. Edit [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) with new rules or prompts.
2. Run `bash scripts/sync-agent-rules.sh` to update Copilot, Cline, Continue, and Amazon Q configurations.
3. Run `node scripts/sync-skills.mjs` to update Claude-specific skill definitions.

## Summary

- **Single source of truth**: All platform-specific instructions for different AI coding agents are authored in [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md).
- **Automated distribution**: The [`sync-agent-rules.sh`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/sync-agent-rules.sh) script generates native configuration files for GitHub Copilot, Cline/Roo Code, Continue, and Amazon Q with appropriate headers and formatting.
- **Runtime imports**: Gemini CLI and Claude Code reference [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) directly via `@AGENTS.md` pointers, eliminating the need for generated copies.
- **Skill synchronization**: The `sync-skills.mjs` script ensures Claude's specialized skill definitions in [`/.claude/skills/clone-website/SKILL.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main//.claude/skills/clone-website/SKILL.md) stay aligned with the master instructions.

## Frequently Asked Questions

### What is the primary file for editing AI agent instructions?

Edit [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) in the repository root. This is the only file that should be modified manually; all other agent configuration files are either auto-generated by [`scripts/sync-agent-rules.sh`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/scripts/sync-agent-rules.sh) or import references that point to this master document.

### How do I update instructions for GitHub Copilot after modifying AGENTS.md?

Run `bash scripts/sync-agent-rules.sh` from the repository root. This regenerates [`.github/copilot-instructions.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/.github/copilot-instructions.md) along with the configuration files for Cline, Continue, and Amazon Q, ensuring all platforms receive the updated instructions simultaneously.

### Why do some agents use @AGENTS.md while others have generated files?

Agents like Gemini CLI and Claude Code support runtime file inclusion directives (`@filename`), allowing them to import [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) directly. Other agents require static files in specific locations with particular formatting (such as front-matter for Continue), so the sync script generates dedicated copies for these platforms.

### How does Claude Code handle specialized skills versus general instructions?

While general instructions are imported via [`CLAUDE.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/CLAUDE.md) pointing to [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md), Claude-specific skills are managed separately in [`/.claude/skills/clone-website/SKILL.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main//.claude/skills/clone-website/SKILL.md). Run `node scripts/sync-skills.mjs` after editing [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) to ensure these skill definitions remain synchronized with the central instruction set.