agentsync

A configuration skill for AgentSync, a format for organizing instructions and settings used by coding agents.

In plain words
What is it for?
Use it to create or edit AGENTS.md files, rules, skills, slash commands, subagent descriptions, permissions, MCP servers, hooks, and tool-specific configuration.
Why use it?
It keeps agent rules, reusable skills, commands, subagents, tool settings, and shared services in one organized source structure.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/alphacornutum/layercake/agentsync
Any agent
npx skills add alphacornutum/layercake --skill agentsync
Clone the repo
git clone --depth 1 https://github.com/alphacornutum/layercake

Made for: Claude Code, Codex.

Per session 146 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,337 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00146 $0.05337
Opus 5 $0.00073 $0.02669
Sonnet 5 $0.00029 $0.01067
Haiku 4.5 $0.00015 $0.00534

Measured 2d ago against content hash ee1cebc97660, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

agentsync scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

"deny": ["Bash(rm -rf *)", "Read(.env)"]
.ai/src/skills/agentsync/SKILL.md · 288 lines

How it starts

The opening of the file, as written. The whole thing — 288 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Working with AgentSync

Create and maintain AI agent instructions in the AgentSync format.

Structure

.ai/src/                        # Source of truth. Edit ONLY here.
├── AGENTS.md                   # Agent identity: role, approach, principles
├── rules/                      # Always-on constraints (one file per topic)
│   ├── core.md
│   └── testing.md
├── skills/                     # On-demand recipes (one directory per skill)
│   └── deploy/
│       └── SKILL.md
├── commands/                   # Custom slash commands (.md files)
│   ├── review.md
│   └── fix-issue.md
├── agents/                     # Subagent personas (.md files)
│   └── code-reviewer.md
├── mcp.json                    # Shared MCP servers — applied to every tool
└── tools/                      # Per-tool config and overrides
    ├── claude.yaml             #   tool config: dest paths, format options
    └── claude/                 #   per-tool payload overrides (opt-in)
        ├── settings.json       #     permissions / settings override
        ├── hooks.json          #     hooks override
        └── mcp.json            #     per-tool MCP override (shadows mcp.json above)

After editing, run agentsync sync to distribute to all tools.

Settings, hooks, and per-tool MCP are overrides: they only exist once you opt in (agentsync enable, agentsync customize, agentsync add mcp). When absent, AgentSync falls back to its shipped base templates. The flat settings/, mcp/, and hooks/ directories from older layouts still work but are deprecated — agentsync migrate moves them into the per-tool form above.

Scaffolding new content

Use agentsync add <kind> <name> to create a new file with the correct frontmatter and placement:

  • agentsync add rule <name> — creates .ai/src/rules/<name>.md
  • agentsync add skill <name> — creates .ai/src/skills/<name>/SKILL.md
  • agentsync add command <name> — creates .ai/src/commands/<name>.md
  • agentsync add subagent <name> — creates .ai/src/agents/<name>.md
  • agentsync add mcp <name> (--command CMD [--args '…'] [--env K=V,…] | --url URL) — adds a server to the shared .ai/src/mcp.json

Read the full file on GitHub · 288 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 288 lines · 146 tokens per session scan C ee1cebc97660

Subscribe to this mod's changes

agentsync is a skill published in the GitHub repository alphacornutum/layercake (0 stars, last pushed 1mo ago), licensed MIT. It adds 146 tokens to every session and 5,337 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.