claude-forgejo-issues
A Claude Code and Codex plugin that treats a Forgejo (or Gitea) repo's issue tracker as the
agent's TODO store: open TODOs are injected as context at session start, and six
MCP tools let the agent list, read, create, edit, comment on, and close them --
with files (screenshots, renders, logs, clips) attached in the same call.
The plugin is deliberately scoped to issues + comments. If a request would grow
it beyond that, it should be discussed before it is built -- see NOTES.md.
How it decides to be active
Both the hook and the MCP server activate only when the current repo has a git
remote pointing at your forge host (default git.danya02.ru, configurable).
Any remote counts -- so a repo can keep a GitHub origin and a second remote
on the forge, and the plugin still works there.
Outside a forge repo the hook is silent. In Claude, the MCP server offers only a
status tool that explains why the issue tools are inactive. No
noise, no errors, no wasted calls. Codex checks activation per call (see below).
Install
Codex / ChatGPT Work (local execution)
Requires Node 20+ in the execution environment:
codex plugin marketplace add danya02/claude-forgejo-issues
codex plugin add forgejo-issues@claude-forgejo-issues
For development, use the checkout path instead of the GitHub shorthand in the
first command. Codex reads the existing .claude-plugin/marketplace.json
catalog; its name is retained for compatibility. In ChatGPT Work, install
from the configured marketplace through the plugin browser.
Version 0.6.2 uses .codex-plugin/plugin.json to work around Codex ignoring
hooks from portable Agent Plugins 1.0 manifests
(upstream issue).
Its MCP launcher uses cwd: "." (resolved by Codex against the installed
plugin root) and a relative script argument. MCP arguments do not expand
${PLUGIN_ROOT}; hook commands still receive that variable through their
shell environment. Update an existing remote installation with:
codex plugin marketplace upgrade claude-forgejo-issues
codex plugin add forgejo-issues@claude-forgejo-issues
For temporary local testing, install this checkout:
codex plugin marketplace remove claude-forgejo-issues
codex plugin marketplace add /home/danya/Projects/claude-forgejo-issues
codex plugin add forgejo-issues@claude-forgejo-issues
Skip the removal command if the marketplace has not been added yet. Codex
requires removing the existing Git marketplace before replacing it with a
local checkout; adding the same name from a different source fails.
After local testing, restore the remote registration:
codex plugin marketplace remove claude-forgejo-issues
codex plugin marketplace add danya02/claude-forgejo-issues
codex plugin add forgejo-issues@claude-forgejo-issues
Restart/resume the session after installation, then use /hooks to review and
trust the plugin's hooks. Installing alone does not trust them. The scripts
need a local execution environment; installing on the web does not deploy
Node or the scripts to a remote machine.
Use the same token file and config.json described below. Claude's plugin
options dialog is specific to Claude; for Codex, the token file is recommended.
FORGEJO_ISSUES_TOKEN is also supported (the legacy environment variable still
works). Options can be set as FORGEJO_ISSUES_<OPTION_NAME> environment variables,
for example FORGEJO_ISSUES_FORGE_HOST and FORGEJO_ISSUES_INJECT_ON_PROMPT;
these precede legacy Claude option variables and the config file. Restart after
changing options. Tokens are read on each call.
Codex injects the TODO snapshot at startup, resume, and after compaction, with
optional per-prompt refresh. The setup skill forgejo-setup helps diagnose
remotes, credentials, and hook trust without exposing the token.
Codex's plugin MCP runtime starts servers in the installed plugin directory
and does not supply the session workspace. All six tools therefore require
an absolute project_dir argument in Codex; the hook supplies that path in its
instructions. Tools stay discoverable, but every call checks that project's
remotes before accessing the forge. Attachments resolve inside that project,
and concurrent calls keep separate project contexts. The hook remains silent
outside forge repos. Codex writes are attributed to Codex; session IDs are
omitted until a reliable MCP session-identity interface is available.
Claude Code
From the marketplace (after it is published):
/plugin marketplace add danya02/claude-forgejo-issues
/plugin install forgejo-issues
While developing from a local checkout:
/plugin marketplace add /home/danya/Projects/claude-forgejo-issues
/plugin install forgejo-issues
Token setup