init
Reference for agore-skill init — flags, behavior, and error cases.
Usage
agore-skill init [--flags]
Flags
| Flag | Short | Default | Description |
|---|---|---|---|
--yes | -y | off | Skip the interactive form and use detected defaults |
--force | off | Overwrite an existing agore.yaml and generated workflow | |
--no-ci | off | Skip generating the GitHub Actions workflow | |
--config | agore.yaml | Global flag: path to the config file | |
--verbose | off | Global 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 ofgit remote get-url originwhen the remote exists; an empty string otherwise.workspace.base— alwaysmainunless changed.skill.paths— auto-detected from the repository layout: a rootSKILL.mdwith noskills/directory gives["."]; askills/directory with no rootSKILL.mdgives["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:
.gitignoreensured. Missing: created withdist/and.DS_Store. Existing: adist/line is appended when the file has nodistordist/line yet.- CI workflow generated unless
--no-ci:.github/workflows/agore-skill.ymlis created with the content below. A pre-existing workflow file is preserved silently unless--forceis 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
| Condition | Message | Exit |
|---|---|---|
agore.yaml exists, no --force | Agore.yaml already exists (use --force to overwrite). | 1 |
| Cancelled interactive form | init cancelled: ... | 1 |
| Empty name (form or flag path) | project name is required | 1 |
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