# How to Add New AI Coding Platform Support to ai-website-cloner-template

> Easily add new AI coding platform support to ai-website-cloner-template. Extend agent rules or skills scripts and regenerate configuration 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-29

---

**To add support for a new AI coding platform to 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 the configuration files from the single source of truth in [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md).**

The JCodesMore/ai-website-cloner-template repository maintains a single source of truth for the clone-website prompt while automatically distributing it to multiple AI coding agents. Adding support for a new platform requires understanding whether the agent consumes plain-text rules or structured skill definitions, then implementing the appropriate generation logic in the existing sync infrastructure.

## Understanding the Sync Architecture

The repository treats every AI coding agent as a generated configuration file derived from [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md). Two scripts handle the synchronization:

- **[`scripts/sync-agent-rules.sh`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/scripts/sync-agent-rules.sh)**: Generates plain-text rule files for agents that read markdown documentation (e.g., Continue, Amazon Q).
- **`scripts/sync-skills.mjs`**: Generates structured skill files for agents that consume skill definitions (e.g., Codex CLI, GitHub Copilot, Gemini CLI).

Both scripts use helper functions—`write_file` in the bash script and `write` in the Node.js script—to automatically create target directories and prepend auto-generated headers.

## Step-by-Step Implementation Guide

### Determine the Platform Configuration Type

First, identify how your target platform consumes instructions:

- **Rule-based platforms** expect a markdown or text file that is fed verbatim to the model. These typically live in hidden directories like `.agent/rules/`.
- **Skill-based platforms** expect a structured definition (JSON, TOML, or YAML) that may contain placeholders for arguments and file context references.

### Extend the Appropriate Sync Script

**For rule-based platforms**, add 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). The helper function automatically handles directory creation and header injection:

```bash

# Inside scripts/sync-agent-rules.sh

# 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`. Use the `noArgs` helper to replace `$ARGUMENTS` placeholders with platform-specific syntax, or implement custom substitution logic:

```javascript
// Inside scripts/sync-skills.mjs
// 10. 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'
)

```

### Regenerate and Verify Platform Files

Run the appropriate script to generate the new configuration files:

```bash

# For rule-based additions

bash scripts/sync-agent-rules.sh

# For skill-based additions

node scripts/sync-skills.mjs

```

Verify the generated files contain the auto-generated header (`<!-- AUTO-GENERATED ... -->` for markdown or equivalent comments for JSON). Confirm that argument placeholders match your platform's expected syntax—modify the `noArgs` function or create a custom transformer if the platform uses non-standard variable interpolation.

### Commit the Changes

Stage the modified sync scripts and the newly generated platform configurations:

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

```

Update the **Supported Platforms** section in [`README.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/README.md) to document the new integration.

## Key Implementation Details

The sync scripts rely on specific helper functions to maintain consistency:

- **`write_file`** (bash): Accepts a file path and content string, creates parent directories, and writes the file with an auto-generated warning header.
- **`write`** (JavaScript): Accepts a relative path and content string, ensures the directory exists relative to `REPO_ROOT`, and logs a checkmark on success.
- **`noArgs`**: A JavaScript helper that strips or replaces `$ARGUMENTS` placeholders in the prompt body. Implement a custom variant if your platform requires specific argument syntax like `{{args}}` or `${input}`.

The source of truth remains [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md)—never edit generated files directly, as the sync scripts will overwrite them.

## Summary

- **Identify the platform type**: Determine if the agent requires rule-based markdown files or structured skill definitions.
- **Modify the sync script**: Add generation logic to [`scripts/sync-agent-rules.sh`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/scripts/sync-agent-rules.sh) for text rules or `scripts/sync-skills.mjs` for structured skills.
- **Use helper functions**: Leverage `write_file`, `write`, and `noArgs` to ensure consistent file generation and header injection.
- **Regenerate files**: Execute the sync scripts to create platform-specific configurations from [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md).
- **Commit changes**: Stage both the script modifications and the generated files to maintain the DRY architecture.

## Frequently Asked Questions

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

Rule-based platforms read plain markdown or text files that contain instructions verbatim, while skill-based platforms consume structured configuration files (JSON, TOML, or YAML) that define the skill name, description, prompt template, and optional file context. The template supports both paradigms through separate sync scripts.

### Where is the source of truth for agent prompts stored?

The [`AGENTS.md`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/AGENTS.md) file at the repository root serves as the single source of truth. All generated configuration files in directories like `.github/skills/` or `.continue/rules/` are automatically derived from this document and should never be edited manually.

### How do I handle custom argument syntax for a new platform?

Create a custom transformation function in `scripts/sync-skills.mjs` similar to the existing `noArgs` helper. Apply this function to the `body` content before writing to replace `$ARGUMENTS` with the specific placeholder syntax your platform expects, such as `{{args}}` or `${input}`.

### Do I need to manually create directories for new platform configurations?

No. The `write_file` function in [`scripts/sync-agent-rules.sh`](https://github.com/JCodesMore/ai-website-cloner-template/blob/main/scripts/sync-agent-rules.sh) and the `write` function in `scripts/sync-skills.mjs` automatically create nested directories using `mkdir -p` or Node.js `mkdirSync` with recursive options. Simply specify the target path and the scripts handle the directory structure.