Skip to content

Add Claude no-model-invocation integration option#2866

Open
wondr-wclabs wants to merge 1 commit into
github:mainfrom
wondr-wclabs:fix/2654-claude-no-model-invocation
Open

Add Claude no-model-invocation integration option#2866
wondr-wclabs wants to merge 1 commit into
github:mainfrom
wondr-wclabs:fix/2654-claude-no-model-invocation

Conversation

@wondr-wclabs

@wondr-wclabs wondr-wclabs commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Fixes #2654.

Summary

Adds a Claude-specific --no-model-invocation integration option so users can install Spec Kit's Claude skills as user-invocable only:

specify init my-project --integration claude --integration-options="--no-model-invocation"

The option defaults to the current behavior, so generated Claude skills still use disable-model-invocation: false unless the flag is explicitly supplied.

Rationale

The main issue in #2654 is Claude's skill-listing budget in larger monorepos. Only changing the core Claude setup() path would leave skills generated later by the bundled agent-context extension, extension commands, or preset overrides as model-invocable, which partially defeats the opt-out. This threads parsed integration options through shared skill post-processing so the same Claude flag is applied consistently to:

  • core Spec Kit Claude skills generated during init/upgrade
  • bundled extension skills such as speckit-agent-context-update
  • extension and preset-generated SKILL.md files

The raw and parsed integration options are also mirrored into init-options.json, while integration.json remains the structured integration-state source used by install/upgrade/switch flows. That lets later skill writers read the active option without needing to know the integration-state schema directly.

Validation

  • uv sync --extra test
  • uv run python -m pytest tests/integrations/test_integration_claude.py -q
  • uv run python -m pytest tests/test_extension_skills.py -k "no_model_invocation or skill_md_has_parseable_yaml" -q
  • uv run python -m pytest tests/integrations/test_integration_subcommand.py -q
  • uv run python -m pytest tests/test_extension_skills.py -q
  • uv run python -m pytest tests/integrations/test_integration_copilot.py tests/integrations/test_integration_base_skills.py -q
  • uv run python -m pytest tests/test_presets.py -q
  • uv run specify --help
  • git diff --check
  • uv run python -m pytest -q (3609 passed, 45 skipped)

AI disclosure

This PR was developed with assistance from OpenAI Codex. I reviewed the implementation and validation results before submitting.

@wondr-wclabs wondr-wclabs requested a review from mnriem as a code owner June 5, 2026 10:04
@wondr-wclabs wondr-wclabs force-pushed the fix/2654-claude-no-model-invocation branch from d40f518 to 5c6aa64 Compare June 5, 2026 21:29
@mnriem mnriem requested a review from Copilot June 8, 2026 15:46

Copilot AI left a comment

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.

Pull request overview

Adds a Claude-specific --no-model-invocation integration option and threads persisted parsed integration options through all SKILL.md post-processing paths (core init/upgrade, bundled extensions, presets, and command override rendering) so Claude skills can be installed as user-invocable only to reduce Claude’s skill-listing budget pressure (Fixes #2654).

Changes:

  • Adds Claude --no-model-invocation option and applies it by setting disable-model-invocation: true in generated/rewritten Claude SKILL.md frontmatter when enabled.
  • Persists raw + parsed integration options into .specify/init-options.json and ensures install/upgrade flows refresh those persisted values.
  • Passes parsed_options through post_process_skill_content() across integrations and updates tests to cover init/upgrade + extension skill inheritance.
Show a summary per file
File Description
tests/test_extension_skills.py Adds regression test ensuring extension-generated skills inherit persisted Claude no-model-invocation option.
tests/integrations/test_integration_claude.py Adds tests for Claude option declaration, setup behavior, init persistence, upgrade reuse, and post-processing honoring parsed options.
src/specify_cli/presets.py Threads persisted integration_parsed_options into integration skill post-processing for preset skill registration and restoration.
src/specify_cli/integrations/vibe/init.py Updates Vibe post-processing signature to accept and forward parsed_options.
src/specify_cli/integrations/hermes/init.py Ensures Hermes skill generation forwards parsed_options into post-processing.
src/specify_cli/integrations/copilot/init.py Updates Copilot post-processing signature and forwards parsed_options where applicable in skills setup.
src/specify_cli/integrations/claude/init.py Implements --no-model-invocation option and sets/overwrites disable-model-invocation frontmatter based on parsed options.
src/specify_cli/integrations/base.py Extends SkillsIntegration post-processing API to accept parsed_options and forwards it through skills generation.
src/specify_cli/integrations/agy/init.py Updates Agy post-processing signature and forwards parsed_options from setup.
src/specify_cli/integrations/_migrate_commands.py Passes raw/parsed options through to init-options update during integration upgrade.
src/specify_cli/integrations/_install_commands.py Passes raw/parsed options through to init-options update during integration install.
src/specify_cli/integrations/_helpers.py Extends init-options updater to optionally set/clear stored raw + parsed integration options via an explicit sentinel.
src/specify_cli/extensions.py Threads persisted integration_parsed_options into extension skill post-processing.
src/specify_cli/commands/init.py Persists integration raw/parsed options into init-options on init when provided.
src/specify_cli/agents.py Applies integration post-processing (with persisted parsed options) to SKILL.md override rendering.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 15/15 changed files
  • Comments generated: 1

Comment thread src/specify_cli/agents.py
Comment on lines +340 to +344
from . import load_init_options
from .integrations import get_integration

init_options = load_init_options(project_root)
parsed_options = (

@mnriem mnriem left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

As this is Claude specific it should not touch any other files than Claude integration specific files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow opting out of model invocation for installed skills (large monorepo skill-budget pain)

3 participants