
Git Platform
- 92 installs
- 325 repo stars
- Updated August 2, 2026
- athola/claude-night-market
git-platform is a skill that git Platform is an agent skill that gives solo builders a single mental model for forge operations across GitHub (`gh`), GitLab (`glab`), and Bitbucket’s REST API.
About
Git Platform is an agent skill that gives solo builders a single mental model for forge operations across GitHub (`gh`), GitLab (`glab`), and Bitbucket’s REST API. Instead of guessing flag names or re-learning three toolchains, you get tabular mappings for issues and pull/merge requests—view, list, create, close, and comment—with Bitbucket spelled out as explicit HTTP calls where CLIs are thin. Use it while you are building and shipping: opening MRs from agent workflows, syncing issue state, or scripting triage in CI. It is reference-shaped integration knowledge, not a hosted bot; you still supply tokens, remotes, and repo slugs. The skill reduces agent mistakes when your org moves repos between hosts or when you maintain OSS that accepts contributions on more than one platform.
- Side-by-side issue ops: view, list, create, close, comment, search for gh vs glab vs Bitbucket REST
- PR/MR create, view, and list mappings between GitHub and GitLab CLIs
- Copy-paste curl patterns for Bitbucket where no first-class CLI is assumed
- Cross-platform vocabulary so agents do not hallucinate GitHub-only flags on GitLab
- Complete command mapping reference for forge automation scripts
Git Platform by the numbers
- 92 all-time installs (skills.sh)
- Ranked #243 of 733 Git & Pull Requests skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/athola/claude-night-market --skill git-platformAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 92 |
|---|---|
| repo stars | ★ 325 |
| Security audit | 3 / 3 scanners passed |
| Last updated | August 2, 2026 |
| Repository | athola/claude-night-market ↗ |
How do I run issues and pull requests the same way across GitHub, GitLab, and Bitbucket using gh, glab, and REST equivalents.?
Run issues and pull requests the same way across GitHub, GitLab, and Bitbucket using gh, glab, and REST equivalents.
Who is it for?
Best when you're working on git & pull requests and need structured help with git platform.
Skip if: Teams with no git & pull requests needs, or anyone wanting a generic chat assistant without this specific workflow.
When should I use this skill?
When you need to run issues and pull requests the same way across GitHub, GitLab, and Bitbucket using gh, glab, and REST equivalents., or when git platform is an agent skill that gives solo builders a single mental model
What you get
Structured output aligned to git-platform: Side-by-side issue ops: view, list, create, close, comment, search for gh vs glab vs Bitbucket REST, PR/MR create, view, and list mappings between GitHub and GitLab CLIs.
Files
Table of Contents
- Overview
- When to Use
- Platform Detection
- Quick Command Reference
- Terminology
- Integration Pattern
- Detailed Resources
- Exit Criteria
Git Platform Detection & Command Mapping
Overview
Cross-platform abstraction for git forge operations. Detects whether the current project uses GitHub, GitLab, or Bitbucket, and provides equivalent CLI commands for each platform.
The SessionStart hook (detect-git-platform.sh) automatically injects the detected platform into session context. This skill provides the command reference for translating operations across platforms.
When To Use
- Before running
gh,glab, or forge API commands - When a skill or command needs to create issues, PRs/MRs, or post comments
- When writing CI/CD configuration
- Any time forge-specific CLI commands appear in a workflow
When NOT To Use
- Local-only git operations (
git commit,git branch, etc.) - Projects without a hosted git remote
Platform Detection
Detection is automatic via the SessionStart hook. The session context will contain:
git_platform: github|gitlab|bitbucket, cli: gh|glab, mr_term: pull request|merge requestIf you need to re-detect manually:
# Check remote URL
git remote get-url origin 2>/dev/null
# Check file markers
ls -d .github/ .gitlab-ci.yml bitbucket-pipelines.yml 2>/dev/null
# Check CLI availability
command -v gh && echo "GitHub CLI available"
command -v glab && echo "GitLab CLI available"Quick Command Reference
| Operation | GitHub (gh) | GitLab (glab) |
|---|---|---|
| View issue | gh issue view N --json title,body,labels | glab issue view N |
| List issues | gh issue list --json number,title | glab issue list |
| Create issue | gh issue create --title "T" --body "B" | glab issue create --title "T" --description "B" |
| Close issue | gh issue close N | glab issue close N |
| Comment on issue | gh issue comment N --body "msg" | glab issue note N --message "msg" |
| View PR/MR | gh pr view N | glab mr view N |
| Create PR/MR | gh pr create --title "T" --body "B" | glab mr create --title "T" --description "B" |
| List PR/MR comments | gh api repos/O/R/pulls/N/comments | glab mr note list N |
| Current PR/MR | gh pr view --json number | glab mr view --json iid |
| Resolve threads | gh api graphql | glab api graphql |
| Repo info | gh repo view --json owner,name | glab repo view |
For Bitbucket: No standard CLI exists. Use REST API (curl) or the web interface. See command-mapping module for API equivalents.
Terminology
| Concept | GitHub | GitLab | Bitbucket |
|---|---|---|---|
| Code review unit | Pull Request (PR) | Merge Request (MR) | Pull Request (PR) |
| CI configuration | .github/workflows/*.yml | .gitlab-ci.yml | bitbucket-pipelines.yml |
| Default branch | main | main | main |
| Review comments | PR review comments | MR discussion notes | PR comments |
Important: When the platform is GitLab, always say "merge request" (not "pull request") in user-facing output, commit messages, and comments.
Integration Pattern
Skills that perform forge operations should:
1. Declare dependencies: [leyline:git-platform] 2. Check the session context for git_platform: 3. Use the command mapping table above 4. Fall back gracefully if CLI is unavailable
# Example skill instruction pattern:
## Step N: Create PR/MR
Use the detected platform CLI (check session context for `git_platform`):
- **GitHub**: `gh pr create --title "..." --body "..."`
- **GitLab**: `glab mr create --title "..." --description "..."`
- **Bitbucket**: Create via web interfaceDetailed Resources
- Full command mapping: See modules/command-mapping.md for complete API equivalents, GraphQL queries, and Bitbucket REST API patterns
- Authentication: See
Skill(leyline:authentication-patterns)forensure_auth github|gitlab
Exit Criteria
- Platform detected (or explicitly unknown)
- Correct CLI tool used for all forge operations
- Platform-appropriate terminology in user-facing output
Complete Command Mapping
Full cross-platform command equivalents for forge operations.
Issue Operations
| Operation | GitHub (gh) | GitLab (glab) | Bitbucket (REST API) |
|---|---|---|---|
| View | gh issue view N --json title,body,labels,assignees,comments | glab issue view N | curl -s "https://api.bitbucket.org/2.0/repositories/OWNER/REPO/issues/N" |
| List | gh issue list --json number,title | glab issue list | curl -s "https://api.bitbucket.org/2.0/repositories/OWNER/REPO/issues" |
| Create | gh issue create --title "T" --body "B" | glab issue create --title "T" --description "B" | curl -X POST -d '{"title":"T","content":{"raw":"B"}}' "https://api.bitbucket.org/2.0/repositories/OWNER/REPO/issues" |
| Close | gh issue close N --comment "reason" | glab issue close N | curl -X PUT -d '{"state":"resolved"}' ".../issues/N" |
| Comment | gh issue comment N --body "msg" | glab issue note N --message "msg" | curl -X POST -d '{"content":{"raw":"msg"}}' ".../issues/N/comments" |
| Search | gh issue list --search "query" | glab issue list --search "query" | N/A (filter client-side) |
PR/MR Operations
| Operation | GitHub (gh) | GitLab (glab) |
|---|---|---|
| Create | gh pr create --title "T" --body "B" | glab mr create --title "T" --description "B" |
| View | gh pr view N --json number,title,body,state | glab mr view N |
| List | gh pr list | glab mr list |
| Diff | gh pr diff N | glab mr diff N |
| Merge | gh pr merge N | glab mr merge N |
| Close | gh pr close N | glab mr close N |
| Review | gh pr review N --approve | glab mr approve N |
| Comments | gh api repos/O/R/pulls/N/comments | glab api projects/ID/merge_requests/N/notes |
| Current | gh pr view --json number,url -q '.number' | glab mr view --json iid -q '.iid' |
GraphQL Operations
GitHub
gh api graphql -f query='
query {
repository(owner: "OWNER", name: "REPO") {
pullRequest(number: N) {
reviewThreads(first: 100) {
nodes { id isResolved path }
}
}
}
}'GitLab
glab api graphql -f query='
query {
project(fullPath: "OWNER/REPO") {
mergeRequest(iid: "N") {
discussions { nodes { id resolved notes { nodes { body } } } }
}
}
}'CI/CD Configuration
| Feature | GitHub Actions | GitLab CI | Bitbucket Pipelines |
|---|---|---|---|
| Config file | .github/workflows/*.yml | .gitlab-ci.yml | bitbucket-pipelines.yml |
| Trigger syntax | on: push | rules: - if: | pipelines: branches: |
| Secret access | ${{ secrets.NAME }} | $NAME (CI variable) | $NAME (repository variable) |
| Artifact upload | actions/upload-artifact | artifacts: paths: | artifacts: |
Repo Metadata
| Operation | GitHub | GitLab |
|---|---|---|
| Owner/name | gh repo view --json owner,name -q '"\(.owner.login)/\(.name)"' | glab repo view --json path_with_namespace -q '.path_with_namespace' |
| Default branch | gh repo view --json defaultBranchRef -q '.defaultBranchRef.name' | glab repo view --json default_branch -q '.default_branch' |
| Labels | gh label list | glab label list |
Discussion Operations
Platform support: GitHub only (via GraphQL API). GitLab and Bitbucket do not have equivalent Discussion features. All operations below will be skipped with a warning on non-GitHub platforms.
Prerequisites
Before running any Discussion operation, resolve the repository ID and verify Discussions are enabled:
# Get repository node ID (required for createDiscussion)
gh api graphql -f query='
query($owner: String!, $repo: String!) {
repository(owner: $owner, name: $repo) {
id
hasDiscussionsEnabled
}
}' -f owner="OWNER" -f repo="REPO"Category Resolution
Discussion mutations require a category nodeId. Resolve from slug:
# List all discussion categories (slug → nodeId mapping)
gh api graphql -f query='
query($owner: String!, $repo: String!) {
repository(owner: $owner, name: $repo) {
discussionCategories(first: 25) {
nodes { id name slug description }
}
}
}' -f owner="OWNER" -f repo="REPO"CRUD Operations
| Operation | GitHub (gh api graphql) | GitLab / Bitbucket |
|---|---|---|
| List categories | See "Category Resolution" above | N/A |
| Create | See "Create Discussion" below | N/A |
| Comment | See "Add Comment" below | N/A |
| Mark answer | See "Mark as Answer" below | N/A |
| Search | See "Search Discussions" below | N/A |
| Get by number | See "Get Discussion" below | N/A |
| Update | See "Update Discussion" below | N/A |
Create Discussion
gh api graphql -f query='
mutation($repoId: ID!, $categoryId: ID!, $title: String!, $body: String!) {
createDiscussion(input: {
repositoryId: $repoId,
categoryId: $categoryId,
title: $title,
body: $body
}) {
discussion { number id url }
}
}' -f repoId="$REPO_ID" -f categoryId="$CATEGORY_ID" -f title="$TITLE" -f body="$BODY"Add Comment
gh api graphql -f query='
mutation($discussionId: ID!, $body: String!) {
addDiscussionComment(input: {
discussionId: $discussionId,
body: $body
}) {
comment { id url }
}
}' -f discussionId="$DISCUSSION_ID" -f body="$COMMENT_BODY"To reply to a specific comment (threaded):
gh api graphql -f query='
mutation($discussionId: ID!, $replyToId: ID!, $body: String!) {
addDiscussionComment(input: {
discussionId: $discussionId,
body: $body,
replyToId: $replyToId
}) {
comment { id url }
}
}' -f discussionId="$DISCUSSION_ID" -f replyToId="$PARENT_COMMENT_ID" -f body="$REPLY_BODY"Mark as Answer
Only works on Q&A category discussions:
gh api graphql -f query='
mutation($commentId: ID!) {
markDiscussionCommentAsAnswer(input: {
id: $commentId
}) {
discussion { id answerChosenAt }
}
}' -f commentId="$COMMENT_ID"Search Discussions
Search by keyword, category, and/or label:
gh api graphql -f query='
query($searchQuery: String!) {
search(query: $searchQuery, type: DISCUSSION, first: 10) {
discussionCount
nodes {
... on Discussion {
number
title
url
createdAt
category { name slug }
labels(first: 5) { nodes { name } }
answer { id body }
}
}
}
}' -f searchQuery="repo:OWNER/REPO category:decisions SEARCH_TERMS"Search query syntax supports: repo:, category:, label:, author:, is:answered, is:unanswered, plus free-text keywords.
Get Discussion
gh api graphql -f query='
query($owner: String!, $repo: String!, $number: Int!) {
repository(owner: $owner, name: $repo) {
discussion(number: $number) {
id
title
body
createdAt
category { name slug }
labels(first: 10) { nodes { name } }
answer { id body author { login } }
comments(first: 20) {
nodes {
id
body
author { login }
createdAt
isAnswer
}
}
}
}
}' -f owner="OWNER" -f repo="REPO" -F number=NUMBERNote: Use -F (not -f) for integer variables.
Update Discussion
gh api graphql -f query='
mutation($discussionId: ID!, $body: String!) {
updateDiscussion(input: {
discussionId: $discussionId,
body: $body
}) {
discussion { id url updatedAt }
}
}' -f discussionId="$DISCUSSION_ID" -f body="$UPDATED_BODY"List Recent Discussions by Category
Bounded query for listing recent discussions. The fetch-recent-discussions.sh SessionStart hook uses first: 5 for token budget compliance; adjust the limit as needed for other use cases:
gh api graphql -f query='
query($owner: String!, $repo: String!, $categoryId: ID!) {
repository(owner: $owner, name: $repo) {
discussions(first: 5, categoryId: $categoryId, orderBy: {field: CREATED_AT, direction: DESC}) {
nodes {
number
title
url
createdAt
body
labels(first: 5) { nodes { name } }
}
}
}
}' -f owner="OWNER" -f repo="REPO" -f categoryId="$CATEGORY_ID"Related skills
FAQ
What does git-platform do?
Git Platform is an agent skill that gives developers a single mental model for forge operations across GitHub (`gh`), GitLab (`glab`), and Bitbucket’s REST API.
When should I use git-platform?
When you need to run issues and pull requests the same way across GitHub, GitLab, and Bitbucket using gh, glab, and REST equivalents., or when git platform is an agent skill that gives developers a single mental model for forge operations across github (`gh`), gitlab (`glab`),
What are the main capabilities?
Side-by-side issue ops: view, list, create, close, comment, search for gh vs glab vs Bitbucket REST; PR/MR create, view, and list mappings between GitHub and GitLab CLIs; Copy-paste curl patterns for Bitbucket where no first-class CLI is assumed.
Is Git Platform safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.