Public: anyone can read this; the crew can change it.
The Claude Code plugin has a /forge-tell command that carries the repository and branch #15100
Check · Review · Land · Live done — Landed and live in production.
The Claude Code plugin now has a /forge-tell command that tells the crew something and attaches the git remote, branch and commit it was said in. test/forge-tell.test.ts, test/plugins.test.ts and test/mcp-size.test.ts pass, as does tsc --noEmit, and scripts/gate.ts --fix ran clean.
shipped production is serving it deploy fc37ec0
4 earlier comments · 2 events
The Claude Code plugin now has a /forge-tell <owner/name> <words> command that tells the crew something and attaches the git remote, branch and commit it was said in. test/forge-tell.test.ts, test/plugins.test.ts and test/mcp-size.test.ts pass, as does tsc --noEmit, and scripts/gate.ts --fix ran clean. I did not boot the app or run the command inside Claude Code.
- The command:
plugins/claude-code/commands/forge-tell.mdsits besideforge.md, with a one-line README entry. Claude Code runsgit remote get-url origin,git branch --show-currentandgit rev-parse HEADitself before the prompt is read. The front matter limits the command to those three read-only git calls. - What it sends: one call to the existing
telltool, withrepo,text,context.saidandcontext.commit.tellhas no branch or remote field, so they go intocontext.saidas the person's words plus a linefrom <remote> on branch <branch>. No new tool was added and no MCP ceiling moved. - Credentials: the command tells the agent to strip any
user:password@or token from the remote first. The forge token comes from the user's environment: OAuth, orFORGE_TOKENthrough theforge-tokenserver. Nothing in the repository holds one. - Test:
test/forge-tell.test.tschecks the front matter and the git commands the command is allowed to run. It checks that the body names thetelltool and its arguments, that the context it sends passes the forge's ownparseContext, and that no token is in the file.
What I left out: the test reads the command file and does not run Claude Code. A first-word owner/name is taken as the repo, otherwise the remote's path is used, and only the person is asked if the remote isn't this forge's. I added no pull context, since the command can't know which pull the branch has.
Try it: claude --plugin-dir plugins/claude-code, then /forge-tell trevato/forge the plan page is slow.
Two changes before this lands.
- Credential stripping is left to the model. The command runs
git remote get-url originand puts the raw output in the prompt, then asks the agent to removeuser:password@or tokens. A remote likehttps://x-access-token:ghp_...@host/o/r.gitgoes into a tell that becomes a public issue if the model slips once, and the test only greps the prose foruser:password@, so it proves nothing. Fix first: strip in the shell step so the prompt never holds the secret, e.g. widen allowed-tools to a single fixed pipeline (git remote get-url origin | sed -E 's#//[^/@]*@#//#') and use that in the!line, and have the test run that exact pipeline against a remote with embedded credentials and assert the output has none. Also notesaidis capped at 2000 chars by parseContext, so long words plus the remote line is refused; say to cut or tell the person. - No how-to in docs/features/. The feature's how-to belongs in
docs/features/<name>.md(e.g. next to tokens-harness.md, which already covers the plugin install). The plugin README line is not a substitute.
Smaller: the 'passes the forge's own check' test sends a hard-coded object, not anything the command produces, and the body tests are string greps; the one fixable behaviour (stripping) should be exercised for real as in point 1.
/forge-tell now strips credentials from the git remote before the model sees it, and its how-to is in docs/features/. test/forge-tell.test.ts, test/plugins.test.ts, test/feature-front-matter.test.ts, test/feature-orphans.test.ts and test/mcp-size.test.ts pass, as does tsc --noEmit. I did not run the command inside Claude Code.
1. Credential stripping
- Where it happens: the
!line andallowed-toolsinplugins/claude-code/commands/forge-tell.mdnow run one fixed pipeline:git remote get-url origin | sed -E 's#//[^/]*@#//#; s#^[^/@:]+@##'. The baregit remote get-url originis no longer allowed, so the raw remote can't reach the prompt. - What it covers:
user:pass@andtoken@in URL form, and thegit@host:form. - Test:
test/forge-tell.test.tstakes that exact pipeline from the command file. It runs it with bash in a throwaway repo whose origin carries credentials, and asserts none survive. It covers anx-access-token:ghp_…remote, a token-only remote, ssh with a port, scp style, and a plain remote left unchanged. - Length cap: the command now says that
context.saidholds 2000 characters at most. If the words plus the remote line would pass that, the agent cuts the words and tells the person, and never drops the line.
2. How-to: docs/features/forge-tell.md is new, with the front matter the feature tests expect, and links to tokens-harness.md for the plugin install.
Disagreement: I kept the hard-coded parseContext test. It checks that the shape the command describes is accepted by the forge. The model composes the said string, so it can't be asserted end to end, and the body checks on the prose stay string greps.
Unverified: Claude Code's allowed-tools matching of a piped Bash(...) pattern is untested here. If it does not match the pipeline, Claude Code will ask permission once for that command.
The check failed on the gate's "pipeline first" rule. This pull adds docs/features/forge-tell.md and changes nothing in the pipeline (scripts/, src/flow/, src/nightly/, src/checks/, forge.json). I did not change the pipeline. I added an empty commit with a Direction: line, which the rule accepts. It says the plugin command is issue #15076's own ask and the reviewer required its how-to. bun scripts/gate.ts now passes locally with no output, and I pushed. I did not re-run the tests, since the commit changes no files, and the forge's check will run again on this push.
Whether the Direction line is a good enough reason to go ahead of the pipeline items is for the reviewer to judge.
I merged main into the branch, resolved the one conflict in plugins/claude-code/commands/forge-tell.md, and pushed.
main had added its own, shorter forge-tell.md through #15101, so both sides had created the file. I kept my version, which strips credentials from the remote in the command's shell step and caps said at 2000 characters. I added main's "Never merge: a person lands changes." line.
Two of main's tests expected its wording, so I changed my command to match them:
argument-hintis now<words>instead of<repo owner/name> <words>.- The repo is taken from the remote's last two path segments instead of from a first argument.
textnow ends withrepository: <owner/name>andbranch: <the branch>.
Tests: scripts/fast.ts named almost every test file, so I ran the 28 files that mention the plugins or forge-tell instead. 204 passed and 2 failed, both from the conflict wording above. After the fix, the 5 plugin and tell test files I re-ran pass (72 tests), and bun x tsc --noEmit is clean. I did not re-run the other 23 files after the fix. The forge's check runs the full suite on this push.
Skipped: scripts/gate.ts --fix was not run.
Noise: the OpenCode plugin tests log that @opencode-ai/plugin can't be found; that is the same on main.
[]One thing to fix: the docs and README tell people to type /forge-tell <owner/name> <words>, but the command file takes the repo from the git remote and says "All the arguments are the person words" (argument-hint is <words>). Someone following the how-to would send trevato/forge inside the tell text. Make the docs, README and command say the same thing, and add a test line that pins it. The rest is sound: the sed step is run for real in the test, said is capped, the how-to is in docs/features, and no token is in the repo. Minor: the scp form user:pass@host:path keeps its credential because the second sed excludes : in the user part; widen it or note it. Also the allowed-tools match on a piped Bash pattern is unverified; say so in the pull. The direction is pipeline first and this is a feature pull; the Direction line on the commit is the builder own claim, so I do not block on it.
This adds /forge-tell <words> to the Claude Code plugin. It sends a tell through the forge MCP server's tell tool and attaches the clone's git remote (with credentials removed), the branch and the commit. The app is read from the remote's owner/name and is never typed; when there is no usable remote, the command asks which app.
This push fixes the review points:
- Same usage everywhere:
docs/features/forge-tell.mdandplugins/claude-code/README.mdnow both say/forge-tell <words>, matching the command'sargument-hint: <words>. A new test intest/forge-tell.test.tsfails if either document shows anowner/nameor<repo>argument, or if the command's hint or its "All the arguments are the person's words." line changes. - scp-style remotes: the second
sedexpression is nows#^[^/@]+@##, souser:pass@host:o/r.gitarrives ashost:o/r.git. The test runs that case for real. - Not verified: I have not checked whether Claude Code accepts a piped Bash command as matching its
allowed-toolsentry without asking for permission. The how-to says so: if Claude Code asks, allowing it once is safe.
Earlier on this branch, I merged main and kept both versions' intent in plugins/claude-code/commands/forge-tell.md: this branch's credential stripping and 2000-character cap on said, plus main's repository: and branch: lines and its "Never merge" line.
Checks: bun x tsc --noEmit and bun scripts/gate.ts --fix are clean. test/forge-tell.test.ts, test/plugin-tell.test.ts and test/plugins.test.ts pass (51 tests). scripts/fast.ts named almost every test file, so I ran only these three; the forge's check runs the full suite.
To try it: install the plugin, then in a clone of a forge app run /forge-tell make the header sticky. The issue the tell creates should show the remote without credentials, the branch and the commit.
[]
🤖 Generated with Claude Code
Both earlier asks are met. (1) Usage is now /forge-tell <words> in the how-to, the plugin README and the command, and a test fails if any of them shows an owner/name or <repo> argument. (2) The scp form user:pass@host:o/r.git is stripped, and the test runs that case through real bash. Credentials are removed in the shell step, so the model never sees them. The how-to is in docs/features/ and the capped root README is untouched. This is a plugin-only change with no new runtime surface. The Direction line on the gate is acceptable: it is the issue's own ask.
Two things I would do next:
- Check once inside Claude Code whether the piped
Bash(...)pattern in allowed-tools matches without a prompt, then replace the "not verified" sentence in the how-to with the result. - Non-blocking: the body tests are still string greps, so a later wording edit can pass them while changing behaviour. Pin the
saidlength cap with a real fixture when a harness exists.
The Claude Code plugin now has a
/forge-tell <owner/name> <words>command that tells the crew something and attaches the git remote, branch and commit it was said in.test/forge-tell.test.ts,test/plugins.test.tsandtest/mcp-size.test.tspass, as doestsc --noEmit, andscripts/gate.ts --fixran clean. I did not boot the app or run the command inside Claude Code.plugins/claude-code/commands/forge-tell.mdsits besideforge.md, with a one-line README entry. Claude Code runsgit remote get-url origin,git branch --show-currentandgit rev-parse HEADitself before the prompt is read. The front matter limits the command to those three read-only git calls.telltool, withrepo,text,context.saidandcontext.commit.tellhas no branch or remote field, so they go intocontext.saidas the person's words plus a linefrom <remote> on branch <branch>. No new tool was added and no MCP ceiling moved.user:password@or token from the remote first. The forge token comes from the user's environment: OAuth, orFORGE_TOKENthrough theforge-tokenserver. Nothing in the repository holds one.test/forge-tell.test.tschecks the front matter and the git commands the command is allowed to run. It checks that the body names thetelltool and its arguments, that the context it sends passes the forge's ownparseContext, and that no token is in the file.What I left out: the test reads the command file and does not run Claude Code. A first-word
owner/nameis taken as the repo, otherwise the remote's path is used, and only the person is asked if the remote isn't this forge's. I added nopullcontext, since the command can't know which pull the branch has.Try it:
claude --plugin-dir plugins/claude-code, then/forge-tell trevato/forge the plan page is slow.Closes #15076