oc-git-ops — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited oc-git-ops (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
On first invocation, read `references/orchestrator.md` and follow its welcome protocol.
Move code from Claude's workspace to a git repository with proper branch management, commit structure, and PR descriptions. This is the bridge between "Claude built it" and "it's in version control."
When the user types /oc-git-ops, display this menu:
GIT OPS COMMANDS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WORKFLOW
/oc-git-init Clone repo + set up workspace for a project
/git-branch Create a feature branch from convention
/oc-git-commit Stage + commit with structured message
/oc-git-pr Generate PR description from commits/checkpoint
/git-push Push branch to remote
/oc-git-sync Full workflow: branch → commit → push → PR
UTILITIES
/oc-git-status Show current branch, staged changes, remote state
/git-diff Show what's changed since last commit
/oc-git-convention Show/set naming conventions for this project
/checkpoint Show checkpoint status
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Type any command to begin. /oc-git-ops to see this again.CLAUDE WORKSPACE GIT REPO
/home/claude/project/ github.com/user/project
Built files ──────► Feature branch
+ checkpoint data ──────► Structured commits
+ audit report ──────► PR descriptionThe typical flow:
# Clone the repo
git clone <repo-url> /home/claude/<project-name>
cd /home/claude/<project-name>
# Verify remote
git remote -v
# Check default branch
git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'cd /home/claude/<project-name>
git fetch origin
git checkout main && git pull origin mainGit operations require auth. Check in this order:
ls ~/.ssh/id_* (preferred for push)git config credential.helperGITHUB_TOKEN or GH_TOKENor set up SSH?"
Store auth method in the checkpoint so future sessions don't re-ask.
<type>/<short-description>
Types:
feat/ New feature
fix/ Bug fix
refactor/ Code restructure (no behavior change)
chore/ Dependencies, config, tooling
docs/ Documentation only
test/ Test additions or fixes
deploy/ Deployment-related changesExamples:
feat/pintrack-substance-modulefix/auth-session-expirychore/update-wrangler-configdeploy/add-staging-workflowIf an oc-app-architect checkpoint exists, derive the branch name from it:
feat/sprint-1-auth-flowfix/audit-f001-rate-limitingdeploy/ci-cd-pipelineSet or view the project's naming conventions:
# Store in project config
cat > .git-ops-config.json << 'EOF'
{
"branch_prefix": "feat|fix|refactor|chore|docs|test|deploy",
"commit_format": "conventional",
"default_base": "main",
"pr_template": true,
"auto_lint_before_commit": true
}
EOF<type>(<scope>): <description>
[optional body]
[optional footer]| Type | When |
|---|---|
feat | New feature for the user |
fix | Bug fix |
refactor | Code change that doesn't fix a bug or add a feature |
chore | Tooling, deps, config |
docs | Documentation |
test | Adding or fixing tests |
ci | CI/CD changes |
style | Formatting (no logic change) |
One commit per logical unit of work. Rules of thumb:
| Change Size | Commit Strategy |
|---|---|
| Single file fix | 1 commit |
| New component (file + test + styles) | 1 commit |
| New feature (multiple files) | 1 commit per layer: schema → API → frontend → tests |
| Full sprint | 3-6 commits following the build order |
| Config/tooling changes | 1 commit, separate from feature work |
When oc-app-architect completes a Phase 6 sprint, oc-git-ops can auto-structure commits:
# Read the sprint contract for commit scoping
# Each contract deliverable becomes one commit
# Example for Sprint 1: Auth
git add src/db/migrations/ src/db/schema.ts
git commit -m "feat(db): add users and sessions tables"
git add src/auth/ src/middleware/session.ts
git commit -m "feat(auth): implement WebAuthn passkey flow"
git add src/auth/__tests__/ tests/
git commit -m "test(auth): add unit + integration tests for passkey auth"Before staging files or running `git commit`, invoke the oc-bug-check skill. This is the canonical pre-commit gate — oc-git-ops does NOT run its own ad-hoc lint/type/test checks. Bug-check owns the seven-check suite (types, lint, tests, anti-patterns, secrets, build, deps) and decides PASS or FAIL.
Skill(skill="oc-bug-check", args="/oc-bugcheck run")Then read .checkpoints/oc-bug-check.checkpoint.json for the verdict.
| Verdict | Action |
|---|---|
| PASS | Proceed to git add + git commit |
| FAIL | ABORT. Surface the failing checks and offer the user /oc-bugcheck fix (auto-fix lint/format) or /oc-bugcheck bypass (logged override). Do NOT call git commit until verdict flips to PASS or the user explicitly bypasses. |
| (no checkpoint) | Bug-check hasn't run — invoke it first. |
The runtime also has a PreToolUse(Bash) hook at .claude/hooks/pre-commit-bugcheck.sh that blocks git commit when the oc-bug-check checkpoint is missing or stale (>10min) or has a non-PASS verdict. The hook is the safety net; this section is the contract that keeps the assistant from tripping it.
Pull from all available sources to build a comprehensive PR description:
git log main..HEAD --oneline## Summary
[2-3 sentences: what this PR does and why]
**Linked ticket:** [TICKET-1234](ticket-url)
## Changes
[Auto-generated from commit messages, grouped by type]
### Features
- [feat commits]
### Fixes
- [fix commits]
### Other
- [remaining commits]
## Testing
- [ ] Unit tests pass (`npm test`)
- [ ] Type check passes (`tsc --noEmit`)
- [ ] Manual testing completed
[If oc-app-architect Phase 6: "Evaluated by oc-app-architect evaluator: X.X/10 (sprint N)"]
## Audit Status
[If oc-code-auditor ran: "Pre-deploy audit: Grade [X], [N] findings ([M] addressed in this PR)"]
[If not: "No code audit run — consider `/oc-audit pre-deploy` before merging"]
## Deployment Notes
[Any migration steps, env var additions, or config changes needed]
[Auto-detected from: new migration files, .env.example changes, wrangler.toml changes]
Refs: TICKET-1234# If gh CLI is available
gh pr create --title "[type]: [description]" --body-file /tmp/pr-description.md
# If not, output the description for the user to paste
echo "PR description saved to: /mnt/user-data/outputs/pr-description.md"
echo "Create the PR manually and paste this description."One command that runs the entire flow:
/oc-git-sync [description]git checkout -b <branch>Skill(skill="oc-bug-check", args="/oc-bugcheck run"). FAIL aborts the sync — surface the failing checks and stop. The user can /oc-bugcheck fix, /oc-bugcheck bypass, or address the failures and re-run /oc-git-sync.git push -u origin <branch>At each step, show progress. If any step needs user input, ask once and continue.
After /oc-git-sync completes successfully:
"Changes pushed. Run /oc-deploy staging to deploy to staging?"
"Changes pushed. Run /oc-deploy init to set up deployment, or /oc-audit pre-deploy for a quality check."
If a GOVERNANCE.md file exists in the project root (generated by oc-app-architect or the project-governance skill), read it before committing. Respect:
If governance conventions conflict with oc-git-ops defaults, governance wins — it's project-specific, oc-git-ops defaults are generic.
{project-dir}/.checkpoints/oc-git-ops.checkpoint.json
| Event | What to Save |
|---|---|
| Repo cloned/verified | Repo URL, default branch, auth method |
| Branch created | Branch name, base branch, purpose |
| Commits made | Commit SHAs, messages, file counts |
| Push completed | Remote URL, branch pushed, timestamp |
| PR created | PR URL, PR number |
| PR merged | Append { number, title, merge_method, merge_sha, merged_at } to skill_state.merged_prs. Re-stamp updated_at. |
Restamp merged_prs at sensible inflection points — after a review wave, when a release ships, or when a session ends — not once per merge. The single update is:
node scripts/checkpoint.mjs update oc-git-ops \
"--skill_state.merged_prs+:json={...}" \
"--step=last-merge-#${PR_NUM}" \
"--status=complete"Do not automate this per-merge. opchain.dev once ran a.github/workflows/checkpoint-after-merge.ymlthat opened abot/checkpoint-stamp-<PR>PR on every merge tomain. It was removed 2026-06-22: under branch protection the bot's auto-merge could never satisfy required review, so each merge left a permanent open PR, and because every PR appended to the samemerged_prsarray they mutually conflicted. The data is reconstructable fromgit log, so a CI-gated PR per merge is pure cost. See Anti-pattern: don't auto-stamp `merged_prs` per merge in the checkpoint protocol. Other skills' checkpoints (oc-orchestrator, oc-app-architect, oc-ux-engineer, etc.) stay assistant-driven because their content is contextual.
{
"key_decisions": [
"Repo: github.com/user/aidops-core",
"Auth: SSH key",
"Convention: conventional commits, feat/fix/chore prefixes",
"Last push: feat/pintrack-module → origin, 6 commits"
],
"generated_files": [
"pr-description.md"
]
}| Reads from | Why |
|---|---|
| oc-app-architect | Roadmap tasks → PR description, phase → branch naming; Phase 6 sprint contract → commit scoping, eval scores → PR description |
| oc-code-auditor | Audit grade → PR description, findings → commit grouping |
| oc-deploy-ops | Deploy status → PR deployment notes |
When committing, always verify these are gitignored:
node_modules/
.env
.env.local
dist/
build/
.wrangler/
.checkpoints/ # Checkpoint protocol files
*.checkpoint.json.bak # Archived checkpoints
.git-ops-config.json # Local oc-git-ops configIf .gitignore is missing entries, add them in a separate chore: update .gitignore commit before the feature commits.
When the user invokes any verb with a ticket id — /oc-git-sync TICKET-1234, /oc-commit --ticket PLAT-12, or pastes a Linear / Jira / GitHub Issues URL — oc-git-ops reads the ticket via the configured PM-MCP and uses it for branch, commit, and PR shape.
The runtime contract — concrete tool names, retry policy, idempotency markers, and the pm_deferred_actions[] schema — lives in oc-integrations-engineer/references/pm-mcp-protocol.md. All MCP calls below honour that contract; this section says only how oc-git-ops shapes branch / commit / PR / state from the ticket.
/oc-git-sync TICKET-1234 flow.opchain/pm.yaml (or detect from id pattern/ URL). Apply tool_overrides from pm.yaml before falling through to the registry in protocol §1.
get_issue tool (Linear:mcp__claude_ai_Linear__get_issue; GitHub: mcp__mcp-server-github__issue_read; Jira: mcp__atlassian__jira_get_issue) to fetch title, description, labels, priority, status, assignee. Apply the retry policy from protocol §2.
{type}/{id}-{title-kebab-truncated-50},where type is derived from the ticket type / labels: feat, fix, chore, docs, refactor. Default feat if ambiguous. The ticket id is mandatory and must preserve the PM tool's canonical casing in the branch name (for example, feat/TICKET-1234-runtime-pm-mcp-made-real or fix/PROJ-57-auth-session-expiry). Do not drop or rewrite the id: Linear / Jira / GitHub integrations auto-link PRs by detecting the ticket id in branch / PR metadata.
{type}({scope}): {title}.Body: short paragraph summarising the change; trailer Refs: TICKET-1234 (or Closes: if the ticket is in a "ready-to-close" state).
[TICKET-1234] followed bythe concise change summary. Body is generated from the ticket description, the diff summary, and the auditor / oc-bug-check report (if present). It includes a top-line **Linked ticket:** [TICKET-1234](url) and a plain-text Refs: TICKET-1234 footer so Linear can auto-link even if branch detection fails.
list_comments tool (Linear)or issue_read (GitHub, comments inline) for marker <!-- opchain:oc-git-ops:pr-opened:#<pr-number> -->. If absent, call the registry-resolved add_comment tool (Linear: mcp__claude_ai_Linear__save_comment; GitHub: mcp__mcp-server-github__add_issue_comment) with body <!-- opchain:oc-git-ops:pr-opened:#<pr-number> -->\nPR opened: <url>. Then resolve the in_review state string from pm.yaml.states and call the transition tool (Linear / GitHub: save_issue / issue_write with state field; Jira: mcp__atlassian__jira_transition_issue).
/oc-git-sync --closed) — same pre-write check pattern with marker <!-- opchain:oc-git-ops:pr-merged:#<pr-number> -->; comment carries the merge SHA + commit subject; transition to done (resolved from pm.yaml.states).
/oc-commit enrichmentIf a ticket id appears in the user's prompt but no /oc-git-sync, just enrich the commit body with Refs: TICKET-1234 and stop — the comment + transition is /oc-git-sync territory. No MCP call is made by /oc-commit alone.
If the staged diff spans multiple tickets (e.g. user says "this closes PLAT-1 and PLAT-2"), use the first as the branch / PR primary and add a Refs: line per additional ticket. Comment on each via add_comment, each carrying its own ticket-scoped marker <!-- opchain:oc-git-ops:pr-opened:#<pr-number>:<ticket-id> --> so re-runs are idempotent per ticket.
/oc-git-sync --retry-pm flushInvokes the protocol §4 flush against oc-git-ops.checkpoint.json pm_deferred_actions[]. Filter to skill: "oc-git-ops" and retriable: true. Surfaces flushed N / failed M.
prompt and generic commit message; never block the commit on PM-MCP. The PR still opens.
prompt; do not call MCP.
add_comment retry-budget exhausted (transient) → defer perprotocol §4 with retriable: true; user can /oc-git-sync --retry-pm later. The PR is unaffected.
retriable: false; surfacethe permission error; never auto-flush. The PR is unaffected.
The unit is "one thing a reviewer can understand in isolation."
feat/sprint-2-crud-api beats update-stuff.should explain why this change exists without reading the code.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.