Project Structure¶
Overview of the Sutras codebase organization.
Directory Layout¶
sutras/
├── src/sutras/ # Main package (src layout)
│ ├── __init__.py
│ ├── core/
│ │ ├── __init__.py
│ │ ├── skill.py # Skill model (SKILL.md + sutras.yaml)
│ │ ├── abi.py # Skill ABI definitions
│ │ ├── loader.py # Skill discovery and loading
│ │ ├── builder.py # Skill packaging
│ │ ├── test_runner.py # Test framework
│ │ ├── evaluator.py # Evaluation system
│ │ ├── config.py # Global configuration
│ │ ├── naming.py # Skill naming system
│ │ ├── registry.py # Registry management
│ │ ├── installer.py # Skill installation
│ │ ├── publisher.py # Skill publishing
│ │ ├── semver.py # Semantic versioning and constraints
│ │ ├── lockfile.py # Lock file management
│ │ └── resolver.py # Dependency resolution
│ ├── cli/
│ │ ├── __init__.py
│ │ └── main.py # CLI commands
│ └── data/
│ └── skills/sutras/
│ └── SKILL.md # Bundled skill (deployed by `sutras setup`)
├── pi/ # Pi integration (published to npm as `sutras`)
│ ├── package.json # npm package manifest
│ ├── extensions/
│ │ └── sutras.ts # Pi extension (/sutras command)
│ └── skills/
│ └── sutras/
│ └── SKILL.md # Agent skill for LLM context
├── scripts/
│ └── sync_pi.py # Auto-generates pi files from CLI introspection
├── examples/
│ └── skills/
│ └── hello-claude/
│ ├── SKILL.md
│ ├── sutras.yaml
│ └── examples.md
├── tests/
├── pyproject.toml # Project config (hatchling + uv)
├── uv.lock
├── LICENSE
└── README.md
Core Modules¶
Module |
Responsibility |
|---|---|
|
Skill model representing SKILL.md + sutras.yaml |
|
Skill ABI (Application Binary Interface) definitions |
|
Discovering and loading skills from disk |
|
Building distributable packages |
|
Running skill tests |
|
Evaluating skill quality |
|
Managing skill registries |
|
Installing skills from various sources |
|
Publishing skills to registries |
|
Resolving skill dependencies |
Pi Integration (pi/)¶
The pi/ directory is published to npm as the sutras package. It contains:
File |
Purpose |
|---|---|
|
Pi extension with |
|
Agent skill for LLM context |
|
npm package manifest |
Both SKILL.md files (in pi/ and src/sutras/data/) are auto-generated by
scripts/sync_pi.py from the Click CLI. Run just sync-pi after adding CLI commands
and just check-sync to verify sync in CI.
User Skills Directory¶
When you create skills with sutras new, they’re placed in:
Location |
Purpose |
|---|---|
|
Project skills (shared via git) |
|
Global skills (personal, not committed) |
These follow the Anthropic Skills directory convention.