Feature Request: Skill Dependency and Modular Import System

Resolved 💬 4 comments Opened Mar 11, 2026 by solar2ain Closed Apr 9, 2026

Problem Statement

When building complex SOP (Standard Operating Procedure) skills, there's often a need to reference knowledge from other skills. Currently, skills are isolated prompt templates with no native way to compose or reference each other.

Real-World Example

Consider a Model Deployment skill that needs to:

  1. Submit tasks to cloud servers (requires cloud CLI knowledge)
  2. Search for model documentation (requires search capability)
  3. Handle errors by searching solutions

The Cloud CLI skill is large and comprehensive, containing:

  • Basic usage
  • Authentication
  • Task submission ← Model Deployment needs this
  • Resource monitoring
  • Log viewing
  • ... many other features

Current Limitations

  1. No partial import: Cannot import just the "task submission" part
  2. Dependency chains ignored: "Task submission" depends on "authentication" and "basic usage"
  3. Context waste: Loading the entire Cloud CLI skill wastes context tokens
  4. Fragile references: If model-deploy.md hardcodes section names, changes in cloud-cli.md break the reference
  5. No change detection: No way to know when a dependency has changed

Proposed Solution

1. Export Declaration (in dependency skill)

# cloud-cli.md
---
name: cloud-cli
exports:
  submit-task:
    description: Submit compute tasks to cloud
    includes: [basic-usage, authentication, submit-task]
  
  monitoring:
    description: Monitoring and logging
    includes: [basic-usage, authentication, log-viewer, metrics]
  
  full:
    includes: all
---

The dependency defines stable export interfaces that bundle required sections.

2. Import Declaration (in dependent skill)

# model-deploy.md
---
name: model-deploy
imports:
  - from: cloud-cli
    use: submit-task
---

The dependent only declares what capability it needs, not internal section names.

3. Runtime Behavior

When user invokes /model-deploy:

  1. Framework parses imports
  2. Resolves cloud-cli.submit-task → loads basic-usage + authentication + submit-task
  3. Merges into context (deduplicates if multiple imports share sections)
  4. Agent executes with combined knowledge

Benefits

| Problem | Solution |
|---------|----------|
| Partial import | Export bundles only needed sections |
| Dependency chains | Export defines includes with prerequisites |
| Context efficiency | Only imported capabilities are loaded |
| Stable references | Export names are the stable API |
| Change detection | Framework can warn if referenced export is removed |

Optional Enhancements

Versioning

imports:
  - from: cloud-cli@1.2
    use: submit-task

Checksum validation

Detect when imported content has changed and warn skill authors.

Circular dependency detection

Framework validates no circular imports exist.

Alternatives Considered

  1. Inline embedding: Doesn't scale for large skills
  2. Manual file reading: Fragile, no dependency resolution
  3. Split into micro-skills: Poor UX, too many commands

Implementation Notes

  • Backward compatible: Skills without exports/imports work as before
  • Could start simple: Just imports that load entire skills, then add granular exports

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