How to enforce lint in CI
Set up agore-skill lint as a CI gate, with strict mode, ignore lists, exit codes, and fixes for each failure.
You want every pull request blocked when a skill breaks a rule, and you want to fix the specific diagnostics lint reports.
The CI command
One command is enough as a pipeline step:
agore-skill lint --strict --changed--changedlints only skills touched by the branch. It mergesgit diff --name-only <base>...HEADwithgit status --porcelain, so staged, unstaged and untracked working-tree files count too (renames at their destination) — uncommitted local edits are caught immediately. This keeps old skills from failing a PR that never touched them.--strictfails on warnings as well as errors.
If you ran agore-skill init, you already have this gate as
.github/workflows/agore-skill.yml: its verify job runs inspect --changed,
lint --changed --strict and eval on pull requests and pushes to main,
and its release job publishes on v* tag pushes. The full file and the
--no-ci/--force options around it are in the
init reference.
Exit codes
| Exit code | Meaning |
|---|---|
0 | No errors, and — under --strict — no warnings either. |
1 | At least one Error, or at least one Warning under --strict. |
Two details worth pinning down:
strictcan also be set permanently inagore.yaml(skill.lint.strict: true); the--strictflag forces it on regardless.- A repository with no discovered skills exits
0and printsNo skills found.— an empty repo does not fail CI.
The exact failure text is Lint found blocking diagnostics.
Machine-readable output
For tools that want to annotate the diff, use the flat JSON form:
agore-skill lint --json[
{
"rule_id": "CTX-002",
"severity": "Error",
"skill": "demo-skill",
"file": "references/missing.md",
"message": "referenced file \"references/missing.md\" does not exist in skill directory"
}
]Note the shape: --json emits a flat array of Diagnostic objects, not a
grouped-per-skill structure. Clean output is [].
Ignoring rules you do not want
Set an ignore list in agore.yaml:
skill:
lint:
ignore:
- TRIG-001
- CTX-003Ignored rule IDs are skipped entirely, for every skill. Use it sparingly:
ignoring CTX-002 would hide dead references, which is almost never what you
want in CI.
Fixing each common failure
Diagnose from the rule ID in the table or JSON, then apply the matching fix.
SPEC-001 — missing or broken frontmatter. SKILL.md must start with
---, contain a YAML block, and close with ---. Add the delimiters or fix
the YAML syntax.
SPEC-002 — name problems. The frontmatter name must be kebab-case, at
most 64 chars, and exactly match the skill directory's base name. Rename the
directory or the field so both read demo-skill.
SPEC-003 — description problems. The description must be non-empty and
at most 1024 characters; compatibility at most 500. Trim or write the
description.
LAYOUT-001 — nested too deeply. The skill directory must be the repo root
(.) or exactly something/skill-name — the depth that skills.sh discovery
understands. Move the skill up to the root or under skills/.
TRIG-001 — weak trigger description (warning). The description is shorter than 40 characters or lacks trigger wording. Rewriting it to start with "Use when …" and describing the actual trigger conditions fixes it.
CTX-001 — budget exceeded (warning). L1/L2 token or line budgets from
skill.lint.budgets were crossed. Shorten the description, trim the body, or
move detail into references/ files. Raising the budgets is a legitimate last
resort — they are project policy, not hard limits.
CTX-002 — dead reference (error). A file linked from SKILL.md does not
exist. Fix the path, or create the file, or remove the link. This one is an
error, so it always fails the build.
CTX-003 — progressive disclosure orphan (warning). A file under
references/ or scripts/ is never referenced in SKILL.md. Either link it
([references/guide.md](references/guide.md)) or delete it.
SEC-001 — secret or local path (error). The content matches a hardcoded
credential pattern (sk-…, ghp_…, AKIA…) or a local absolute path such as
/Users/you/.... Remove the secret, load it from the environment instead,
and use repo-relative paths.
SEC-002 — script hygiene (warning). A file under scripts/ lacks
executable permission or a shebang line. Run chmod +x scripts/run.sh and
start the file with #!/usr/bin/env sh (or equivalent).
Related
- The complete rule table with severities and trigger logic: Lint rules reference
- The full flag table and behavior: lint reference
- A full local CI gate including lint, with act on your workstation: Run CI locally with act