agents

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package agents promotes a Claude specific instruction file to the portable AGENTS.md convention.

The content `claude /init` writes is useful to every coding agent, only its name and a few boilerplate phrases are Claude specific. Migrate moves the file to AGENTS.md and leaves pointers behind for the tools looking for their own filename.

Index

Constants

View Source
const (
	AgentsFile  = "AGENTS.md"
	ClaudeFile  = "CLAUDE.md"
	CopilotFile = ".github/copilot-instructions.md"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Force bool
}

type Reference

type Reference struct {
	Line int
	Text string
}

A Reference is a line of AGENTS.md still mentioning Claude after the boilerplate rewrites

func Migrate

func Migrate(fs afero.Fs, options Options) ([]Reference, error)

Migrate promotes CLAUDE.md to AGENTS.md and leaves pointers behind.

CLAUDE.md is always rewritten, it is the source of the migration. AGENTS.md and the copilot instructions are only overwritten when Force is set.

The returned references are the lines of AGENTS.md still mentioning Claude, they are reported rather than guessed at.

func Transform

func Transform(content string) (string, []Reference)

Transform rewrites the boilerplate `claude /init` emits and returns the result along with every line still mentioning Claude.

Only the fixed phrases are rewritten. Anything else is left alone and reported so it can be edited by hand.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL