Skip to content

fix(onboard): clarify skill credential prompts#74417

Closed
vyctorbrzezowski wants to merge 0 commit intoopenclaw:mainfrom
vyctorbrzezowski:contrib/clarify-skill-env-prompts
Closed

fix(onboard): clarify skill credential prompts#74417
vyctorbrzezowski wants to merge 0 commit intoopenclaw:mainfrom
vyctorbrzezowski:contrib/clarify-skill-env-prompts

Conversation

@vyctorbrzezowski
Copy link
Copy Markdown
Contributor

Summary

Describe the problem and fix in 2–5 bullets:

  • Problem: Skills onboarding can list a keyless local dependency, such as openai-whisper, and then immediately ask for API keys required by separate API-backed skills.
  • Why it matters: The flow makes the later credential prompts look like they contradict the keyless local install hint.
  • What changed: Added a short Skill API credentials note before env-gated skill prompts and covered the mixed openai-whisper / openai-whisper-api / sag scenario.
  • What did NOT change (scope boundary): No installer behavior, credential storage semantics, skill metadata, or dependency detection changed.

AI-assisted: yes.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

Root Cause (if applicable)

  • Root cause: Dependency installs and credential prompts were separate code paths, but the credential phase had no framing to distinguish API-backed skills from the earlier keyless local dependency list.
  • Missing detection / guardrail: No test covered mixed keyless local and API-backed missing skills in one onboarding run.
  • Contributing context (if known): The local openai-whisper skill has no primaryEnv, while openai-whisper-api and sag require API key env vars.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: src/commands/onboard-skills.test.ts
  • Scenario the test should lock in: a keyless local install option is shown separately from API credential prompts for openai-whisper-api and sag.
  • Why this is the smallest reliable guardrail: setupSkills owns both the install selection prompt and the credential prompt loop.
  • Existing test that already covers this (if any): none for the mixed keyless/keyed prompt sequence.
  • If no new test is added, why not: N/A

User-visible / Behavior Changes

Onboarding now shows a short note before skill API credential prompts, clarifying that those prompts are separate from local dependency installation.

Diagram (if applicable)

Before:
[missing local dependency list] -> [API key prompt with no framing]

After:
[missing local dependency list] -> [Skill API credentials note] -> [API key prompt for env-gated skill]

Security Impact (required)

  • New permissions/capabilities? (Yes/No) No
  • Secrets/tokens handling changed? (Yes/No) No
  • New/changed network calls? (Yes/No) No
  • Command/tool execution surface changed? (Yes/No) No
  • Data access scope changed? (Yes/No) No
  • If any Yes, explain risk + mitigation: N/A

Repro + Verification

Environment

  • OS: macOS
  • Runtime/container: Node 24.14.0, pnpm 10.33.0
  • Model/provider: N/A
  • Integration/channel (if any): N/A
  • Relevant config (redacted): N/A

Steps

  1. Run skill onboarding with missing openai-whisper, openai-whisper-api, and sag requirements.
  2. Observe the missing dependency prompt for the keyless local skill.
  3. Continue to the credential prompt phase.

Expected

  • API key prompts are framed as credential setup for API-backed skills only.

Actual

  • Previously, API key prompts followed the keyless dependency list without a separating explanation.

Evidence

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios: mixed keyless local and API-backed skills through setupSkills unit coverage.
  • Edge cases checked: credential prompts remain limited to skills with primaryEnv and missing env requirements; install prompt still shows the keyless local skill hint.
  • What you did not verify: manual interactive onboarding in a terminal.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.

Compatibility / Migration

  • Backward compatible? (Yes/No) Yes
  • Config/env changes? (Yes/No) No
  • Migration needed? (Yes/No) No
  • If yes, exact upgrade steps: N/A

Risks and Mitigations

  • Risk: The extra note adds one more onboarding text block for users with missing skill credentials.
    • Mitigation: It appears only when credential prompts are actually needed and lists only the affected skills.

Validation

pnpm test src/commands/onboard-skills.test.ts
pnpm test src/agents/skills.buildworkspaceskillstatus.test.ts
pnpm exec oxfmt --check --threads=1 src/commands/onboard-skills.ts src/commands/onboard-skills.test.ts CHANGELOG.md
pnpm check:changed
git diff --check
codex review --base origin/main

@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: S labels Apr 29, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 29, 2026

Greptile Summary

Adds a "Skill API credentials" explanatory note before the credential-prompt loop in setupSkills, so users who just saw a keyless local-dependency install option aren't confused by the following API-key prompts. The refactor extracts credentialSkills from the old inline for loop condition, gates the note on the list being non-empty, and extends the test helper to support env-only skills for a new mixed-scenario test.

Confidence Score: 5/5

Safe to merge — changes are UI-only, well-tested, and correctly scoped to the credential prompt phase.

The logic change is small and correct: the filter that populates credentialSkills is equivalent to the old inline guard, and the note is gated so it only appears when there are actually credential prompts to show. One P2 style note about an unnecessarily optional type in formatCredentialSkillLine, but no functional issues.

No files require special attention.

Prompt To Fix All With AI
This is a comment left during a code review.
Path: src/commands/onboard-skills.ts
Line: 33-35

