# How to Add Support for New AI Coding Agent Platforms in ai-website-cloner-template

> Learn to add support for new AI coding agent platforms in ai-website-cloner-template. Extend agent rules or skills scripts and regenerate config files from AGENTS.md for seamless integration.

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

---

**To add support for a new AI coding agent platform in ai-website-cloner-template, extend either [`scripts/sync-agent-rules.sh`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/scripts/sync-agent-rules.sh) for rule-based agents or `scripts/sync-skills.mjs` for skill-based agents, then regenerate configuration files from the single source of truth in [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) .**

The `ai-website-cloner-template` repository maintains all AI agent instructions in a central [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) file. Through automated synchronization scripts, the template propagates updates to platform-specific configurations without duplicating content, ensuring that changes to the core prompt automatically reach every supported coding agent.

## Understanding the Architecture

The template categorizes AI coding agents into two distinct integration patterns based on how they consume instructions:

### Rule-Based Platforms

Agents like **Continue** and **Amazon Q** expect plain-text rule files—typically markdown documents—that are fed verbatim to the model as system instructions. These platforms read static files containing the complete prompt without dynamic argument substitution.

### Skill-Based Platforms

Agents like **Codex CLI**, **GitHub Copilot**, and **Gemini CLI** consume structured **skill definitions** that may include placeholders for arguments. These definitions typically use JSON, TOML, or specialized markdown formats that support dynamic variable injection.

## Step-by-Step Implementation

### 1. Determine the Platform Type

Identify whether your target agent requires a **rule-based** file (plain markdown/text read as-is) or a **skill-based** definition (structured format with argument placeholders). This decision determines which synchronization script you must modify.

### 2. Extend the Appropriate Sync Script

For **rule-based** platforms, append a new `write_file` call to [`scripts/sync-agent-rules.sh`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/scripts/sync-agent-rules.sh):

```bash

# My-Agent — .myagent/rules/project.md

write_file "$REPO_ROOT/.myagent/rules/project.md" "$RESOLVED_CONTENT"

```

For **skill-based** platforms, add a new `write` call to `scripts/sync-skills.mjs`:

```javascript
// My-Agent — JSON skill definition
write(
  '.myagent/cli-agents/clone-website.json',
  JSON.stringify(
    {
      name: 'clone-website',
      description: shortDesc,
      prompt: noArgs(body),
      fileContext: ['AGENTS.md'],
    },
    null,
    2
  ) + '\n'
)

```

The `write_file` helper automatically prepends an auto-generated header and handles directory creation. In the JavaScript script, `write` creates missing directories and logs confirmation, while `noArgs` transforms `$ARGUMENTS` placeholders for platforms that do not support dynamic inputs.

### 3. Update Documentation

Add the new platform to the **Supported Platforms** table in [`README.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/README.md). If the platform requires specific command invocations, document these in the Commands section to assist users in discovering the integration.

### 4. Regenerate Configuration Files

Execute the synchronization scripts to generate the new platform's files:

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

```

```bash
node scripts/sync-skills.mjs

```

These scripts write generated files to appropriate hidden directories (e.g., `.myagent/rules/` or `.myagent/cli-agents/`) while preserving the DRY principle—[`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) remains the sole editable source.

### 5. Verify Generated Output

Open the generated files to confirm:
- The header `<!-- AUTO-GENERATED ... -->` is present in rule-based files.
- Placeholder substitutions (such as `$ARGUMENTS` or `{{args}}`) match the target platform's expected syntax.
- JSON or TOML skill files validate against the agent's schema requirements.

### 6. Commit Your Changes

```bash
git add scripts/sync-agent-rules.sh scripts/sync-skills.mjs .myagent/
git commit -m "Add My-Agent support for clone-website command"

```

## Key Implementation Details

The [`scripts/sync-agent-rules.sh`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/scripts/sync-agent-rules.sh) script resolves content from [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) and uses the `write_file` function to output plain-text rules with automatic header injection. Conversely, `scripts/sync-skills.mjs` parses the same source document but structures the output as named skills using the `write` function, which supports multiple output formats including Markdown, TOML, and JSON. Both scripts ensure that updates to [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) propagate identically across all supported platforms.

## Summary

- The repository uses [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) as the single source of truth for agent instructions.
- **Rule-based** integrations require extending [`scripts/sync-agent-rules.sh`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/scripts/sync-agent-rules.sh) to write plain-text files.
- **Skill-based** integrations require extending `scripts/sync-skills.mjs` to generate structured definitions.
- Helper functions handle directory creation, header injection, and argument substitution automatically.
- Always verify generated files for correct headers and placeholder syntax before committing.

## Frequently Asked Questions

### What is the difference between rule-based and skill-based agents?

Rule-based agents consume plain markdown or text files containing system instructions verbatim, while skill-based agents use structured definitions (JSON, TOML, or specialized Markdown) that define named capabilities with support for dynamic argument placeholders.

### Do I need to modify AGENTS.md when adding a new platform?

No. [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) serves as the immutable source of truth. You only need to extend the synchronization scripts to format and export its content to new platform-specific file locations and formats.

### How do I handle argument placeholders for different platforms?

Use the `noArgs` function in `scripts/sync-skills.mjs` to strip or transform `$ARGUMENTS` placeholders, or implement custom substitution logic that converts template variables into the specific syntax required by your target platform's skill definition schema.

### Where should generated files be placed for new agents?

Follow the existing convention: place rule-based files under `.myagent/rules/` and skill-based files under `.myagent/cli-agents/`, mirroring the structure used for existing platforms like `.github/copilot/skills/` or `.continue/rules/`.