Xpersona
G

git-platform

CLAWHUB · Unverified

Detects git forge (GitHub/GitLab/Bitbucket) and maps CLI commands cross-platform

62
Rank
84
Safety
1.6k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.6K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17emme0e2m3cpf7k2jvp3a84984b8z9:nm-leyline-git-platform
  1. Install using `clawhub skill install s17emme0e2m3cpf7k2jvp3a84984b8z9:nm-leyline-git-platform` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/athola/nm-leyline-git-platform before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-leyline-git-platform/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

143,639 characters of source documentation, loaded on request.

Extracted files

4 files captured from the source.

SKILL.md

---
name: git-platform
description: Detects git forge (GitHub/GitLab/Bitbucket) and maps CLI commands cross-platform
version: 1.9.8
triggers:
  - git
  - platform
  - github
  - gitlab
  - bitbucket
  - cross-platform
  - forge
  - writing skills that must run on any git hosting provider
metadata: {"openclaw": {"homepage": "https://github.com/athola/claude-night-market/tree/master/plugins/leyline", "emoji": "\ud83e\udd9e", "requires": {"config": ["night-market.authentication-patterns"]}}}
source: claude-night-market
source_plugin: leyline
---

> **Night Market Skill** — ported from [claude-night-market/leyline](https://github.com/athola/claude-night-market/tree/master/plugins/leyline). For the full experience with agents, hooks, and commands, install the Claude Code plugin.


## Table of Contents

- [Overview](#overview)
- [When to Use](#when-to-use)
- [Platform Detection](#platform-detection)
- [Quick Command Reference](#quick-command-reference)
- [Terminology](#terminology)
- [Integration Pattern](#integration-pattern)
- [Detailed Resources](#detailed-resources)
- [Exit Criteria](#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 request
```

If you need to re-detect manually:

```bash
# 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 

_meta.json

{
  "ownerId": "kn7d107jg9jv602h9ytsegydq184a42s",
  "slug": "nm-leyline-git-platform",
  "version": "1.9.19",
  "publishedAt": 1787750085535
}

modules/command-mapping.md

# 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
```bash
gh api graphql -f query='
query {
  repository(owner: "OWNER", name: "REPO") {
    pullRequest(number: N) {
      reviewThreads(first: 100) {
        nodes { id isResolved path }
      }
    }
  }
}'
```

### GitLab
```bash
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 own

skill-card.md

## Description:

Detects git forge (GitHub/GitLab/Bitbucket) and maps CLI commands cross-platform.

This skill is ready for commercial/non-commercial use.

## Publisher:

[athola](https://clawhub.ai/user/athola)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and engineering agents use this skill to choose platform-appropriate GitHub, GitLab, or Bitbucket commands for issue, pull request or merge request, discussion, and CI/CD workflows.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Agent-selected forge commands can create, close, merge, approve, comment on, or update remote repository resources.

Mitigation: Review proposed agent actions before allowing commands that affect public or business-critical repositories.

Risk: Platform-specific commands may fail or target the wrong workflow if platform detection, CLI availability, or authentication is incorrect.

Mitigation: Confirm the detected platform and required authentication before running generated GitHub, GitLab, or Bitbucket commands.

## Reference(s):

- [ClawHub Skill Page](https://clawhub.ai/athola/skills/nm-leyline-git-platform)
- [Project Homepage](https://github.com/athola/claude-night-market/tree/master/plugins/leyline)
- [Complete Command Mapping](artifact/modules/command-mapping.md)

## Skill Output:

**Output Type(s):** [text, markdown, shell commands, configuration, guidance]

**Output Format:** [Markdown guidance with command tables and shell command snippets]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Maps common forge operations across GitHub, GitLab, and Bitbucket, including REST API fallbacks where a standard CLI is unavailable.]

## Skill Version(s):

1.9.19 (source: server release evidence; artifact frontmatter lists 1.9.8)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to git-platform and adjacent AI workflows.