Comment:
**`primaryEnv` typed as optional but used without guard**

The parameter type allows `primaryEnv` to be `undefined`, so the interpolated string would silently render `"- skillName: undefined"` if the function were ever called outside the current guarded path. Narrowing the type to `string` here makes the contract explicit and prevents accidental misuse.

```suggestion
function formatCredentialSkillLine(skill: { name: string; primaryEnv: string }): string {
  return `- ${skill.name}: ${skill.primaryEnv}`;
}
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "fix(onboard): clarify skill credential p..." | Re-trigger Greptile

Comment thread src/commands/onboard-skills.ts Outdated
Comment on lines +33 to +35
function formatCredentialSkillLine(skill: { name: string; primaryEnv?: string }): string {
return `- ${skill.name}: ${skill.primaryEnv}`;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 primaryEnv typed as optional but used without guard

The parameter type allows primaryEnv to be undefined, so the interpolated string would silently render "- skillName: undefined" if the function were ever called outside the current guarded path. Narrowing the type to string here makes the contract explicit and prevents accidental misuse.

Suggested change
function formatCredentialSkillLine(skill: { name: string; primaryEnv?: string }): string {
return `- ${skill.name}: ${skill.primaryEnv}`;
}
function formatCredentialSkillLine(skill: { name: string; primaryEnv: string }): string {
return `- ${skill.name}: ${skill.primaryEnv}`;
}
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/commands/onboard-skills.ts
Line: 33-35

Comment:
**`primaryEnv` typed as optional but used without guard**

The parameter type allows `primaryEnv` to be `undefined`, so the interpolated string would silently render `"- skillName: undefined"` if the function were ever called outside the current guarded path. Narrowing the type to `string` here makes the contract explicit and prevents accidental misuse.

```suggestion
function formatCredentialSkillLine(skill: { name: string; primaryEnv: string }): string {
  return `- ${skill.name}: ${skill.primaryEnv}`;
}
```

How can I resolve this? If you propose a fix, please make it concise.

@clawsweeper
Copy link
Copy Markdown
Contributor

clawsweeper Bot commented Apr 29, 2026

Codex review: needs maintainer review before merge.

What this changes:

The PR adds a Skill API credentials onboarding note before env-gated skill prompts, adds mixed keyless/API-backed skill test coverage, and adds an Unreleased changelog fix entry.

Maintainer follow-up before merge:

This is already an open implementation PR and it overlaps with open PR #74407 for the same regression, so the next action is maintainer review and canonical branch selection rather than an automated replacement or repair PR.

Security review:

Security review cleared: Security review cleared: the diff changes onboarding prompt text, a unit test helper/test, and changelog text only, with no new secret handling, network calls, dependency sources, CI permissions, or code execution paths.

Review details

Best possible solution:

Land one narrow onboarding fix that clearly separates API-backed skill credential setup from local dependency installation, keeps installer behavior and credential storage unchanged, includes regression coverage for the mixed openai-whisper / openai-whisper-api / sag flow, and keeps the changelog credit for the original reporter.

Acceptance criteria:

  • pnpm test src/commands/onboard-skills.test.ts
  • pnpm test src/agents/skills.buildworkspaceskillstatus.test.ts
  • pnpm exec oxfmt --check --threads=1 src/commands/onboard-skills.ts src/commands/onboard-skills.test.ts CHANGELOG.md
  • pnpm check:changed
  • git diff --check

What I checked:

Likely related people:

  • @steipete: Visible current-main history for src/commands/onboard-skills.ts is carried by a ClawSweeper-authored import committed by Peter Steinberger, and git shortlog --all over the sampled onboarding/skill/changelog paths shows Peter as the top human contributor in this checkout. (role: recent maintainer / onboarding prompt owner; confidence: medium; commits: 4e115c5dbb8a, be8c24633aaa; files: src/commands/onboard-skills.ts, src/commands/onboard-skills.test.ts, CHANGELOG.md)
  • @BunsDev: Provided related PR context links @BunsDev to PR feat(ui): Control UI polish — skills revamp, markdown preview, agent workspace, macOS config tree #53411, which added bundled skill install metadata including openai-whisper-api, part of the mixed keyed/keyless scenario behind the report. (role: adjacent skills metadata contributor; confidence: medium; commits: a710366e9ece; files: skills/openai-whisper-api/SKILL.md, CHANGELOG.md, ui/src/ui/views/skills.ts)

Remaining risk / open question:

Codex review notes: model gpt-5.5, reasoning high; reviewed against 2a7d83b6ad30.

@vyctorbrzezowski vyctorbrzezowski force-pushed the contrib/clarify-skill-env-prompts branch from d0e3e66 to dd9e675 Compare April 29, 2026 15:01
@vyctorbrzezowski vyctorbrzezowski force-pushed the contrib/clarify-skill-env-prompts branch 2 times, most recently from 8e548b4 to 26172c8 Compare April 29, 2026 17:54
@vyctorbrzezowski vyctorbrzezowski force-pushed the contrib/clarify-skill-env-prompts branch from 26172c8 to 6470a23 Compare April 29, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Asks for OpenAI Whisper/ElevenLabs API key even though initial list says KEY not needed

1 participant