init-public-rules
Installation
SKILL.md
init-public-rules
Generate AGENTS.md (public agent instructions) in the project root and set up bridge files for agents that cannot natively read it.
AGENTS.md is a tool-neutral standard adopted by over 60,000 open-source projects. Write it once and 30+ agents -- Cursor, GitHub Copilot, Windsurf, Codex CLI, and more -- automatically pick it up. Even for solo developers, AGENTS.md helps agents understand the project more accurately.
Guardrails
| # | Check | On failure |
|---|---|---|
| 1 | CWD is a Git repository | "Please run this inside a Git repository." |
| 2 | AGENTS.md already exists | "AGENTS.md already exists. Overwrite or merge?" |
| 3 | Other agent config files also exist (.cursorrules, etc.) | "Other agent config files were found. Consider consolidating them with /migrate-rules." |
| - | Skill update check | Fetch https://raw.githubusercontent.com/dev-goraebap/agent-collab/main/manifest.json (1 HTTP request, fail silently on network error). Compare this skill's frontmatter metadata.version against manifest.skills[<this-skill-name>]. Cases: (a) versions equal → proceed silently; (b) local version is older → tell the user "Update available: {name} {local} → {remote}. Run npx skills add dev-goraebap/agent-collab -g to update." then proceed; (c) this skill name is in manifest.deprecated → tell the user "This skill was renamed to {renamedTo} since v{since}. Run npx skills add dev-goraebap/agent-collab -g and use /{renamedTo} instead." then stop; (d) this skill name is not in manifest.skills and not in deprecated → tell the user "This skill is no longer maintained." then proceed with caution. |
When merge is chosen: Read the existing AGENTS.md and compare it section-by-section with the newly analyzed content. Add only sections that are missing and keep existing ones intact. For conflicting content (e.g., different rules in the same section), ask the user which version to keep.