Add Claude no-model-invocation integration option#2866
Open
wondr-wclabs wants to merge 1 commit into
Open
Conversation
d40f518 to
5c6aa64
Compare
Contributor
There was a problem hiding this comment.
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-invocationoption and applies it by settingdisable-model-invocation: truein generated/rewritten Claude SKILL.md frontmatter when enabled. - Persists raw + parsed integration options into
.specify/init-options.jsonand ensures install/upgrade flows refresh those persisted values. - Passes
parsed_optionsthroughpost_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 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
requested changes
Jun 9, 2026
mnriem
left a comment
Collaborator
There was a problem hiding this comment.
As this is Claude specific it should not touch any other files than Claude integration specific files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #2654.
Summary
Adds a Claude-specific
--no-model-invocationintegration 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: falseunless 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 bundledagent-contextextension, 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:speckit-agent-context-updateThe raw and parsed integration options are also mirrored into
init-options.json, whileintegration.jsonremains 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 testuv run python -m pytest tests/integrations/test_integration_claude.py -quv run python -m pytest tests/test_extension_skills.py -k "no_model_invocation or skill_md_has_parseable_yaml" -quv run python -m pytest tests/integrations/test_integration_subcommand.py -quv run python -m pytest tests/test_extension_skills.py -quv run python -m pytest tests/integrations/test_integration_copilot.py tests/integrations/test_integration_base_skills.py -quv run python -m pytest tests/test_presets.py -quv run specify --helpgit diff --checkuv 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.