Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Coco Ship

ASecurity

Use when finished work needs to reach a coco-managed repository (coco-research/coco or similar) — verifies branch state, commits, pushes through the corporate DLP guard only when actually needed, opens a PR against main, waits for CI, and reports the result. Never merges, never pushes to main directly.

477 stars
0 votes
0 copies
0 views
Added 9/23/2026
ai-agentsgobashgit

Security Analysis

A100/100

Scanned 9/23/2026

$npx -y skills add coco-research/coco --skill coco-ship --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Coco Ship?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Coco Ship
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/coco-research-coco-ship/badge)](https://www.skillsdirectory.com/skills/coco-research-coco-ship)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: coco-ship
description: Use when finished work needs to reach a coco-managed repository (coco-research/coco or similar) — verifies branch state, commits, pushes through the corporate DLP guard only when actually needed, opens a PR against main, waits for CI, and reports the result. Never merges, never pushes to main directly.
domain: engineering
user-invocable: true
---

# Shipping to a CoCo-managed Repo

## Overview

Formalizes the branch → commit → guard-aware push → PR → CI-wait → report flow used for shipping
work to `coco-research/coco` (or any repo carrying the same corporate git-guard pre-push hook), so it
doesn't have to be re-derived by hand each time.

**Core principle:** Verify state → commit → detect whether the guard actually applies → confirm →
push → open PR → wait for real CI → report. Never merge. Never push to `main` directly, regardless of
how it's asked.

**Announce at start:** "I'm using the coco-ship skill to ship this branch."

This is the direct formalization of Option 2 ("Push and Create PR") in
`finishing-a-development-branch`, specialized for repos that carry the corporate git-guard. It
assumes implementation is already done and reviewed — it doesn't replace planning skills like
`brainstorming`, `writing-plans`, or GSD's phase workflow, and it doesn't run tests itself (that's
`finishing-a-development-branch`'s Step 1, or the project's own CI).

## The Process

### Step 1: Preflight

```bash
git status -sb
git branch --show-current
```

**If the current branch is `main` or `master`:** stop. Do not commit or push here. Offer to create a
feature branch first:

```bash
git checkout -b <feature-branch-name>
```

**If there's nothing to commit and the branch isn't already ahead of its upstream:** stop and say so
— there's nothing to ship.

### Step 2: Commit

Use the standard git-commit protocol already in effect for this harness — this isn't a new
invention, just invoked from inside the skill:

1. In parallel: `git status`, `git diff` (staged + unstaged), `git log` (recent messages, for style).
2. Draft a commit message from the actual diff — why, not just what — matching the repo's existing
   style.
3. Stage named files explicitly. Never `git add -A` or `git add .`.
4. Commit with a `Co-Authored-By` trailer, via a heredoc so formatting survives.
5. `git status` again to confirm a clean tree.

If a pre-commit hook fails, fix the issue, re-stage, and create a **new** commit — never `--amend` a
commit that a failed hook means never actually landed.

### Step 3: Detect whether the guard bypass is actually needed

Don't assume — check:

```bash
git remote -v
gh repo view <owner>/<repo> --json visibility,owner -q '"\(.visibility) \(.owner.login)"'
git config --show-origin --get core.hooksPath
```

A `GIT_GUARD_REASON` bypass is only needed when the repo is `PUBLIC` **and** the owner isn't on the
guard's allowlist — check the actual guard config or ask the user which org(s) it allows, rather than
assuming. If `core.hooksPath` doesn't point at the guard, don't assume a bypass is relevant on this
machine at all — say so.

### Step 4: Confirm — every time, no exceptions

This is an outward-facing action (push + open a PR), so it gets the same explicit go-ahead as any
other push or PR in this session, regardless of how directly `coco-ship` was invoked. State plainly:

- Target repo and branch
- Whether a guard bypass will be used, and the **exact** reason string (not a placeholder)
- That this opens a PR against `main` — it does not push to `main` directly

Wait for a clear yes before Step 5. Invoking this skill is not itself that approval.

### Step 5: Push

```bash
git push -u origin <branch>
```

Only when Step 3 determined a bypass is needed:

```bash
GIT_GUARD_REASON="<specific, real reason>" git push -u origin <branch>
```

**Never** `--no-verify`. **Never** a plain `--force`. A `--force-with-lease` update to an
already-open PR's branch is allowed, but still gets its own confirmation, separate from Step 4's.

### Step 6: Open the PR

```bash
gh pr create --base main --head <branch> --title "<title>" --body "$(cat <<'EOF'
## Summary
<2-3 bullets of what changed and why>

## Test plan
<what was verified, or a checklist of what to verify>
EOF
)"
```

Keep the title under 70 characters. Put detail in the body, not the title.

### Step 7: Wait for CI

```bash
gh pr checks <n> --watch
```

Don't report done while checks are still pending. If a check fails, say so plainly with the failure,
don't retry blindly.

### Step 8: Report

State the PR URL, the CI result, and the mergeable/review-required status. Say plainly that merging is
the user's call — **this skill never merges and never self-approves.** If the PR author can't
self-approve (most repos), say that explicitly rather than implying the PR is ready to merge on its
own.

## Quick Reference

| Step | Action | Confirmation needed? |
|------|--------|----------------------|
| 1 | Preflight (refuse on main) | — |
| 2 | Commit | — |
| 3 | Detect guard need | — |
| 4 | State plan, ask | **Yes — always** |
| 5 | Push | (covered by Step 4) |
| 6 | Open PR | (covered by Step 4) |
| 7 | Wait for CI | — |
| 8 | Report | — |

## Common Mistakes

**Assuming the guard bypass is needed without checking**
- **Problem:** Sets `GIT_GUARD_REASON` on every push, even to private or allowlisted repos, or misses
  that the guard isn't even installed on this machine.
- **Fix:** Always run Step 3's checks; only set the env var when the repo is genuinely public and
  non-allowlisted.

**Treating skill invocation as approval**
- **Problem:** Runs Steps 5–6 immediately because the user said "ship this," without a distinct
  confirmation of the actual push/PR plan.
- **Fix:** Step 4 is a separate, explicit ask every time — state the repo, branch, guard reason (if
  any), and that a PR (not a direct push to main) will follow.

**Reporting success before CI resolves**
- **Problem:** Says "done" right after `gh pr create`, while checks are still `pending`.
- **Fix:** Step 7 watches until every check resolves, then Step 8 reports the real result.

## Red Flags

**Never:**
- Push to `main` or `master` directly, no matter how it's requested
- Use `--no-verify` or a plain `--force`
- Auto-merge or self-approve a PR
- Fabricate a `GIT_GUARD_REASON` instead of a specific, true one
- Skip Step 4's confirmation because the work "seems done"

**Always:**
- Refuse and redirect if invoked while on `main`/`master`
- Check whether the guard bypass is actually needed rather than assuming
- Get explicit confirmation before the push/PR step
- Wait for and report real CI status, not an assumed one

## Integration

**Formalizes:** Option 2 of `finishing-a-development-branch` ("Push and Create PR"), specialized for
repos carrying the corporate git-guard.

**Distinct from:** `commands/team/ship.md` (`/team:ship`, a full idea-to-product pipeline) and
`systems/gsd/skills/gsd-ship` (GSD milestone-scoped). Neither overlaps with this skill's narrower job
— shipping already-finished work through the guard and into a PR.

**Pairs with:** `using-git-worktrees` for cleanup after the PR merges (not handled by this skill).

Attribution

coco-researchcoco-research
View sourceSee grades on GitHubMore from coco-research →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698461 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →