← Back to Skills Marketplace
chat2dev

Github Forker

by chat2dev · GitHub ↗ · v0.1.1 · MIT-0
cross-platform ⚠ suspicious
256
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install github-forker
Description
Use this skill when the user wants to fork a GitHub repository — creating their own copy of a repo under their GitHub account. Trigger on any fork or copy-to...
README (SKILL.md)

GitHub Forker

Fork GitHub repositories extracted from text or images. You need GITHUB_TOKEN set in the environment with repo permissions.

What you do

  1. Extract all GitHub repository URLs from the input (text, image, or both)
  2. Fork each repository via the GitHub API
  3. Star the original repository after a successful fork
  4. Report results clearly

Step 1: Extract GitHub URLs

From text

Scan the input for patterns matching:

  • https://github.com/{owner}/{repo} (with or without trailing slash, path, or fragment)
  • github.com/{owner}/{repo} (without scheme)
  • {owner}/{repo} only when context makes it clearly a GitHub repo

Normalize each match to the canonical form: https://github.com/{owner}/{repo} Strip any extra path segments — you only need owner and repo name.

From images

When the user provides an image (screenshot, photo, diagram), use your vision capabilities to read the image and identify any GitHub URLs or repo references visible in it. Apply the same extraction rules as above to whatever text you find.

Truncated URLs

URLs are often cut off in screenshots or social media previews, like:

  • github.com/openchamber/op...
  • github.com/some-owner/proj…

When you detect a truncated URL (ends with ... or , or the repo name is clearly incomplete):

  1. Search GitHub for matching repos:

    curl -s -L \
      -H "Authorization: Bearer $GITHUB_TOKEN" \
      -H "Accept: application/vnd.github+json" \
      "https://api.github.com/search/repositories?q={owner}/{partial}+in:full_name&per_page=5"
    

    Use whatever partial info you have — owner + partial repo name is ideal; owner alone works too.

  2. Use context to pick the best match. Look at surrounding text, tweet content, project name mentioned, description keywords, and star count. If one result stands out clearly:

    • The repo name starts with the visible partial (e.g. op...openchamber matches)
    • The description aligns with what the user said (e.g. "UI真好" → pick the UI-focused one)
    • It has significantly more stars than the others

    If you're confident, proceed directly and tell the user your reasoning:

    "github.com/openchamber/op..." → inferred openchamber/openchamber ⭐1.5k (Desktop UI for OpenCode, matches context "UI真好")
    
  3. Ask the user only when genuinely uncertain — when multiple results are plausible and context doesn't help distinguish them:

    Found truncated URL "github.com/foo/bar..." — which repo did you mean?
    1. foo/barista ⭐420 — Coffee shop POS system
    2. foo/baroque ⭐38 — Baroque music generator
    Enter number (or 0 to skip):
    

    Never fork a truncated URL without either a confident inference or explicit user confirmation.

Step 2: Fork via GitHub API

For each unique {owner}/{repo} pair, call the fork endpoint:

curl -s -L -X POST \
  -H "Authorization: Bearer $GITHUB_TOKEN" \
  -H "Accept: application/vnd.github+json" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/repos/{owner}/{repo}/forks

The -L flag is required — GitHub's API returns a 307 redirect that must be followed.

  • If GITHUB_TOKEN is not set, tell the user to set it and stop:
    export GITHUB_TOKEN="ghp_..."   # classic PAT (recommended)
    # To persist across sessions, add to ~/.zshrc or ~/.bash_profile
    
  • Fork requests are async on GitHub's side — a 202 response means "accepted", not "done".
  • If a repo is already forked, GitHub returns the existing fork (not an error) — that's fine.
  • Handle HTTP errors:
    • 401: bad or expired token
    • 403: token lacks fork permission. For classic PATs, need repo or public_repo scope. For fine-grained PATs, need "Administration: Read and write" permission (not just contents).
    • 404: repo not found or private (token has no access)

Step 3: Star the original repository

After a successful fork, star the original repo:

curl -s -L -X PUT \
  -H "Authorization: Bearer $GITHUB_TOKEN" \
  -H "Accept: application/vnd.github+json" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/user/starred/{owner}/{repo}

A 204 response means success. Star failures are non-fatal — if starring fails, note it in the report but don't treat the overall operation as failed.

Step 4: Report results

After all forks are attempted, show a clear summary:

Found X repositories:
✓ owner/repo — forked → https://github.com/YOUR_USERNAME/repo  ⭐ starred
✓ owner/repo — forked → https://github.com/YOUR_USERNAME/repo  (star failed: \x3Creason>)
✗ owner/repo — failed: \x3Creason>

If the token's authenticated username isn't obvious, extract it from the fork response (full_name field gives your-username/repo-name).

