Skip to content

Zealbase/graft

Repository files navigation

graft

Collaboratively develop agents with your team.

Go Report Card License: MIT Go Version CI

graft fans agent definitions out from .graft/agents to every provider and your teammates

Note

Agent definitions, skills, instructions, and agent memory — all managed as code.

Developers use agents across Claude Code, Codex, Copilot, and more. graft lets you maintain agent definitions and convert them to and from provider-specific formats. An enhancement to one agent is synced to the others using git-merge-style resolution.

Flow

graft sync agents
  1. Agents are auto-detected in Claude Code | Codex | Grok CLI | …
  2. Edit directly via .codex/agents/designer.toml or in .graft/agents/
  3. Run graft sync agents to propagate changes to all other provider configs

Share your agent definitions with your team inside your existing codebase repo.


What it does

Tip

  • Team collaboration — agent definitions live in .graft/agents/ alongside your code: versioned, reviewed, and shared via git.
  • Two-way sync — edit at any provider; graft reads the change and writes it back to all the others.
  • Auto resolution — concurrent edits are merged using a branch-per-file strategy with conflict detection.
  • Skills, auto-synced — drop a skill in .agents/skills/ and graft symlinks it into every supporting provider's skills dir on graft sync.
  • Broad coverage — syncs across 8 providers (Claude Code, Codex, Cursor, GitHub Copilot, OpenCode, Roo Code, Goose, Grok CLI) — and growing.

Example config

# .graft/agents/designer/agent.yaml
name: designer
description: UI/UX design reviewer
model: claude-sonnet-4-6          # default model for every provider
tools:
  - read_file
  - web_search

# Per-provider overrides — override any field a provider supports
# (model, tools, temperature, …). `name` stays canonical and is never overridden.
providerOverrides:
  claude-code:
    model: claude-opus-4-8
  github-copilot:
    model: gpt-5.4
  opencode:
    temperature: 0.2

The agent's system prompt / instructions live alongside it in .graft/agents/designer/instructions.md.

Place this directory in .graft/agents/<name>/ and run graft sync agents — graft writes the equivalent config for every enabled provider, applying each provider's overrides on top of the shared defaults.

Editor validation (JSON Schema)

.graft/agents/*/agent.yaml is described by a JSON Schema — point your editor at it for validation and autocomplete. In VS Code (Red Hat YAML extension):

// .vscode/settings.json
"yaml.schemas": {
  "internal/canonical/schema/common-agent-definition.schema.json": "**/.graft/agents/*/agent.yaml"
}

…or add a modeline to the top of any agent.yaml: # yaml-language-server: $schema=<path-or-url>.

Supported providers

Provider Config location
claude-code .claude/agents/<name>.md
codex .codex/agents/<name>.toml
cursor .cursor/agents/<name>.mdc
github-copilot .github/copilot-instructions.md
opencode .opencode/agents/<name>.toml
roo-code .roo/agents/<name>.md
goose .goose/agents/<name>.yaml
grok-cli .grok/agents/<name>.md
gemini-cli Deprecated 2026-06-15

Getting started

See the documentation site for installation instructions, a quickstart, and the full command reference.

Quick install

go install github.com/Shaik-Sirajuddin/graft/cmd/graft@latest

Basic usage

# Initialize graft in your repo
graft init

# List detected agents across all providers
graft agent list

# Sync all agents to every provider
graft sync agents

# Check drift
graft agents status

About

Sync agents as code

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages