Files
gh-tylerbryy-ospack-plugins…/skills/ospack/SKILL.md
2025-11-30 09:03:14 +08:00

1.2 KiB

ospack - Semantic Context Packer

Use ospack to gather relevant code context through import resolution and semantic search.

When to use this skill

Use ospack when you need to:

  • Understand a file and all its dependencies
  • Find code related to a concept across the codebase
  • Build comprehensive context for refactoring, debugging, or feature work
  • Explore unfamiliar codebases

Commands

Combines import resolution with semantic search:

# From a focus file
ospack pack --focus src/auth.py --root $(pwd)

# With semantic query
ospack pack --query "error handling" --root $(pwd)

# Both together (best results)
ospack pack --focus src/api.py --query "validation" --root $(pwd)

For fast semantic searches:

ospack search "database connection" --root $(pwd)

Output formats

  • --format xml: Structured XML (default, best for context)
  • --format compact: Human-readable markdown
  • --format chunks: Function-level results with scores

Tips

  • Use --focus when you have a specific entry point
  • Use --query when searching by concept
  • Combine both for comprehensive context
  • Increase --max-files for larger explorations