SkillTk is a declarative AI build system for generating skill/project artifacts from a manifest.
This repository currently provides a single CLI entrypoint: skilltk.py.
- Manifest-driven generation (
MANIFEST.yamlorMANIFEST.json) - Multi-file output with:
- section-based documents
- source-based files
- Multiple generation modes:
generatepreprocess(meta-prompt to final prompt conversion)selfenrichtemplate
- Resource processing (
copy,git-clone) - Dependency retrieval into
dependencies/ - Post-generation hooks
- JSON schema for manifest validation (
manifests/MANIFEST.schema.json)
- Python 3.10+
- OpenAI API key
- Dependencies:
openaipython-dotenvpyyaml(optional, needed for YAML manifests)
Install:
pip install openai python-dotenv pyyamlCreate .env (or your configured dotenv path):
OPENAI_API_KEY=your_key_hereInstall from the project directory:
pip install .After install, the CLI is available as a system command:
skilltk --helpOptional (isolated CLI install with pipx):
pipx install .python3 skilltk.py <command> [options]Top-level help:
usage: skilltk.py [-h] {init,generate,preprocess} ...
positional arguments:
{init,generate,preprocess}
options:
-h, --help show this help message and exit
init help:
usage: skilltk.py init [-h] [--yaml | --json]
options:
-h, --help show this help message and exit
--yaml
--json
generate help:
usage: skilltk.py generate [-h]
options:
-h, --help show this help message and exit
Create a starter manifest.
python3 skilltk.py init [--yaml | --json]Options:
--yamlcreateMANIFEST.yaml(default)--jsoncreateMANIFEST.json
Behavior:
- Fails if target manifest file already exists.
Generate outputs from the manifest.
python3 skilltk.py generateBehavior:
- Loads
MANIFEST.yamlfirst, falls back toMANIFEST.json - Writes files under
config.output_dir - Processes resources
- Runs post hooks (
hooks.post-generate)
Preprocesses manifest prompts in-place.
python3 skilltk.py preprocessBehavior:
- Loads
MANIFEST.yamlfirst, falls back toMANIFEST.json - For every
mode: preprocess, sendsprompt(meta-prompt) to LLM - Replaces prompt with generated final prompt
- Converts mode from
preprocesstogenerate - Backs up old manifest to
_<manifest-name>and writes the new manifest
Top-level keys:
$version(required)$schema(optional)metadata(required)config(required)generation(optional defaults)files(required)resources(optional)dependencies(optional)hooks(optional)agents(optional)
See full schema: manifests/MANIFEST.schema.json.
Each entry in files must have:
path- either
sectionsorsource
Each section supports mode:
self: emitscontentas-isgenerate: uses resolved prompt and model generationpreprocess: same generation path asgenerate, intended for preprocess-driven promptsenrich: improvescontentvia modeltemplate: substitutes{{var}}fromvariables
Supports the same mode semantics as sections.
Dependencies are declarative external assets (libraries/apps/datasets) that can be retrieved before generation.
Each dependency object contains:
idnametype(library,application,dataset)descriptionretrieval-script(shell script run inside that dependency's directory)
Runtime behavior:
- Dependencies are retrieved into
output_dir/dependencies/<id>/. - A summary file is emitted at
output_dir/dependencies/DEPENDENCIES.md. - If
SKILL.mdis generated, a## Dependenciessection is appended with all dependency entries. - Prompts can reference dependencies with macros:
$dep(id)-> replaced with dependency id/name/type/description$depfile(id, relative/path)-> inlines file contents fromdependencies/<id>/relative/path
- Macro expansion is applied for normal generation prompts and preprocess/meta-prompts.
Preprocess is prompt synthesis before final artifact generation.
Use one of these patterns:
mode: preprocess
prompt: "Generate a detailed final prompt for ..."or:
mode: generate
prompt: preprocess
preprocess:
strategy: synthesize
instructions: ...
context: [...]Two supported flows:
skilltk preprocessflow:- reads meta-prompts from items with
mode: preprocess - generates final prompts
- rewrites manifest (
mode->generate,prompt-> final prompt)
- reads meta-prompts from items with
- inline preprocess flow during
skilltk generate:- when
prompt: preprocess,resolve_prompt(...)callsrun_preprocess(...) - generated prompt is used immediately for final generation
- when
generation values can appear at:
- top-level (
generation) as defaults - per-section/per-source (
generation) as overrides - per-preprocess (
preprocess.generation) for prompt synthesis stage
Supported generation fields:
modeltemperaturetop_pmax_tokensseed(schema-level; may depend on provider support)cache(defaults-level)
$version: 1.0.0
$schema: https://example.com/schemas/skilltk.schema.json
metadata:
name: demo-skill
description: Demo with preprocess pipeline
config:
provider: openai
backend: https://api.openai.com/v1
model: gpt-5.5
output_dir: ./generated-skill
dotenv: .env
generation:
temperature: 0.3
top_p: 1.0
max_tokens: 3000
files:
- path: SKILL.md
sections:
- id: overview
title: Overview
mode: generate
prompt: preprocess
preprocess:
strategy: synthesize-structured-instructions
instructions: |
Create a precise prompt that asks for a production-grade skill overview.
Keep it implementation-oriented and concise.
context:
- Target audience: developers
- Output format: markdown
generation:
model: gpt-5.5
temperature: 0.1
- path: scripts/helper.py
source:
mode: self
content: |
print("hello from generated helper")
hooks:
post-generate:
- chmod +x scripts/*.pySupported resource types:
copyfrom: local pathto: destination relative to output dir
git-clonerepositoryto(optional)branch(optional)
- Missing
OPENAI_API_KEY-> generation fails. - Missing manifest -> generation fails.
- Unknown mode/resource types -> generation fails.
prompt: preprocesswithoutpreprocessblock -> generation fails.
Validate syntax quickly:
python3 -m py_compile skilltk.pyOptionally add your own JSON schema validation step using manifests/MANIFEST.schema.json.
skilltk.py- CLI/runtime implementationmanifests/MANIFEST.schema.json- manifest schemaAGENTS.md- architecture and agent guidance
python3 skilltk.py init --yaml
# edit MANIFEST.yaml
python3 skilltk.py generate