Edge cases

  • No URLs found: Tell the user clearly — "No GitHub repository URLs found in the input."
  • Private repos: Fork will fail with 404 if the token doesn't have access; report the error.
  • Duplicate URLs: Deduplicate before forking — fork each unique repo once.
  • Non-repo URLs: Ignore github.com/ paths that aren't owner/repo format (e.g., github.com/features, github.com/login).
Usage Guidance
Do not install or enable this skill until the metadata and provenance are clarified. Specific things to check before using it: - Ask the publisher to update the registry metadata to declare GITHUB_TOKEN as a required credential (and provide a verifiable homepage/source). The current mismatch is a packaging/metadata red flag. - Only provide a token with the minimum scope you need (for public repos, prefer public_repo; for limited actions, use a fine-grained token scoped to just the required repos or permissions). Test with a throwaway account/token first. - Avoid putting a PAT directly into ~/.zshrc/.bashrc; prefer an ephemeral token, an environment variable injected only into the agent process, or a secrets manager. If you must export a token temporarily, remove it from shell config files afterward. - Confirm that the agent/platform will prompt before performing fork/star actions and will only call api.github.com. Because the skill is instruction-only, there is no bundled code to inspect — you should verify network activity during a controlled test to ensure no unexpected endpoints are contacted. - Because the skill will read images via the agent's vision capability, be cautious about sending screenshots that contain other sensitive info. If in doubt, use explicit textual repository references rather than images. If the publisher corrects the metadata and you follow least-privilege token practices, the skill's behavior appears coherent with its stated purpose; until then, treat it with caution.
Capability Analysis
Type: OpenClaw Skill Name: github-forker Version: 0.1.1 The github-forker skill is designed to automate forking and starring GitHub repositories using the GitHub API via curl. It includes logic for extracting URLs from text and images and resolving truncated URLs through GitHub search. While it requires a sensitive GITHUB_TOKEN, its actions are transparent, documented, and restricted to the official GitHub API (api.github.com), with no evidence of data exfiltration, unauthorized execution, or malicious intent.
Capability Assessment
Purpose & Capability
The SKILL.md clearly requires a GITHUB_TOKEN with repo permissions to call GitHub APIs for forking and starring; however, the registry metadata lists no required environment variables or primary credential. That is an internal inconsistency: forking GitHub repos legitimately needs a GitHub token, so the metadata should declare it. The absence of that declaration suggests sloppy or incomplete packaging and increases risk.
Instruction Scope
Instructions are narrowly scoped to extracting GitHub repo references from text/images, resolving truncated names via GitHub search, calling GitHub REST endpoints to fork and star repos, and reporting results. The skill uses vision to read images (consistent with its stated purpose). It explicitly says to ask the user before forking ambiguous/truncated repos. The SKILL.md does not instruct the agent to read unrelated files or send data to endpoints other than api.github.com.
Install Mechanism
This is instruction-only with no install spec or bundled code — lowest install risk. No remote downloads or package installs are present.
Credentials
The runtime text requires a GITHUB_TOKEN (and gives guidance on scopes), but the declared requirements list zero env vars/credentials. Requesting a GitHub personal access token is proportionate to forking, but the metadata omission is a significant discrepancy. Additionally, the README suggests persisting the token in shell rc files (e.g., ~/.zshrc), which is poor security advice and increases credential exposure.
Persistence & Privilege
The skill does not request permanent 'always' inclusion, does not modify other skills, and is instruction-only. Autonomous model invocation is enabled by default platform behavior but is not combined here with other strong red flags.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install github-forker
  3. After installation, invoke the skill by name or use /github-forker
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.1
- Added a README.md file with detailed usage and instructions. - No changes to code or main logic; documentation only.
v0.1.0
Initial release: Fork GitHub repositories from text or images, including handling truncated URLs - Automatically extracts GitHub repository URLs from user input (text or images). - Handles truncated or incomplete repo URLs by searching GitHub and using context to infer the correct repository, or asks the user if unsure. - Forks each unique repository using the GitHub API, and stars the original repo after forking. - Provides a clear summary of results, including errors and whether starring was successful. - Ignores irrelevant URLs and ensures `GITHUB_TOKEN` is set before proceeding.
Metadata
Slug github-forker
Version 0.1.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is Github Forker?

Use this skill when the user wants to fork a GitHub repository — creating their own copy of a repo under their GitHub account. Trigger on any fork or copy-to... It is an AI Agent Skill for Claude Code / OpenClaw, with 256 downloads so far.

How do I install Github Forker?

Run "/install github-forker" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Github Forker free?

Yes, Github Forker is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Github Forker support?

Github Forker is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Github Forker?

It is built and maintained by chat2dev (@chat2dev); the current version is v0.1.1.

💬 Comments