Skip to Content
agore-skill
Reference

init

Reference for agore-skill init — flags, behavior, and error cases.

Usage

Usage
agore-skill init [--flags]

Flags

FlagShortDefaultDescription
--yes-yoffSkip the interactive form and use detected defaults
--forceoffOverwrite an existing agore.yaml and generated workflow
--no-cioffSkip generating the GitHub Actions workflow
--configagore.yamlGlobal flag: path to the config file
--verboseoffGlobal flag: verbose diagnostics

Behavior

init writes agore.yaml in the working directory (or at the path given by --config). It fills these detected values:

  • project.name — the base name of the current directory.
  • project.repository — the output of git remote get-url origin when the remote exists; an empty string otherwise.
  • workspace.base — always main unless changed.
  • skill.paths — auto-detected from the repository layout: a root SKILL.md with no skills/ directory gives ["."]; a skills/ directory with no root SKILL.md gives ["skills/*"]; anything else keeps the default [".", "skills/*"].

If stdin is a TTY and --yes is not passed, an interactive form collects the project name (required), the repository URL (optional) and the base branch (required, pre-filled main).

The written file always contains the complete default configuration, and starts with the comment # Generated by agore-skill init. Edit freely.

An empty project name aborts with project name is required.

After the config, init completes the repository setup:

  1. .gitignore ensured. Missing: created with dist/ and .DS_Store. Existing: a dist/ line is appended when the file has no dist or dist/ line yet.
  2. CI workflow generated unless --no-ci: .github/workflows/agore-skill.yml is created with the content below. A pre-existing workflow file is preserved silently unless --force is passed — there is no error either way.
name: Skill Lifecycle

on:
  pull_request:
  push:
    branches: [main]
    tags:
      - "*/v*"
      - "v*"

permissions:
  contents: write

jobs:
  verify:
    if: ${{ !startsWith(github.ref, 'refs/tags/') }}
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: actions/setup-go@v5
        with:
          go-version: stable
      - name: Install agore-skill
        run: go install github.com/agore-dev/agore-skill/cmd/agore-skill@latest
      - name: Inspect changed skills
        run: agore-skill inspect --changed
      - name: Lint changed skills
        run: agore-skill lint --changed --strict
      - name: Evaluate skills
        run: agore-skill eval

  release:
    if: startsWith(github.ref, 'refs/tags/')
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: actions/setup-go@v5
        with:
          go-version: stable
      - name: Install agore-skill
        run: go install github.com/agore-dev/agore-skill/cmd/agore-skill@latest
      - name: Release skill
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: agore-skill release --clean --tag "${GITHUB_REF_NAME}"

Two jobs result: verify runs on pull requests and pushes to main — it installs agore-skill via go install …@latest, then runs inspect --changed, lint --changed --strict and eval; release runs on tag pushes (*/v* and v*) and executes agore-skill release --clean --tag "${GITHUB_REF_NAME}" with GITHUB_TOKEN.

Error cases

ConditionMessageExit
agore.yaml exists, no --forceAgore.yaml already exists (use --force to overwrite).1
Cancelled interactive forminit cancelled: ...1
Empty name (form or flag path)project name is required1

Note: the error banner capitalizes the file name (Agore.yaml already exists...) because of display formatting in the CLI's error renderer; the underlying message is agore.yaml already exists (use --force to overwrite).

Examples

agore-skill init --yes          # non-interactive, detected defaults
agore-skill init                # interactive form in a terminal
agore-skill init --force --yes  # regenerate an existing config
agore-skill init --yes --no-ci  # config only, no CI workflow

On this page