Skip to content

Bridge Claude plugin credentials to First Draft operations #27

Description

@raghubetina

Problem

Claude Code stores the First Draft api_token from /plugin as sensitive userConfig, but the create-full-stack-app Skill invokes firstdraft through the ordinary Bash tool. Claude only exposes ${user_config.*} to supported plugin components such as MCP, LSP, and hooks; a plugin bin/ executable is merely added to Bash PATH and does not receive the sensitive value.

The 0.1.0 adapter tests manually injected lowercase CLAUDE_PLUGIN_OPTION_api_token and CLAUDE_PLUGIN_OPTION_api_url, so they did not exercise the real Claude boundary. Claude 2.1.226 normalizes hook option names to uppercase. A real template-to-Codespace smoke therefore saved the token successfully but the CLI still returned authentication_required.

Current pragmatic path

Drawing Board will use a local gitignored .env and one repo-local CLI wrapper for both Claude and Codex. This is appropriate for the current development smoke, but the token is readable by the agent and ordinary repository tools.

Future improvement

Provide authenticated First Draft operations through a narrow plugin MCP server whose environment maps ${user_config.api_url} and ${user_config.api_token}. Keep secrets out of Skill content and general Bash. Remove the .env requirement only after a real-Claude integration test proves an authenticated request against a fake local endpoint.

Acceptance

  • Install the packed plugin into an isolated real Claude Code profile.
  • Configure a canary sensitive token through Claude, not by injecting adapter variables.
  • Invoke the actual authenticated plugin component.
  • Prove the fake endpoint received the expected authorization without printing the token.
  • Prove general Bash and Skill content do not receive the sensitive value.
  • Repeat the fresh template -> Codespace -> Claude -> ordinary app request journey before promotion.

Official boundary: https://code.claude.com/docs/en/plugins-reference#user-configuration

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions