/osprey:contributefrom osprey
Guides contributors through the OSPREY GitHub Flow workflow from working-tree changes to a merged PR on main. Handles branch creation, commits, PRs, CI failures, and rebasing for both internal and fork contributors.
Ships in osprey. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill walks a contributor from "I have a change" to "merged on main." It
is the connective tissue of OSPREY's GitHub Flow — branch off main, work,
validate, PR, merge — wrapping the existing scripts and skills you already
have so the contributor doesn't have to remember every gate.
The skill enters at whichever phase fits the contributor's current state. Run Phase 0: Orient first; the orient step decides where to pick up.
| For | Use |
|---|---|
| Splitting a messy working tree into clean, atomic commits | commit-organize (optional, external) |
| Just running pre-commit checks without the full journey | /osprey:pre-commit |
| Cutting a release / tagging a version | /osprey:release |
| Designing a new feature or capability | feature-dev / brainstorming |
OSPREY uses GitHub Flow with a single long-lived main branch. There are two
modes; detect which one applies on first run by inspecting git remote -v:
origin points to als-apg/osprey. Contributor has push
access. Flow: branch off main → push branch to origin → PR → self-merge after green CI.origin is a personal fork; another remote (typically
upstream) points to als-apg/osprey. Flow: branch off latest upstream/main → push branch to origin (the fork) → PR upstream → maintainer merges.If neither remote points to als-apg/osprey, ask the contributor. If origin
appears to be a fork but no upstream is configured, offer:
git remote add upstream https://github.com/als-apg/osprey.git
Mode detection is cheap; just re-detect each session rather than persisting.
Before changing anything, gather the lay of the land. Run these in parallel:
git status --short
git rev-parse --abbrev-ref HEAD
git remote -v
git fetch origin main --quiet && \
git rev-list --left-right --count HEAD...origin/main
Decide where to enter:
| Observed state | Enter at |
|---|---|
Uncommitted changes on main | Phase 1 (branch first, then commit) |
| Uncommitted changes on a topic branch | Phase 3 (commit) |
| Clean tree, topic branch, commits not pushed | Phase 4 (push) |
| Branch pushed, no PR yet | Phase 5 (open PR) |
| PR open with failing or pending CI | Phase 6 (watch and iterate) |
| PR green, internal mode | Phase 7 (merge) |
| Detached HEAD, mid-rebase, or conflicts | Resolve before proceeding |
Tell the contributor what you observed and which phase you're entering.
Hard block: refuse to commit while on
main. Branch protection rejects direct pushes anyway, but failing locally saves the round-trip and the "rejected" error after the contributor has already typed the commit message.
Sync local main against the canonical remote:
# internal mode
git checkout main && git pull --ff-only origin main
# fork mode
git fetch upstream && git checkout main && git merge --ff-only upstream/main
Suggest a branch name from the change description and validate against the
prefix convention from CONTRIBUTING.md:
feature/<short-kebab> — new functionalityfix/<short-kebab> — bug fixesdocs/<short-kebab> — documentation onlyrefactor/<short-kebab> — internal restructuringtest/<short-kebab> — tests onlyIf the proposed name doesn't match a prefix, warn and suggest an alternative. Accept the contributor's choice on insist — these are conventions, not invariants.
Create the branch:
git checkout -b <name>
If pre-commit hooks aren't installed in this clone, offer to install them once. Idempotent and safe on every fresh clone:
pre-commit install
The contributor edits code; the skill is mostly absent. Two reminders:
uv run python scripts/changelog_fragments.py check --base origin/main
names them in every verdict), in changelog.d/, named
<name>.<type>.md — user-visible work gets a real type, work users never see
gets internal. Use the issue number as the name when there is one —
745.fixed.md, where the leading number becomes the (#745) reference in
the released entry, so never start a name with a date and do not write
(#745) in the body yourself (the check rejects a repeated reference).
Otherwise use a short slug (gate.fixed.md). The
seven types, as example filenames: 745.added.md, 745.changed.md,
745.deprecated.md, 745.removed.md, 745.fixed.md, 745.security.md,
745.internal.md — internal is for work users never see. The body is the
bullet's text: one or two user-facing sentences, without the leading - .
Never add entries to CHANGELOG.md by hand — the release fold owns that
file. changelog.d/README.md has the full rules.commit-organize skill, if installed, to split it before
committing.Hard block: run
uv run python scripts/check.py quickbefore the commit. Catches formatting drift and broken imports before they enter history. Fixing a polluted commit later is much more expensive than failing fast.
Show git status and git diff --stat so the contributor sees exactly
what's about to land.
Stage surgically — list specific paths rather than git add -A. Blanket
adds occasionally sweep up .env, scratch files, or large binaries.
Run uv run python scripts/check.py quick. On failure, surface the output,
suggest the minimal fix, re-run. Don't commit until clean.
Compose a conventional commit message:
type(scope): summary
Optional body. Explain *why*, not *what* — the diff already shows what.
Where type ∈ {feat, fix, docs, refactor, test, chore, ci, build, perf}.
Subject ≤ 70 chars, imperative mood ("add", not "added"), no trailing
period. Separate the subject from the body with a blank line, and wrap the
body at 72 columns so git log stays readable in a narrow terminal.
The conventions come from Tim Pope, A Note About Git Commit Messages, and Chris Beams, How to Write a Git Commit Message.
Soft prompt: if the contributor's preferred message doesn't match the conventional form, propose a rewrite once. Accept their version on insist.
Soft prompt — changelog fragment: the check judges the committed
range and, with --worktree, staged and unstaged changes too, so run it
before committing:
uv run python scripts/changelog_fragments.py check --base origin/main --worktree.
When it reports a missing fragment, ask whether the branch needs one and
stage it. Pure internal work takes an internal fragment. Don't block
here; CI is the gate.
Commit, then git log -1 --stat so the contributor sees what was recorded.
Hard block: run
uv run python scripts/check.py fullbefore the push. CI minutes are shared and PR dashboards get noisy when obviously-broken branches sit waiting for triage. Pushing only what would have passed CI respects everyone's time.
Confirm the push target. Topic branches always go to the contributor's
personal remote, never to upstream:
origin (which is als-apg/osprey).origin (which is the contributor's fork).Run uv run python scripts/check.py full. On failure, surface output,
suggest the minimal fix, ask the contributor to amend or add a follow-up
commit.
Push with upstream tracking the first time. Confirm before — this is the first visible-to-others state-change in the journey:
git push -u origin <branch>
Hard block: run
uv run python scripts/check.py quick --changed origin/mainbeforegh pr create. Catches drift frommainthat surfaces only at merge time. Cheaper to find now than after CI burns minutes on the PR.
Compose the PR title and body:
changelog.d/. Sections:
## Summary — 1-3 bullets, why this change.## Changes — what landed.## Test plan — bulleted checklist of how this was validated.## Related issues — if any.Show the contributor the draft. They can edit before it goes out.
Open against als-apg/osprey:main:
# internal mode
gh pr create --base main --head <branch>
# fork mode (gh handles the cross-repo head spec)
gh pr create --repo als-apg/osprey
Print the PR URL and remind the contributor that CI will start running.
gh pr checks --watch
When checks complete:
All green → Phase 7.
No rows — gh pr checks printing nothing means the checks could not be
seen (not yet registered, or the call failed), not that they passed. That is
UNKNOWN: re-poll, or re-query with an explicit selector (gh pr checks <pr-number>); do not advance to the green branch on it.
Failures — fetch the failed run's logs, summarize the root cause, suggest
a minimal fix. The contributor edits, re-stage, re-commit (or git commit --amend if the broken commit is the tip and not yet pulled by anyone else).
Push again. Loop.
Stale checks because main moved — rebase:
git fetch origin main && git rebase origin/main
git push --force-with-lease
Always --force-with-lease, never plain --force — the lease prevents
clobbering work someone else might have pushed to your branch in the
meantime. Walk through any conflicts manually; do not force-push past a
conflict the contributor hasn't reviewed.
pre-commit.ci runs as a required check and may auto-fix style by pushing a
commit to your branch. If you see "pre-commit.ci - autofix" land, just
git pull --rebase before the next push.
Internal mode — when CI is green:
gh pr merge --merge --delete-branch
Linear history is not enforced, so --merge, --rebase, and --squash are
all accepted; pick --merge unless the branch is a single commit.
--delete-branch because long-lived branches aren't the model.
Fork mode — comment on the PR and ping a maintainer; merging is theirs to
do. The maintainer will use the same --merge --delete-branch from their
side.
After merge, sync local:
git checkout main && git pull --ff-only origin main
The journey ends here. The next change starts again at Phase 0.
Before any state-changing operation — git commit, git push, gh pr create,
gh pr merge — show the contributor exactly what's about to happen and ask
them to proceed. Reads (status, diff, fetch, log) don't need
confirmation.
The point is: every visible-to-others action has a deliberate moment where the contributor sees what's about to ship and can stop it.
A few facts about OSPREY's main branch protection that shape behaviour here:
pre-commit.ci - pr
and All CI Checks Passed, the aggregate job every CI lane feeds. There is
no admin bypass; enforce_admins is on. If a required check is genuinely wrong (a
flaky runner, a broken matrix), fix it forward — don't try to bypass.--force-with-lease.main is rejected. This skill never tries; the hard
block in Phase 1 mirrors the server-side rule so the contributor fails
locally instead of after typing a commit message.required_approving_review_count: 0),
so internal-mode contributors can self-merge once CI is green. Fork-mode
contributors still need a maintainer to merge.If the contributor hits an unexpected branch-protection error, surface the GitHub message verbatim; the skill should not pretend the rules are looser than they are.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
12 skills in this plugin
/build-appBuild an OSPREY app: a panel in the web terminal's sidebar, the backend container behind it, and the agent tools that reach the same backend, all declared in one app.yml. Use whenever someone wants to create, scaffold, extend or fix an OSPREY app or application, runs or asks about `osprey app new` / `osprey app check`, edits an app.yml, adds a tool, a route, a write with an approval card, or a skill or subagent to an app, or wants an operator screen that the agent can also read and drive, even when they only say "panel with a backend" or "give the agent a tool for X". Works in a facility deployment repo with OSPREY installed and in an OSPREY checkout. Starts by checking itself against the installed OSPREY's app contract. For a static themed page with no backend and no tools, use the panel skill instead.
/design-philosophyOSPREY's design and architecture principles — the rules that define how OSPREY code should be structured, and the anti-pattern each one prevents. Consult before designing, adding, or reviewing any feature (connectors, MCP servers, providers, capabilities, CLI, registry, runtime, config), and when redirecting work that is drifting from these principles. Trigger when the user says "is this the right direction", "does this fit OSPREY", "this feels wrong", "check the design philosophy", or points an agent at how OSPREY code should look. Apply before adding a config knob, a new abstraction, a new subsystem, or anything touching hardware-write safety./doc-syncUse when a maintainer wants to know where a page under docs/source says something the code no longer does — before cutting a release, after a long stretch of merges, or when one page is suspected of describing a flag, key, default, or procedure that has moved on. Triggers: "run doc-sync", "sync the docs", "do the docs match the code", "is this page still right", "check the how-to guides", "validate the docs", "doc drift", "audit the docs", "which pages went stale". Prefer it over reading a page and forming an opinion whenever the question is "is what this page says still true". Config comments, shipped prompts, runtime messages, and pinned versions are not doc pages; those are osprey:housekeeping.
/facility-reviewResolves what the OSPREY facility build flags, with the person who maintains the facility repository: runs `osprey facility validate`, investigates every stop and warning it prints, groups the ones that share a cause, asks one evidence-backed question per group, writes each confirmed answer into `fixes.yaml` or `policy.yaml` (or proposes a diff to an authored facility file), rebuilds, and shows the finding gone. Use whenever a facility build stops or warns, whenever someone pastes a `facility: <kind>: ...` line, after `osprey facility import` brings in a cable schedule, rack layout, MML export or channel list, and when someone says "review my facility", "clean up the facility warnings", "two sources disagree", "contested relations", "layer-conflict", "which source wins", or asks why a relation is contested or superseded, even if they do not name this skill.
/housekeepingUse when a maintainer wants to know where OSPREY tells its users something that is no longer true — before cutting a release, after a long stretch of merges without one, or when the generated project, a shipped skill, a runtime message, or a pinned version is suspected of having fallen behind the code — or when the shipped presets, which are supposed to agree (hello-world and demo), may have drifted apart. Triggers: "run housekeeping", "check for drift", "what has rotted", "is anything stale", "housekeeping report", "sweep the repo", "preset parity", "do the presets still agree", "what maintainer chores are outstanding", "pre-release drift check". Prefer it over ad-hoc grepping whenever the question is "has anything drifted" rather than "fix this one thing". Doc-page prose is not this skill's job; that is osprey:doc-sync.
/panelAuthor a new OSPREY web-terminal panel — a self-contained, themed HTML mini-app the terminal mounts beside the chat. Use whenever someone wants to create, author, add, scaffold, or build an OSPREY panel, a design-system panel, or a standalone themed surface for the web terminal. Produces a token-only panel that passes the panel validator.
npx claudepluginhub als-apg/osprey --plugin ospreyOther plugins' skills for the same job