4.6 KiB
4.6 KiB
| name | description | license | compatibility | metadata | ||
|---|---|---|---|---|---|---|
| forgejo-tobiasostner | Manages repositories and collaboration resources on the user's Forgejo instance at git.tobiasostner.de through the fj CLI. Use this skill when asked to create, inspect, clone, migrate, or configure a Forgejo repository there, or to work with its issues, pull requests, releases, actions, tags, users, or organizations. Do not use for local-only Git work, GitHub or other forges, or administration of the underlying server or Forgejo deployment. | MIT | Requires the fj CLI, an authenticated git.tobiasostner.de account, and network access. Repository remote changes additionally require a local Git checkout. |
|
Forgejo at git.tobiasostner.de
Critical rules
- Use
fj; do not SSH into the underlying server unless the user explicitly requests server administration. - Pass
-H git.tobiasostner.deso commands cannot target another configured forge accidentally. - Never print or retrieve access tokens or passwords, and never store them outside fj's credential handling. Use
fj authfor authentication state. - Inspect current state before mutating it. Ask before destructive operations such as deleting repositories, releases, tags, issues, or branches.
- Preserve an existing repository's visibility when recreating or migrating it. If no source establishes visibility, ask whether it should be public or private.
- Read
fj <command> --helpbefore using unfamiliar or version-sensitive flags.
Workflow
-
Confirm the client and account:
command -v fj fj auth list fj whoami -H git.tobiasostner.deStop and ask the user to authenticate with
fj auth login -H git.tobiasostner.deorfj auth add-token -H git.tobiasostner.deif the target account is unavailable. Do not request the credential in chat. -
Inspect local and remote context relevant to the request:
git status --short --branch git remote -v fj repo view OWNER/REPO -H git.tobiasostner.deA
not foundresult is expected when confirming that a new repository name is free. -
Use the narrow matching
fjcommand group, such asfj repo,fj issue,fj pr,fj release,fj actions,fj tag,fj user, orfj org. Check that group's--helpinstead of guessing syntax. -
For repository creation:
- Match established visibility; add
--privateonly for a private repository. - If the requested Git remote name does not exist, let
fj repo createconfigure it with--remote. - If that remote already exists, choose an unused temporary remote name and pass it to
fj repo create --remote. After creation succeeds, read the exact generated URL withgit remote get-urlbefore changing the requested remote. - Before replacement, inspect every fetch URL with
git remote get-url --alland every explicitremote.<remote-name>.pushurlentry withgit config --get-all. Do not usegit remote get-url --pushto detect explicit push URLs because it falls back to the fetch URL. - Preserve additional fetch and explicit push URLs unless the user asked to replace the whole remote. For whole-remote replacement, use
git config --replace-allonremote.<remote-name>.urlso one new URL replaces every old fetch URL, then clear allremote.<remote-name>.pushurlentries so pushes inherit it. Remove the temporary remote only after validating the requested remote. - Omit
--sshto honor fj's configured transport default. Do not runfj auth use-sshas an inspection command: without a boolean argument it enables SSH. Do not guess the instance's SSH username or URL shape.
- Match established visibility; add
-
Validate the requested outcome:
fj repo view OWNER/REPO -H git.tobiasostner.de git remote get-url --all REMOTE git remote get-url --push --all REMOTEFor other resources, run the corresponding non-mutating
fjview/list/status command. Report the Forgejo URL and any local remote changes.
Failure handling
- On authentication failure, stop and direct the user to
fj auth login -H git.tobiasostner.deorfj auth add-token -H git.tobiasostner.de. - On name collision, inspect the existing repository and ask whether to reuse it; never delete or overwrite it automatically.
- On remote-name collision, preserve the existing URL until repository creation succeeds, then change only the requested remote.
- Do not fall back to the Forgejo HTTP API, browser automation, or server shell merely because an
fjcommand failed. Diagnose withfj --help, authentication checks, and non-mutating inspection first; ask before changing approach.