Skip to Content
agore-skill
How-to Guides

How to initialize an existing repository

Add agore.yaml to a repository that already has code, history, or an existing config.

You have a repository that already exists and you want a valid agore.yaml without disturbing anything else in it.

Basic case

From the repository root:

agore-skill init --yes

init writes agore.yaml next to your existing files. It detects:

  • project name — the current directory's base name
  • repository URL — the output of git remote get-url origin, if an origin remote exists (left empty otherwise)
  • base branch — always defaults to main unless you say otherwise
  • skill layout — a root SKILL.md becomes skill.paths: ["."], a skills/ directory becomes ["skills/*"]; with neither, the default [".", "skills/*"] stays

Besides agore.yaml, init sets up the rest of the lifecycle:

  • .gitignore — created with dist/ and .DS_Store when missing; an existing file gets a dist/ line appended when it does not already have one.
  • .github/workflows/agore-skill.yml — a GitHub Actions workflow: the verify job runs inspect --changed, lint --changed --strict and eval on pull requests and pushes to main; the release job runs agore-skill release --clean --tag "${GITHUB_REF_NAME}" on v* tag pushes. An existing workflow file is preserved unless you pass --force; pass --no-ci to skip the workflow entirely.

The full generated file is documented in the init reference.

Without --yes, and when stdin is a terminal, init shows an interactive form with the detected values pre-filled, so you can adjust the project name, repository URL and base branch before anything is written. In scripts or pipelines (no TTY), pass --yes; running the interactive form without a TTY cancels with an error and exit code 1.

If agore.yaml already exists

init refuses to run and exits with code 1:

agore-skill init
ERROR
Agore.yaml already exists (use --force to overwrite).

Decide which you want:

  • Keep the current config — do nothing; init was a no-op.
  • Regenerate it — pass --force:
agore-skill init --yes --force

--force overwrites the file with fresh defaults plus the newly detected project name, repository and base branch, and also regenerates the GitHub Actions workflow if one exists. Every customization you made by hand (budgets, exclude globs, publisher list) is lost, so copy anything you care about out of the old file first.

To use a different base branch

If your trunk is not main, name it in the config after init — or set it in the interactive form. The value lands in workspace.base:

workspace:
  base: trunk

workspace.base is what inspect --changed and lint --changed diff against; see How to operate a monorepo.

On this page