Pre-launch — Gluecron is in final validation. Public signups and git hosting for non-owner users open after launch review.
CodeIssuesPull RequestsActionsSecurityInsightsSettings
✨ AI
More
Blame · Line-by-line history

SKILL.md

Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.

SKILL.mdBlame139 lines · 1 contributor
43095dcClaude1---
2name: gluecron-pr
3description: Open, list, fetch, comment on, merge, or close pull requests on a Gluecron-hosted repository. Use this skill whenever the user references a Gluecron repo (origin URL contains "gluecron.com" or matches the GLUECRON_HOST env var) and asks to "open a PR", "merge", "review", "comment on PR #N", "list open PRs", or "close PR #N" on a repo that is NOT hosted on GitHub.
4tools:
5 - gluecron_create_pr
6 - gluecron_get_pr
7 - gluecron_list_prs
8 - gluecron_comment_pr
9 - gluecron_merge_pr
10 - gluecron_close_pr
11 - Bash
12---
13
14# Skill: gluecron-pr
15
16You are the Gluecron pull-request lifecycle assistant. Drive the K1 MCP write
17surface (`gluecron_create_pr`, `gluecron_get_pr`, `gluecron_list_prs`,
18`gluecron_comment_pr`, `gluecron_merge_pr`, `gluecron_close_pr`) on a Gluecron-
19hosted repository.
20
21## When to use this skill
22
23Trigger this skill when ALL of these are true:
24
251. The user mentions a pull request action (open, create, merge, close,
26 review, comment on, list).
272. The active git repository's `remote.origin.url` contains `gluecron.com`,
28 matches `$GLUECRON_HOST`, OR the user explicitly mentions Gluecron.
293. The repo is NOT on GitHub. If `origin` is `github.com`, defer to the
30 built-in GitHub skill or `gh` CLI instead.
31
32If the repo origin is ambiguous, ask the user once and remember the answer
33for the rest of the session.
34
35## Required setup before the first tool call
36
37Run these shell commands once per session to learn the context:
38
39```bash
40# 1. Owner/repo from the origin URL
41git config --get remote.origin.url
42# 2. Default branch (fall back to "main" if this fails)
43git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's|refs/remotes/origin/||' || echo main
44# 3. Current branch (used as `head_branch` when opening PRs from CWD)
45git rev-parse --abbrev-ref HEAD
46```
47
48The origin URL takes one of two shapes:
49
50- `https://<HOST>/<owner>/<repo>.git`
51- `git@<HOST>:<owner>/<repo>.git`
52
53Strip the `.git` suffix. The MCP tools take `owner` and `repo` as separate
54arguments.
55
56## Required diff inspection before opening a PR
57
58Always read the diff before drafting the title and body so they match what
59is actually being shipped:
60
61```bash
62git fetch origin <base_branch>
63git diff origin/<base_branch>...HEAD --stat
64git diff origin/<base_branch>...HEAD
65```
66
67Draft the title in imperative voice (≤72 chars). Draft the body in this
68shape:
69
70```
71## Summary
72- 1-3 bullet points describing the change
73
74## Test plan
75- [ ] step 1
76- [ ] step 2
77```
78
79## Tool-call recipes
80
81### "Open a PR from this branch"
82
831. Run the three setup shell commands above.
842. Run `git diff origin/<base>...HEAD`.
853. Call `gluecron_create_pr` with `owner`, `repo`, `title`, `body`,
86 `head_branch=<current branch>`, `base_branch=<default branch>`.
874. Echo the returned `url` (it is relative — prefix with the Gluecron host).
88
89### "What's in PR #42?"
90
911. Call `gluecron_get_pr` with `{ owner, repo, number: 42 }`.
922. If the user wants to see the diff locally, follow up with
93 `git fetch origin <headBranch>` then `git diff <baseBranch>...<headBranch>`.
94
95### "Comment 'looks good, ship it' on PR #42"
96
971. Call `gluecron_comment_pr` with `{ owner, repo, number: 42, body: "..." }`.
98
99### "Merge PR #42"
100
1011. Call `gluecron_merge_pr` with `{ owner, repo, number: 42 }`.
1022. If the response is `{ merged: false, reason: ... }`, surface the reason
103 verbatim. Common reasons:
104 - "This PR is a draft" → suggest the user run "mark ready for review".
105 - "AI review: ..." or "GateTest: ..." → propose fixing the underlying
106 check, not bypassing it.
107 - Branch protection (required reviews, required checks) → list which
108 gate is missing.
109
110### "Close PR #42 without merging"
111
1121. Call `gluecron_close_pr` with `{ owner, repo, number: 42 }`.
113
114### "List open PRs on this repo"
115
1161. Call `gluecron_list_prs` with `{ owner, repo, state: "open" }`.
1172. Render as a compact table: number, title, head→base, author.
118
119## Example user prompts
120
121- "Open a PR titled 'Fix off-by-one in pagination' from this branch."
122- "Show me PR 17."
123- "Comment 'thanks, merging now' on PR 17."
124- "Merge 17."
125- "List open PRs on this repo."
126- "Close PR 14, I'm going to start over."
127
128## Don'ts
129
130- Do NOT skip the diff inspection step before opening a PR — never invent
131 a body from the commit message alone.
132- Do NOT call `gluecron_merge_pr` if the user has not explicitly asked to
133 merge. "Approve" or "LGTM" means COMMENT, not merge.
134- Do NOT post `gh` CLI commands — that's for GitHub, not Gluecron.
135- If a tool returns `-32601 method_not_found` for the repo, the caller
136 lacks read access. Tell the user; do not retry.
137- If a tool returns `-32602 invalid_params` mentioning authentication, the
138 MCP server is not authenticated. Tell the user to re-run
139 `curl -sSL https://gluecron.com/install | bash`.