$npx -y skills add kecoma1/MQL5-SKILLS --skill forgeWork with Forge-hosted Git repositories from this workspace, including login, staged commits, and push workflows. Use when Codex needs to prepare or send commits to Forge or Forgejo remotes such as forge.mql5.io, refresh credentials, inspect Git status, or write commit messages t
| 1 | # Forge |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | Use this skill when the task involves committing or pushing code to a Forge remote from this workspace. |
| 6 | |
| 7 | Follow a tight workflow: inspect status, stage only intended files, review the staged diff, write a Conventional Commit message, commit, and push to the Forge remote. |
| 8 | |
| 9 | ## Required workflow |
| 10 | |
| 11 | 1. Inspect the repo state with `git status --short`. |
| 12 | 2. Identify unrelated local changes and do not touch them unless the user explicitly asks. |
| 13 | 3. Stage only the files that belong to the current task. |
| 14 | 4. Review the staged diff before committing: |
| 15 | - `git diff --cached --name-only` |
| 16 | - `git diff --cached --stat` |
| 17 | - `git diff --cached -- <path>` |
| 18 | 5. Write the commit message using Conventional Commits. |
| 19 | 6. Commit with `git commit -m "type(scope): summary"`. |
| 20 | 7. Push with `git push origin <branch>`. |
| 21 | 8. If push fails due to credentials, fix login first and retry the same push. |
| 22 | |
| 23 | ## Commit convention |
| 24 | |
| 25 | Use this format: |
| 26 | |
| 27 | ```text |
| 28 | type(scope): summary |
| 29 | ``` |
| 30 | |
| 31 | Use short lowercase summaries in imperative style. |
| 32 | |
| 33 | Example: |
| 34 | |
| 35 | ```text |
| 36 | feat(rsi): add stop loss and take profit optimization |
| 37 | ``` |
| 38 | |
| 39 | Preferred types: |
| 40 | - `feat` |
| 41 | - `fix` |
| 42 | - `docs` |
| 43 | - `chore` |
| 44 | - `refactor` |
| 45 | - `test` |
| 46 | - `perf` |
| 47 | - `build` |
| 48 | - `ci` |
| 49 | - `revert` |
| 50 | |
| 51 | Rules: |
| 52 | - Always include a scope when a clear subsystem exists. |
| 53 | - Use the EA, feature, or folder as scope when possible, such as `rsi`, `forge`, `backtest`, `skills`, `premiere`. |
| 54 | - Keep the summary specific and under roughly 72 characters when practical. |
| 55 | - Avoid vague subjects like `update stuff` or `changes`. |
| 56 | |
| 57 | ## Login to Forge in this workspace |
| 58 | |
| 59 | This workspace uses: |
| 60 | |
| 61 | ```text |
| 62 | git config --get credential.helper |
| 63 | manager |
| 64 | ``` |
| 65 | |
| 66 | That means Git Credential Manager handles stored credentials on Windows. |
| 67 | |
| 68 | The current remote pattern is: |
| 69 | |
| 70 | ```text |
| 71 | https://forge.mql5.io/<user>/<repo>.git |
| 72 | ``` |
| 73 | |
| 74 | Example from this repo: |
| 75 | |
| 76 | ```text |
| 77 | https://forge.mql5.io/<user-id>/mql5.git |
| 78 | ``` |
| 79 | |
| 80 | ## Authentication workflow |
| 81 | |
| 82 | When pushing for the first time, or when credentials expired: |
| 83 | |
| 84 | 1. Run: |
| 85 | |
| 86 | ```powershell |
| 87 | git push origin main |
| 88 | ``` |
| 89 | |
| 90 | 2. If Git Credential Manager prompts for credentials, use: |
| 91 | - Forge username |
| 92 | - Forge personal access token or valid password, whichever the Forge server accepts |
| 93 | |
| 94 | 3. Let Git Credential Manager store the credential. |
| 95 | 4. Retry the push if needed. |
| 96 | |
| 97 | If push fails with an authentication error, state the exact error and do not invent success. |
| 98 | |
| 99 | ## Refreshing bad credentials |
| 100 | |
| 101 | If Forge credentials are stale, remove the old credential from Windows Credential Manager or let Git Credential Manager replace it on the next prompt. |
| 102 | |
| 103 | Useful checks: |
| 104 | |
| 105 | ```powershell |
| 106 | git remote -v |
| 107 | git branch --show-current |
| 108 | git config --get credential.helper |
| 109 | git credential-manager --version |
| 110 | ``` |
| 111 | |
| 112 | If needed, retry: |
| 113 | |
| 114 | ```powershell |
| 115 | git push origin main |
| 116 | ``` |
| 117 | |
| 118 | ## Safe commit behavior |
| 119 | |
| 120 | - Never commit unrelated modified or deleted files just to get a clean tree. |
| 121 | - Never use `git add .` in a dirty repo unless the user explicitly wants everything. |
| 122 | - Prefer explicit paths in `git add -- <paths>`. |
| 123 | - If the repo contains unrelated user changes, commit only the files for the current task. |
| 124 | - Before pushing, confirm the staged file list matches the intended task. |
| 125 | |
| 126 | ## Example workflow |
| 127 | |
| 128 | ```powershell |
| 129 | git status --short |
| 130 | git add -- skills/forge/SKILL.md skills/forge/agents/openai.yaml |
| 131 | git diff --cached --name-only |
| 132 | git commit -m "feat(forge): add forge commit workflow skill" |
| 133 | git push origin main |
| 134 | ``` |
| 135 | |
| 136 | ## Final reporting |
| 137 | |
| 138 | When finishing, report: |
| 139 | - the commit hash |
| 140 | - the commit message |
| 141 | - whether push succeeded |
| 142 | - any authentication issue that still blocks the push |