forge

A set of repository-hosting commands for Codev projects. A repository host, or forge, is a service such as GitHub, GitLab, or Gitea that stores Git code and provides issues and code reviews.

In plain words
What is it for?
Use it to view and comment on issues, manage pull or merge requests, and merge changes through GitHub, GitLab, Gitea, or custom command-line tools.
Why use it?
It lets a project use different hosting services without rewriting every command. Provider presets supply common commands, while individual operations can be overridden when needed.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/cluesmith/codev/forge
Clone the repo
git clone --depth 1 https://github.com/cluesmith/codev
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,375 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01375
Opus 5 $0.00000 $0.00687
Sonnet 5 $0.00000 $0.00275
Haiku 4.5 $0.00000 $0.00137

Measured 2d ago against content hash d04716a283f6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

forge scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

"pr-diff": "curl -s https://gitea.example.com/api/v1/repos/owner/repo/pulls/$CODEV_PR_NUMBER.diff"
codev/resources/commands/forge.md · 187 lines

How it starts

The opening of the file, as written. The whole thing — 187 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Forge Concept Commands

Codev uses forge concept commands to interact with your repository hosting platform. By default, all concepts use the GitHub CLI (gh). Projects using GitLab, Gitea, or other forges can override these commands.

Quick Start

Using a Provider Preset

Add to .codev/config.json:

{
  "forge": {
    "provider": "gitlab"
  }
}

Available providers: github (default), gitlab (uses glab CLI), gitea (uses tea CLI).

Note: Non-GitHub presets are best-effort. Their CLI tools may produce output schemas that differ from GitHub's JSON contracts. Codev handles this gracefully — concepts that return non-conforming JSON are treated as unavailable (null). If a preset command doesn't work correctly for your setup, override the individual concept with a command that produces the expected output.

Overriding Individual Concepts

{
  "forge": {
    "issue-view": "glab issue view \"$CODEV_ISSUE_ID\" --output json",
    "pr-merge": "glab mr merge \"$CODEV_PR_NUMBER\" --yes"
  }
}

Combining Provider + Overrides

Manual overrides take precedence over the provider preset:

{
  "forge": {
    "provider": "gitlab",
    "issue-comment": "my-custom-comment-script $CODEV_ISSUE_ID \"$CODEV_COMMENT_BODY\""
  }
}

Resolution order: manual override > provider preset > default (github).

Disabling Concepts

Set a concept to null to disable it. The feature that uses it will gracefully degrade:

{
  "forge": {
    "team-activity": null,
    "on-it-timestamps": null
  }
}

Concepts Reference

Core Issue/PR Operations

Concept Env Vars Output Description
issue-view CODEV_ISSUE_ID JSON Fetch issue details
pr-list JSON array List open PRs
issue-list JSON array List issues
issue-comment CODEV_ISSUE_ID, CODEV_COMMENT_BODY Post issue comment
pr-exists CODEV_BRANCH_NAME truthy/falsy Check if PR exists for branch
pr-merge CODEV_PR_NUMBER Merge a PR
pr-search CODEV_SEARCH_QUERY JSON array Search PRs
pr-view CODEV_PR_NUMBER, CODEV_INCLUDE_COMMENTS JSON or text View PR details
pr-diff CODEV_PR_NUMBER, CODEV_DIFF_NAME_ONLY text Get PR diff

Read the full file on GitHub · 187 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 187 lines · 0 tokens per session scan A d04716a283f6

Subscribe to this mod's changes

forge is a command published in the GitHub repository cluesmith/codev (286 stars, last pushed 5d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,375 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.