Dynamic Skill Compiler
Dynamic Skill Compiler (DSC) is a task-driven compiler for agent skills. It takes a natural-language task, retrieves candidate skills from a local skill library, builds a skill graph, and emits a compact, dependency-aware skill package for execution.
What DSC Does
- Decomposes a task into subgoals and required capabilities.
- Retrieves local skill assets and their declared relationships.
- Extracts relevant skill fragments instead of passing whole skill files.
- Builds a graph over
similar_to,belong_to,compose_with, anddepend_onrelationships. - Runs compiler passes to select, repair, augment, and prune the skill set.
- Produces a
CompiledSkillPackagewith selected skills, execution order, coverage metrics, and pass traces.
Repository Layout
src/dynamic_skill_compiler/ Core DSC compiler package
tests/ Compiler and experiment integration tests
experiments/ Benchmark runners and local skill libraries
reports/ DSC design notes
The benchmark runners under experiments/ are kept as evaluation harnesses for ScienceWorld, ALFWorld, and WebShop. They are intentionally separate from the core compiler package.
Quick Start
Install from a local checkout:
python -m pip install -e .
After the package is published to PyPI, users can install it with:
python -m pip install dynamic-skill-compiler
On the first interactive dsc run, DSC asks whether to configure OpenAI
embeddings for semantic optimization. You can skip this and use local lexical
optimization only, or enter an API key/base URL to enable semantic matching.
from dynamic_skill_compiler import (
CompilerConfig,
DynamicSkillCompiler,
LocalEnvironment,
LocalSkillLibraryRetriever,
)
retriever = LocalSkillLibraryRetriever("experiments/src/skills/scienceworld")
compiler = DynamicSkillCompiler(
retriever=retriever,
config=CompilerConfig(),
)
compiled = compiler.compile(
"Your task is to measure the temperature of an unknown substance.",
environment=LocalEnvironment(benchmark="scienceworld"),
)
print([skill.asset.name for skill in compiled.compiled_skills])
print(compiled.execution_order)
print(compiled.metrics.coverage_score)
CLI
The package installs a dsc command for quick local compilation:
dsc "Measure the temperature of the unknown object." \
--skills-dir experiments/src/skills/scienceworld \
--pretty
The command prints a JSON summary containing selected skills, execution order, coverage metrics, compiler pass traces, and dropped-skill reasons.
Configure semantic optimization explicitly:
dsc --configure
You can also use environment variables or CLI flags:
OPENAI_API_KEY=sk-... OPENAI_BASE_URL=https://api.example.com/v1 \
dsc "Measure temperature" --skills-dir path/to/skills --semantic on
Use --semantic off to force local lexical optimization without any prompt.
Build And Publish
Build source and wheel distributions:
python -m pip install ".[dev]"
python -m build
python -m twine check dist/*
Publish to TestPyPI first:
python -m twine upload --repository testpypi dist/*
Publish to PyPI:
python -m twine upload dist/*
Use a PyPI API token via TWINE_USERNAME=__token__ and
TWINE_PASSWORD=pypi-... or through your local .pypirc.
Package metadata author is taomiao.
Tests
PYTHONPATH=src python -m unittest discover -s tests -p "test_*.py"
PYTHONPATH=src:experiments/src .venv-experiments/bin/python \
experiments/test_runtime_execution_guard.py
Branches
main: standalone DSC codebase.codex/v0321: latest DSC development branch mirrored intomain.
Metadata
Release files for dynamic-skill-compiler 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dynamic_skill_compiler-0.1.1.tar.gz | 52.6 kB | Without provenance | Details for dynamic_skill_compiler-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dynamic_skill_compiler-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for dynamic_skill_compiler-0.1.1-py3-none-any.whl |
Total release size: 96.1 kB
Release files / dynamic_skill_compiler-0.1.1.tar.gz
| Download URL | dynamic_skill_compiler-0.1.1.tar.gz |
|---|---|
| Size | 52.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e9d409e281ed26f6337c8e07d151b9e9e0c04ffc815be8cc691742da43bc2cb
|
|
BLAKE2b-256 checksum How to use checksums |
e7a6e90859530d2ad3b2906e93f3f4a399e93513fa2ef243f7cd02ef02be7e13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / dynamic_skill_compiler-0.1.1-py3-none-any.whl
| Download URL | dynamic_skill_compiler-0.1.1-py3-none-any.whl |
|---|---|
| Size | 43.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
be9f06be6fc47da31cc6ea2ac7f9d407d65ffa30cc85fcf6f2490b670abe61a2
|
|
BLAKE2b-256 checksum How to use checksums |
0df40aeed07c9cd99123f051272fa01039a8cc12ccf28fee40f2ced6b9947a37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for dynamic-skill-compiler 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.