GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Expose project provider skills in chat by jakeleventhal · Pull Request #3982 · pingdotgg/t3code

Expose project provider skills in chat #3982

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jakeleventhal wants to merge 7 commits into pingdotgg:main from jakeleventhal:t3code/share-grok-skill-discovery

Uh oh!

There was an error while loading. Please reload this page.

Closed

Expose project provider skills in chat #3982

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit Hold shift + click to select a range
c757242
Expose project provider skills in chat
jakeleventhal Jul 15, 2026
da1045e
Clear stale composer skill metadata
jakeleventhal Jul 15, 2026
44240b7
Keep composer skill fallback cwd-safe
jakeleventhal Jul 15, 2026
75e7027
Synchronize Grok model state before skill lookup
jakeleventhal Jul 15, 2026
931a59f
Ignore environment variables during Grok skill discovery
jakeleventhal Jul 15, 2026
ed6ab15
Support provider skill discovery on mobile
jakeleventhal Jul 25, 2026
09b0e54
feat(server): expose Claude project skills
jakeleventhal Jul 29, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Next Next commit
Ignore environment variables during Grok skill discovery
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@jakeleventhal
jakeleventhal committed Jul 29, 2026
commit 931a59fab7949c4cd1e3053e1561f02f3e349d98

Some comments aren't visible on the classic Files Changed page.

There are no files selected for viewing

61 changes: 59 additions & 2 deletions 61 apps/server/src/provider/Layers/GrokAdapter.test.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,30 @@ it("rewrites only exact enabled Grok skill references", () => {

assert.equal(
rewriteGrokSkillReferences(
"Use $review and keep $PATH plus $disabled then run $local:verify",
"Use $review and keep $PATH plus $NODE_ENV and $disabled then run $local:verify",
skills,
),
"Use /review and keep $PATH plus $disabled then run /local:verify",
"Use /review and keep $PATH plus $NODE_ENV and $disabled then run /local:verify",
);
});

it("rewrites an exact all-uppercase skill once skills have been discovered", () => {
assert.equal(
rewriteGrokSkillReferences("Use $review with $PATH", [
{
name: "review",
path: "/skills/review/SKILL.md",
scope: "project",
enabled: true,
},
{
name: "PATH",
path: "/skills/path/SKILL.md",
scope: "project",
enabled: true,
},
]),
"Use /review with /PATH",
);
});

Expand Down Expand Up @@ -229,6 +249,43 @@ it.layer(grokAdapterTestLayer)("GrokAdapterLive", (it) => {
}),
);

it.effect("bypasses discovery for shell-style environment variables", () =>
Effect.gen(function* () {
const threadId = ThreadId.make("grok-env-var-discovery-bypass");
const wrapperPath = yield* Effect.promise(() => makeMockGrokWrapper());
const discoveryCalls = yield* Ref.make(0);
const adapter = yield* makeTestAdapter(wrapperPath, {
listSkills: () =>
Ref.update(discoveryCalls, (count) => count + 1).pipe(
Effect.andThen(
Effect.fail(
new ProviderDriverError({
driver: "grok",
instanceId: "grok",
detail: "inspect failed",
}),
),
),
),
});

yield* adapter.startSession({
threadId,
provider: ProviderDriverKind.make("grok"),
cwd: process.cwd(),
runtimeMode: "full-access",
});
yield* adapter.sendTurn({
threadId,
input: "Print $PATH and $NODE_ENV",
attachments: [],
});

assert.equal(yield* Ref.get(discoveryCalls), 0);
yield* adapter.stopSession(threadId);
}),
);

it.effect("surfaces skill discovery failures as typed adapter errors", () =>
Effect.gen(function* () {
const threadId = ThreadId.make("grok-skill-discovery-failure");
Expand Down
16 changes: 15 additions & 1 deletion 16 apps/server/src/provider/Layers/GrokAdapter.ts
Show comments
View file
Open in desktop
Comment thread
macroscopeapp[bot] marked this conversation as resolved.
Resolved

Uh oh!

There was an error while loading. Please reload this page.

Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,26 @@ export interface GrokAdapterLiveOptions {
) => Effect.Effect<ReadonlyArray<ServerProviderSkill>, ProviderDriverError>;
}

// Provider requests contain only flattened prompt text, so an inserted skill
// chip cannot be distinguished from manually typed shell syntax here. Grok's
// normal skill names are lowercase or qualified; reserve conventional
// all-uppercase identifiers for environment variables so `$PATH` does not run
// (or fail on) `grok inspect`. An all-uppercase skill can still be rewritten
// when discovery is triggered by another normal skill token in the prompt.
const ENVIRONMENT_VARIABLE_STYLE_TOKEN = /^[A-Z][A-Z0-9_]*$/;

function submittedSkillTokens(input: string) {
return collectComposerInlineTokens(input, { includeTrailingSkillToken: true }).filter(
(token) => token.type === "skill",
);
}

function potentialGrokSkillTokens(input: string) {
Comment thread

@macroscopeapp macroscopeapp Bot Jul 25, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium Layers/GrokAdapter.ts:109

potentialGrokSkillTokens filters out only all-uppercase tokens, so a lowercase shell variable like $foo in a prompt such as echo $foo is treated as a skill token and triggers listSkills. When grok inspect fails, sendTurn rejects the entire prompt with ProviderAdapterRequestError instead of sending the literal text. This breaks otherwise-valid prompts that happen to contain ordinary shell syntax. Consider tightening the token classification so common shell variables are not mistaken for skill names, or make discovery failures non-fatal so the prompt is still sent as literal text.

🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/server/src/provider/Layers/GrokAdapter.ts around line 109:

`potentialGrokSkillTokens` filters out only all-uppercase tokens, so a lowercase shell variable like `$foo` in a prompt such as `echo $foo` is treated as a skill token and triggers `listSkills`. When `grok inspect` fails, `sendTurn` rejects the entire prompt with `ProviderAdapterRequestError` instead of sending the literal text. This breaks otherwise-valid prompts that happen to contain ordinary shell syntax. Consider tightening the token classification so common shell variables are not mistaken for skill names, or make discovery failures non-fatal so the prompt is still sent as literal text.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
return submittedSkillTokens(input).filter(
(token) => !ENVIRONMENT_VARIABLE_STYLE_TOKEN.test(token.value),
);
}

export function rewriteGrokSkillReferences(
input: string,
skills: ReadonlyArray<ServerProviderSkill>,
Expand Down Expand Up @@ -996,7 +1010,7 @@ export function makeGrokAdapter(grokSettings: GrokSettings, options?: GrokAdapte

const rawText = input.input?.trim();
const text =
rawText && options?.listSkills && submittedSkillTokens(rawText).length > 0
rawText && options?.listSkills && potentialGrokSkillTokens(rawText).length > 0
? yield* options.listSkills(ctx.session.cwd ?? "").pipe(
Comment thread
Comment on lines +1013 to +1014

@chatgpt-codex-connector chatgpt-codex-connector Bot Jul 29, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid probing lowercase shell variables as Grok skills

When a Grok prompt contains an ordinary lowercase shell variable such as $branch or $file, this condition treats it as a potential skill and makes grok inspect part of turn submission. If inspection is unsupported, fails, or reaches its 10-second timeout, the adapter rejects the turn even though the token was not intended as a skill and the ACP session could otherwise process the prompt; the uppercase-only exception does not cover common lowercase shell variables, so discovery failures should not block ambiguous raw-text tokens.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Effect.map((skills) => rewriteGrokSkillReferences(rawText, skills)),
Effect.mapError(
Expand Down
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402809 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.