ai-template-sync

Syncs an agentic scaffold into existing repositories via UPSERT file copy and symlink scripts.

Updated Jul 23, 2026
One-click install
npx skills add https://github.com/generic-automation-and-it/smooth-ai-stockanalysis --skill ai-template-sync-generic-automation-and-it
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ai-template-sync
Source: https://github.com/generic-automation-and-it/smooth-ai-stockanalysis/tree/main/.agents/skills/ai-template-sync
Command: npx skills add https://github.com/generic-automation-and-it/smooth-ai-stockanalysis --skill ai-template-sync-generic-automation-and-it

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Distributing a shared AI-agent scaffold (rules, hooks, skills, symlinks for Claude Code, Codex, and Copilot) into other repositories is error-prone: manual copying risks clobbering existing files, breaking symlink layouts, or overwriting a repo's own rule directories. This Skill turns that into a guided, safe UPSERT workflow. ## Core Features & Use Cases - Interactive multi-phase sync: asks which AI tools to configure (Claude Code, Codex, Copilot), whether to include .NET solutioning, and how to handle file conflicts (global overwrite vs. selective). - Rules-layout pre-flight: detects when .agents/rules is a real directory instead of a symlink to .github/instructions and stops before the sync would destroy the repo's own rules. - Deterministic sync scripts: scripts/sync.sh and scripts/sync.ps1 execute the copy/symlink work idempotently, with --template-url/--template-ref support for pinned remote clones and a --rules-only mode that distributes just the rule system as a versioned package. - Use Case: You maintain a template repo of agentic coding standards and want to roll it out to ten existing projects without deleting any project-specific files — run the skill, answer three questions, and the scripts merge the scaffold additively. ## Quick Start Ask the agent to sync the smooth-ai-stockanalysis agentic scaffold into your current repository, choosing which AI tools to configure and how to handle existing file conflicts.

Frequently Asked Questions about ai-template-sync

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync an agentic scaffold into an existing repo without overwriting files?▼

Run the sync with --overwrite none, which copies only files that do not already exist in the landing repo. The scripts are UPSERT-only by design, so landing-only files are never deleted in either overwrite mode.

How do I distribute AI coding rules to multiple repositories?▼

Use the --rules-only mode with --template-url and --template-ref to pin a version. It syncs only .github/instructions/ and the .agents/rules symlink, acting as a rules package manager you can re-run with a newer ref to upgrade.

Does the sync work on Windows?▼

Yes, scripts/sync.ps1 is the PowerShell counterpart and must stay behaviorally identical to sync.sh. Windows requires Developer Mode or admin rights so symlinks like .claude and .agents/rules resolve correctly.

Why does the sync refuse to run when .agents/rules is a real directory?▼

Section D unconditionally re-points the .agents/rules symlink, which would destroy a real directory containing the repo's own rules. The script exits with code 65 so you can move those rules into .github/instructions/ first.

Will the sync overwrite my .NET solution or src files?▼

No. The --dotnet path is add-only: it copies .slnx, Directory.Build.props, NuGet.Config, src/, and tests/ only when no solution file exists, and skips any item already present. No flag can enable dotnet overwrites.

Can I pin the template to a specific version for reproducible installs?▼

Yes, pass --template-ref with a tag, branch, or SHA alongside --template-url. Tags and branches use a shallow clone; SHAs fall back to a full clone with a detached checkout.