forge-detect
Detect the forge type from the current repo's git remote.
Skill by hugobatista
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/hugobatista-forge-detect
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/forge-detect
What's inside
- Skill name
forge-detect- Description
- Detect the forge type from the current repo's git remote. Sets $FORGE_CLI, $FORGE_TYPE, and $FORGE_HOST. Provides per-forge command templates for PR and issue operations.
- License
- MIT
- Instructions
- 118 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Forge Detect Load this skill at the start of any workflow that needs to interact with pull requests or issues on GitHub, Forgejo, or GitLab. ## Setup - The repo must have a remote named `origin` - The forge CLI must be installed and authenticated (`gh` for GitHub, `fj` for Forgejo, `glab` for GitLab) ## Detection Run `git remote get-url origin` and parse the host: | Remote host | `$FORGE_TYPE` | `$FORGE_CLI` | |---|---|---| | `github.com` | `github` | `gh` | | `codeberg.org` | `forgejo` | `fj` | | `gitlab.com` or `*.gitlab.*` | `gitlab` | `glab` | | Other | unsupported — abort | — | Also set `$FORGE_HOST` to the detected hostname. ### Load forge-specific skills If `$FORGE_TYPE == "forgejo"`, load `forgejo-pr` and `forgejo-issue` now. They are the authoritative reference for all `fj` subcommands, flags, and patterns. If `$FORGE_TYPE == "github"` or `"gitlab"`, no extra skills needed. Refer to `gh` or `glab` CLI documentation for detailed usage. ## Command templates All operations below use `$ID` for the PR/issue number and `<path>` for file arguments. ### PR view (title, body, metadata) | `$FORGE_TYPE` | Command | |---|---| | `github` | `gh pr view $ID --json title,body,changedFiles,headRefName,baseRefName,additions,deletions` | | `forgejo` | `fj pr view $ID` | | `gitlab` | `glab mr view $ID` | ### PR diff | `$FORGE_TYPE` | Command | |---|---| | `github` | `gh pr diff $ID` | | `forgejo` | `fj pr view $ID diff` | | `gitlab` | `glab mr diff $ID` | ### PR files | `$FORGE_TYPE` | Command | |---|---| | `github` | `gh pr view $ID --json files --jq '.files[].path'` | | `forgejo` | `fj pr view $ID files` | | `gitlab` | `glab mr view $ID --json files --jq '.files[].path'` | ### PR comment | `$FORGE_TYPE` | Command | |---|---| | `github` | `gh pr comment $ID --body-file <path>` | | `forgejo` | `fj pr comment $ID --body-file <path>` | | `gitlab` | `glab mr note $ID --message "$(cat <path>)"` | ### Issue create | `$FORGE_TYPE` | Command | |---|---| | `github` | `gh issue create --title "<title>" --body-file <path>` | | `forgejo` | `fj issue create --remote origin "<title>" --body-file <path>` | | `gitlab` | `glab issue create --title "<title>" --description "$(cat <path>)"` | For Forgejo, the title is a positional argument (not a `--title` flag). If the repo requires a template, add `--template <key>` or `--no-template` (run `fj issue templates --remote origin` first to list templates). ### Issue template conventions Before creating an issue, read the repo's templates and use their conventions. For each template, parse the YAML front-matter (`title:` prefix, `labels:`, `about:`/`name:`) and the `##` body headings. Pick the template whose description best matches the issue type, use its `title:` prefix and labels, and fill its `##` sections. For types without a matching template, reuse the nearest one and override the prefix/label. ### Issue edit labels | `$FORGE_TYPE` | Command | |---|---| | `github` | `gh issue edit $ID --add-label <label>` | | `forgejo` | `fj issue edit $ID labels --add <label> --remote origin` | | `gitlab` | Not supported — skip label management by `glab` | ### Issue search by labels | `$FORGE_TYPE` | Command | |---|---| | `github` | `gh issue list --state open --label <label> --json number,title` | | `forgejo` | `fj issue search --remote origin --labels <label> --state open` | | `gitlab` | `glab issue list --state opened --label <label>` | ### Issue close | `$FORGE_TYPE` | Command | |---|---| | `github` | `gh issue close $ID` | | `forgejo` | `fj issue close $ID --remote origin` | | `gitlab` | `glab issue close $ID` |
From hugobatista/agent-skills, MIT.
More from hugobatista/agent-skills
- 0.582score
web-frontend
hugobatista
Use when building or modifying web frontend code.
SkillAFreshness: A★ 1Claude Code +9 - 0.547score
renovate
hugobatista
Use when creating or modifying Renovate configuration for automated dependency management.
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
python-cli
hugobatista
Use when building or modifying Python CLI tools.
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
architecture-brief
hugobatista
Generate an architecture overview document from a pull request or local git diff.
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
pyproject-toml
hugobatista
Use when creating or modifying pyproject.toml configuration for Python projects.
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
mermaid-syntax
hugobatista
Correct Mermaid diagram syntax reference covering all types (flowchart, sequence, class, ERD, state, C4, git, gantt, pie).
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
ste100
hugobatista
Use when writing or editing technical documentation (manuals, procedures, work instructions, warnings, cautions, notes, maintenance guides, user guides).
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
python-project
hugobatista
Use when writing, reviewing, or modifying Python code (*.py files).
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
markdown-style
hugobatista
Use when writing or editing Markdown documentation (*.md files).
SkillBFreshness: B★ 1Claude Code +9 - 0.544score
docker-python
hugobatista
Dockerfile best practices for Python projects.
SkillBFreshness: B★ 1Claude Code +9 - 0.544score
node-ci
hugobatista
Creates GitHub Actions CI workflows for Node.js/Bun projects: typecheck (tsc), tests (bun test), draft releases, and npm publish with OIDC trusted publishing.
SkillBFreshness: B★ 1Claude Code +9 - 0.544score
python-ci
hugobatista
ALWAYS load alongside the python-project skill for any new or existing Python project.
SkillBFreshness: B★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Sep 20, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/hugobatista/agent-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from hugobatista
- 0.582score
web-frontend
hugobatista
Use when building or modifying web frontend code.
SkillAFreshness: A★ 1Claude Code +9 - 0.547score
renovate
hugobatista
Use when creating or modifying Renovate configuration for automated dependency management.
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
ste100
hugobatista
Use when writing or editing technical documentation (manuals, procedures, work instructions, warnings, cautions, notes, maintenance guides, user guides).
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
markdown-style
hugobatista
Use when writing or editing Markdown documentation (*.md files).
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
mermaid-syntax
hugobatista
Correct Mermaid diagram syntax reference covering all types (flowchart, sequence, class, ERD, state, C4, git, gantt, pie).
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
pyproject-toml
hugobatista
Use when creating or modifying pyproject.toml configuration for Python projects.
SkillBFreshness: B★ 1Claude Code +9
Cite this page
forge-detect skill. Agent Mart. https://agentmart.dev/skills/hugobatista-forge-detect (last updated 2026-10-24)