[Feature]: Add extension.yml-controlled skill resource copying with legacy no-copy support
Problem Statement
Extension commands rendered as agent skills currently leave their supporting files under .specify/extensions/<id>/ and rewrite references in the generated SKILL.md to that location. #5363 documents the resulting path-resolution problems; #5364 addresses the rewriting approach.
We also need a packaging option that places bundled resources alongside the generated skill, instead of requiring every resource reference to reach back into the installed extension. This is a separate feature from fixing the existing no-copy route, which must remain supported.
The Agent Skills specification describes a skill directory containing instructions and optional scripts, references, and assets. Its file-reference guidance says:
When referencing other files in your skill, use relative paths from the skill root.
This supports self-contained packaging of bundled skill resources, although the specification does not prohibit external dependencies or guarantee a shell working directory.
Proposed Solution
Add an extension.yml configuration mechanism for skill resource delivery, with both modes supported:
| Mode | Resource location | Intended role |
|---|---|---|
| Copy alongside the skill | Required bundled resources are copied into each generated skill directory and referenced relative to that directory. | Preferred model for new extension authoring. |
| No copy / extension-local | Resources remain under .specify/extensions/<id>/; generated skills reference their installed locations. |
Deprecated but still supported compatibility route. |
For example, copy mode could produce:
.github/skills/speckit-example-review/
├── SKILL.md
└── references/
└── reviewer.md
The skill would reference references/reviewer.md rather than ../../../.specify/extensions/example/references/reviewer.md.
The installed extension remains the source of truth. Skill-local files are generated installation outputs, not independently maintained source copies. Use regular files for copy mode; do not make symlink support a prerequisite.
This follows @mnriem's direction in the discussion on #5363:
We would need to support both. The alongside as the new normal and the in the extension as the deprecated but still supported route
It would be part of the extension.yml I would think
The original proposal was opt-in copying. The maintainer's reply establishes alongside delivery as the intended new normal while retaining the legacy route. The precise manifest syntax and transition/default rules still need design; this issue does not treat them as already agreed.
Scope and compatibility
- Configure the delivery mode in
extension.yml; a CLI override is not required for this feature. - Define which resources belong to each skill and how source paths map to skill-local destinations. Do not blindly copy the entire extension or rely on ambiguous filename matching.
- Cover all extension skill-generation and restoration routes, including aliases where generated, integration refresh/switch, and restoration after preset overrides.
- Track copied output ownership for refresh, update, removal, rollback, and changes between modes. Preserve unrelated or user-modified files according to the existing ownership policy.
- Do not silently relocate shared configuration or change scripts' required working directories. Document how such dependencies behave in both modes.
- Leave non-skill command output behavior unchanged.
- Keep existing extensions working during adoption. Document how manifests without the new setting are interpreted; deprecation must not mean removal of the no-copy route.
Design questions to resolve
- What is the manifest field/value schema, and is resource selection configured per extension or per command/skill?
- How do older manifests retain compatibility while new authoring guidance or scaffolding adopts alongside delivery?
- How are resource mappings, shared resources, and script dependencies declared or resolved deterministically?
Alternatives Considered
- Path rewriting only: remains necessary for the supported no-copy route, but does not provide skill-local packaging.
- Symlinks: avoid duplicate bytes but are not a portable baseline. #2988 documents a Codex limitation for symlinked
SKILL.mdfiles; that does not establish whether linked resource files work, so resource-link compatibility would need separate validation. - CLI-only opt-in: does not express an extension's packaging intent in its manifest; the maintainer favored
extension.yml. - Unconditional copying: would remove the required no-copy option and could alter shared configuration or script behavior.
Component
Agent integrations (command files, workflows), with extension manifest and lifecycle support in Specify CLI.
AI Agent (if applicable)
All integrations that render extension commands as skills. Actual resource resolution and script execution must be validated in representative agents rather than inferred from the presence of SKILL.md alone.
Use Cases
- An extension author bundles reference documents or templates with a skill and wants ordinary skill-relative references.
- An existing extension relies on centrally installed resources or shared configuration and must continue using the no-copy route.
- A user updates an extension or switches integrations and expects the selected delivery mode and its generated resources to remain consistent.
Acceptance Criteria
- [ ] A documented and validated
extension.ymlcontract supports both copy and no-copy delivery, including a defined compatibility rule for manifests without the setting. - [ ] New authoring guidance favors alongside delivery; the deprecated no-copy route remains usable and tested.
- [ ] Copy mode installs the required resources as regular files with working skill-relative references, without requiring symlinks.
- [ ] No-copy mode continues to resolve resources from the installed extension and does not create resource copies.
- [ ] Install, refresh/update, integration switch, preset restoration, removal, rollback, and transitions between modes handle owned outputs consistently and preserve user/unrelated files.
- [ ] Positive and negative tests cover both modes, resource mappings, invalid configuration, missing or unsafe resources, destination conflicts, and non-skill output regressions.
- [ ] Script working-directory requirements and shared configuration semantics are preserved and documented; behavior is validated on supported platforms, including Windows without symlink privileges.
- [ ] Manual agent-level evidence demonstrates resource access for representative skill integrations in both modes.
- [ ] Extension authoring and architecture documentation explain the mode selection, resource layout, lifecycle behavior, and migration policy.
Additional Context
- Original bug: #5363.
- Related path-rewriting fix: #5364. This feature does not replace the need for a working no-copy path.
- Proposal and rationale.
- Maintainer direction is quoted above; detailed implementation and migration choices remain open.
- Existing bug evidence is linked from #5363. No new implementation or runtime validation has been performed for this feature request.
AI Disclosure
Created for @markuswondrak using pi with GitHub Copilot / gpt-6-astra, in interactive, human-directed mode. AI assistance covered reading the linked discussion and repository guidance, drafting this issue, and publishing it at the contributor's request. No code changes or runtime tests were performed.
Feature assessment — extension-resource-delivery · Stage 1/5: Intake
Idea Intake: Extension-managed skill resource delivery modes
- Slug: extension-resource-delivery
- Created: 2026-11-10T18:43:46Z
- Source: https://github.com/github/spec-kit/issues/5366
- Type: improvement
Idea (as captured)
"Add an
extension.ymlconfiguration mechanism for skill resource delivery, with both modes supported:
- copy bundled resources alongside each generated skill as the preferred new default, and
- keep the current no-copy route where resources stay under
.specify/extensions/<id>/for compatibility.Scope should include lifecycle consistency (install/update/integration switch/preset restoration/removal/rollback), deterministic resource mapping, and preservation of unrelated or user-modified files.
Context: #5363 identified path-resolution failures in skill outputs, and #5364 fixed rewriting for the legacy route; this request adds a packaging mode rather than replacing no-copy behavior."
Source: issue #5366 (author: @markuswondrak)
Restated
The request is to make skill resource placement configurable in extension.yml so extension authors can package referenced files directly with generated skills while preserving the existing extension-local reference model for backward compatibility. It asks for a first-class, lifecycle-safe contract instead of ad-hoc path rewriting only.
Origin & Context
- Raised by: @markuswondrak
- Trigger: Follow-on feature request after extension skill path-resolution defects and fixes in #5363 and #5364.
First-Glance Unknowns
- [NEEDS CLARIFICATION: Exact manifest schema and whether delivery mode is extension-level, per command, or per skill.]
- [NEEDS CLARIFICATION: Default behavior for manifests that omit the new setting, and migration/deprecation timeline for no-copy mode.]
- [NEEDS CLARIFICATION: Deterministic resource mapping rules (explicit include lists, destination mapping, conflict handling, shared resources).]
- [NEEDS CLARIFICATION: Ownership policy details for copied files during update/remove/rollback and mode transitions.]
- [NEEDS CLARIFICATION: Script working-directory and shared configuration behavior guarantees across both modes.]
Generated by 💡 Assess a Feature Request by Installing and Running Spec Kit for #5366 · copilot · gpt53codex · 74.9 AIC · ⌖ 0.768 AIC · ⊞ 26.4K · ◷
Feature assessment — extension-resource-delivery · Stage 2/5: Research
Idea Research: Extension-managed skill resource delivery modes
- Slug: extension-resource-delivery
- Created: 2026-11-10T18:43:46Z
- Evidence confidence (overall): medium
Users & Demand
- Extension authors and maintainers are actively reporting broken or fragile skill resource references and asking for packaging that is skill-relative rather than project-root dependent. — [source: github/spec-kit#5366, github/spec-kit#5363] (confidence: high)
- Maintainer direction in linked discussion favors "alongside as the new normal" while retaining legacy no-copy support, indicating product-owner demand, not only contributor preference. — [source: github/spec-kit#5366 citing github/spec-kit#5363 comments] (confidence: medium)
- Observed behavior (not just requested behavior): existing generation keeps resources in
.specify/extensions/<id>/and relies on rewrite semantics. — [source:src/specify_cli/agents.pyrewrite_extension_paths,docs/extensions/developing.mdscript-path rewriting section] (confidence: high)
Prior Art
- The current architecture already has a formal command/skill delivery boundary and lifecycle ownership/rollback semantics; this feature would extend an existing lifecycle model rather than introduce a new subsystem. — [source:
design/extension.mdcommand/skill delivery and refresh/removal sections] (confidence: high) - Recent bug and fix cycle (#5363 → #5364) demonstrates path-rewrite-only behavior can be improved but still leaves demand for self-contained skill packaging as a separate concern. — [source: github/spec-kit#5363, github/spec-kit#5364, github/spec-kit#5366] (confidence: high)
- Existing tests assert extension resources are rewritten to
.specify/extensions/<id>/..., which confirms no-copy mode is established and regression-sensitive. — [source:tests/test_extension_skills.pyaroundtest_skill_registration_rewrites_extension_subdir_paths] (confidence: high)
Market & Context
- Agent skills ecosystems commonly treat a skill directory as a package root for related instructions/assets; requesters cite this as expected author ergonomics for relative references. — [source: github/spec-kit#5366 quoting agentskills.io specification] (confidence: medium)
- Current workaround burden is on extension authors to model references around installed extension layout details, increasing cognitive overhead and integration variance risk. — [source: github/spec-kit#5363, github/spec-kit#5366] (confidence: medium)
Data & Constraints
- Manifest contract currently centers on
provides.commands|templates|scripts|config, hooks, and events; no dedicated resource-delivery mode field is documented in existing manifest contract text. — [source:design/extension.mdmanifest contract section;docs/extensions/developing.mdmanifest examples] (confidence: high) - Path rewriting logic today resolves extension-relative references to
.specify/extensions/<id>/..., so introducing copy mode must avoid regressing this compatibility route. — [source:src/specify_cli/agents.pyrewrite_extension_paths;tests/test_extension_skills.py] (confidence: high) - Lifecycle operations (update/remove/rollback/restore) already contain strict ownership safeguards, implying copy mode must integrate with ownership tracking to avoid deleting user files or leaving stale copies. — [source:
src/specify_cli/extensions/__init__.pyremoval/rollback code paths;design/extension.md] (confidence: medium) - Platform portability constraint is explicit in issue acceptance criteria: solution must not require symlink capabilities (especially Windows without privileges). — [source: github/spec-kit#5366] (confidence: high)
Evidence Against the Idea
- Expanded lifecycle complexity (copy map tracking + transition semantics) can introduce failure modes in update/remove/rollback and increase maintenance cost. — [source: issue scope in github/spec-kit#5366; lifecycle complexity in
design/extension.md] (confidence: medium) - A pure copy strategy risks drift between extension source and generated skill-local artifacts if ownership and refresh semantics are imperfectly implemented. — [source: github/spec-kit#5366 alternatives and constraints] (confidence: medium)
- External standard alignment is suggestive, not decisive: no direct empirical validation in this run that every target agent runtime requires/benefits from identical skill-local packaging behavior. — [UNVERIFIED: cross-agent runtime behavior beyond linked issue evidence] (confidence: low)
Gaps & Open Questions
- [NEEDS CLARIFICATION: Concrete
extension.ymlschema for selecting delivery mode and resource mappings.] - [NEEDS CLARIFICATION: Compatibility/default rule when field is absent in existing extensions.]
- [NEEDS CLARIFICATION: How copied artifacts are represented in registry ownership metadata and reconciled during mode switches.]
- [NEEDS CLARIFICATION: Whether script and shared-config dependencies are declarative, inferred, or explicitly excluded from copy mode.]
- [NEEDS CLARIFICATION: Required manual validation matrix across integrations/agents for both modes.]
Sources
- https://github.com/github/spec-kit/issues/5366 (host: github.com, policy: allowlisted)
- https://github.com/github/spec-kit/issues/5363 (host: github.com, policy: allowlisted)
- https://github.com/github/spec-kit/pull/5364 (host: github.com, policy: allowlisted)
src/specify_cli/agents.py(local repository source)src/specify_cli/extensions/__init__.py(local repository source)tests/test_extension_skills.py(local repository source)design/extension.md(local repository source)docs/extensions/developing.md(local repository source)
Generated by 💡 Assess a Feature Request by Installing and Running Spec Kit for #5366 · copilot · gpt53codex · 74.9 AIC · ⌖ 0.768 AIC · ⊞ 26.4K · ◷
Feature assessment — extension-resource-delivery · Stage 3/5: Problem
Problem Definition: Skill resource packaging for extensions
- Slug: extension-resource-delivery
- Created: 2026-11-10T18:43:46Z
- Inputs used: intake.md | research.md
Problem Statement
Extension-authored skills need resource references that resolve reliably across agent integrations and lifecycle operations, but current extension-local delivery requires path rewriting and layout awareness that can be fragile and hard for authors to reason about. The project needs a clear, backward-compatible contract for how skill resources are delivered and maintained.
Affected Users & Stakeholders
- Users: Extension authors and maintainers — they must structure resource references around installed extension paths and can encounter resolution failures or portability issues.
- Users: Teams consuming extension-provided skills — they need generated skills that keep working through install/update/switch/remove cycles.
- Stakeholders: Spec Kit maintainers/reviewers — they own manifest contract clarity, compatibility policy, and lifecycle safety.
Goals
- Define a manifest-driven resource-delivery contract that supports both alongside-copy and legacy no-copy modes.
- Make skill resource resolution deterministic and understandable for extension authors.
- Preserve lifecycle safety (install/update/switch/remove/rollback/restore) and ownership guarantees for generated outputs.
- Maintain backward compatibility for existing extensions using no-copy behavior.
Non-Goals
- Replacing no-copy mode entirely.
- Reworking non-skill command output behavior.
- Designing final architecture/API/task breakdown in this stage.
- Requiring symlink support as a baseline mechanism.
Success Metrics
- New/updated tests pass for both delivery modes, including positive and negative lifecycle cases (baseline: unknown; [NEEDS CLARIFICATION: exact test baseline counts and required matrix]).
- Generated skills in copy mode resolve referenced bundled resources via skill-relative paths in representative integrations (baseline: current behavior relies on extension-local path rewrites).
- Existing no-copy extensions remain functional without manifest changes under defined compatibility defaults (baseline: currently supported no-copy behavior).
Cost of Inaction
Spec Kit keeps relying on extension-local rewrites only, leaving authoring ergonomics and some integration/path expectations unresolved; repeated defects and ambiguity around resource placement policy are likely to recur, raising maintenance/review cost and reducing confidence in extension skill portability.
Open Questions
- [NEEDS CLARIFICATION: Exact
extension.ymlfield schema and granularity (extension-wide vs command/skill-specific).] - [NEEDS CLARIFICATION: Default behavior for manifests with no delivery setting.]
- [NEEDS CLARIFICATION: Ownership marker model for copied files and behavior on user-modified copies.]
- [NEEDS CLARIFICATION: Deterministic mapping format for bundled resources and conflict/error semantics.]
- [NEEDS CLARIFICATION: Documented behavior for script working directory and shared configuration dependencies in both modes.]
Generated by 💡 Assess a Feature Request by Installing and Running Spec Kit for #5366 · copilot · gpt53codex · 74.9 AIC · ⌖ 0.768 AIC · ⊞ 26.4K · ◷
Feature assessment — extension-resource-delivery · Stage 4/5: Concept
Concept: Manifest-controlled skill resource delivery
- Slug: extension-resource-delivery
- Created: 2026-11-10T18:43:46Z
- Recommended option: Option A — Dual-mode manifest with explicit resource mapping
Options
Option A — Dual-mode manifest with explicit resource mapping
- Sketch: Add an
extension.ymldelivery section that supports two explicit modes:copy(resources copied into each generated skill directory) andno-copy(current extension-local resolution). Authors declare which files are bundled for each skill and destination paths under that skill. - Appetite: medium
- Trade-offs: Maximizes clarity and author control; enables self-contained skill packages while preserving compatibility. Adds manifest schema and lifecycle tracking complexity.
- Rabbit holes: Ownership reconciliation across mode switches; conflict handling when destination files already exist; alias/restore/update edge cases.
Option B — Keep no-copy only, harden rewrite rules further
- Sketch: Retain extension-local resource delivery exclusively and continue improving rewrite and resolution behavior, including nested references and integration-specific path handling.
- Appetite: small
- Trade-offs: Lowest immediate complexity and minimal lifecycle surface change; does not satisfy request for skill-local packaging and keeps author coupling to installation layout.
- Rabbit holes: Integration-specific path semantics can continue to generate regressions; difficult to make author UX predictable across agents.
Option C — Auto-copy all extension resources into each generated skill
- Sketch: Copy a broad resource set by convention into skill directories without explicit per-skill mapping configuration.
- Appetite: large
- Trade-offs: Simple author experience in trivial cases; high risk of over-copying, conflicts, and unintended dependency movement.
- Rabbit holes: File bloat, ambiguous ownership, accidental copying of shared config/scripts, and brittle cleanup behavior.
Recommendation
Choose Option A. It directly addresses the feature request and maintainer direction (copy-as-normal + retained no-copy compatibility) while preserving a clear migration story. It contains complexity by forcing explicit declarations instead of heuristic full-tree copying and keeps compatibility guardrails explicit.
Out of Scope (for the recommended option)
- Replacing all existing no-copy behavior.
- Implicit full-extension copying without declared mappings.
- Runtime execution model changes for scripts beyond documented resource delivery semantics.
- Detailed implementation design/spec tasks in this stage.
Assumptions to Validate
- A manifest schema can represent per-skill resource mappings without making extension authoring overly burdensome.
- Existing ownership metadata can be extended to track copied outputs safely through update/remove/rollback flows.
- Representative integrations can consume copied resources reliably with skill-relative references.
- Compatibility defaults for legacy manifests can be defined without breaking current extensions.
Generated by 💡 Assess a Feature Request by Installing and Running Spec Kit for #5366 · copilot · gpt53codex · 74.9 AIC · ⌖ 0.768 AIC · ⊞ 26.4K · ◷
Feature assessment — extension-resource-delivery · Stage 5/5: Decision — verdict go
Decision: Manifest-controlled extension skill resource delivery
- Slug: extension-resource-delivery
- Decided: 2026-11-10T18:43:46Z
- Verdict: go
- Artifacts reviewed: intake.md | research.md | problem.md | concept.md
Scorecard
| Criterion | Rating | Justification |
|---|---|---|
| Problem validity | strong | Recent defect history and current author friction show a real and recurring problem around skill resource resolution and packaging expectations. |
| Evidence strength | adequate | Evidence is grounded in issue history, current code/tests/docs, and maintainer direction; external cross-agent behavior data is limited. |
| Value vs. inaction | strong | A clear contract should reduce recurring path-related regressions and improve extension authoring clarity while preserving compatibility. |
| Feasibility / appetite | adequate | A medium-sized, schema-plus-lifecycle extension is credible with explicit mapping and ownership integration; complexity is manageable but non-trivial. |
| Strategic fit | adequate | Aligns with extension manifest evolution and existing command/skill delivery boundaries without requiring a new trust or plugin model. |
| Risk posture | adequate | Key risks are known (ownership drift, lifecycle edge cases, compatibility defaults) and can be mitigated via explicit mappings and comprehensive tests. |
Verdict & Rationale
go. The problem is real, scoped, and strategically aligned, and there is a credible concept (dual-mode manifest contract) that preserves backward compatibility while enabling the requested packaging model. Evidence is not exhaustive across every runtime, but it is sufficient for specification, provided the spec explicitly addresses lifecycle ownership, migration defaults, and integration validation.
If needs-clarification
- Blocking questions: N/A
- Revisit stage: N/A
If go — Handoff to __SPECKIT_COMMAND_SPECIFY__
- Problem: Extension skills need deterministic, portable resource delivery semantics that support skill-local packaging without breaking current extension-local behavior.
- Chosen approach: Dual-mode
extension.ymlcontract (copy+ legacyno-copy) with explicit per-skill resource mappings. - In scope / out of scope: In scope: schema, generation behavior, lifecycle ownership, compatibility defaults, tests/docs. Out of scope: removing no-copy mode, broad implicit extension-tree copying, unrelated non-skill output changes.
- Success metrics: Passing positive/negative tests for both modes and lifecycle transitions; verified skill-relative resource resolution in copy mode; no-copy compatibility retained for existing manifests.
- Carried-forward open questions:
- [NEEDS CLARIFICATION: Exact schema keys/values and granularity for delivery mode and mappings.]
- [NEEDS CLARIFICATION: Legacy default behavior and deprecation policy details.]
- [NEEDS CLARIFICATION: Ownership and conflict semantics for copied outputs on update/remove/rollback/mode switches.]
- [NEEDS CLARIFICATION: Required agent/integration validation matrix for both delivery modes.]
Generated by 💡 Assess a Feature Request by Installing and Running Spec Kit for #5366 · copilot · gpt53codex · 74.9 AIC · ⌖ 0.768 AIC · ⊞ 26.4K · ◷