UNRELEASED DEVELOPMENT SNAPSHOT · READ-ONLY EXCERPT
skills/pack-create/SKILL.md
This is the cited technical source at local revision 275a354, inspected on 22 September 2026. It differs from the public release. This reference publishes only the cited sections, not an installable release or the development branch.
Line numbers refer to the complete recorded file. Uncited lines are omitted. Full-file SHA-256: 48afc54a8c489cd46797b675867aa06000683b82d761b6812ec84da217830f22.
1
---2
name: pack-create3
layer: foundation4
description: Scaffolds a new Lintel pack — copies _default pack.yaml as starting point, optionally sets extends parent, validates result.5
color: green6
tools: Read, Write, Edit, Bash7
voice: internal8
cli_support: [claude-code, codex]9
---11
You are the PACK-CREATE skill — scaffolds a new pack in `<repo>/packs/<name>/` or `~/.lintel/packs/<name>/`.13
## What this skill does15
Creates a new pack directory + manifest. Three modes:17
- **Blank pack:** starts from `packs/_default/pack.yaml` skeleton (every field declared with neutral value)18
- **Extending pack:** starts from `packs/_default/pack.yaml` + sets `extends: <parent-name>` (validates parent exists)19
- **Cloned pack:** copies an existing pack as a starting point (operator edits per their needs)21
## When to use23
- Operator wants a new pack for a fresh customer/team/domain24
- Sister pack to an existing pack (extends: shared parent)25
- Forking an existing pack for an isolated experiment… omitted uncited lines …
67
```bash68
if [ -n "$extends" ]; then69
source "$REPO_ROOT/lib/pack-resolver.sh"70
if ! validate_pack "$extends" 2>/dev/null; then71
echo "ERROR: parent pack '$extends' does not exist or fails validation"72
exit 173
fi74
fi75
```77
### Step 5 — Write manifest79
```bash80
mkdir -p "$target_dir/$name"81
cp "$template" "$target_dir/$name/pack.yaml"83
# Replace name: line84
sed -i.bak "s/^name: .*/name: $name/" "$target_dir/$name/pack.yaml"85
rm -f "$target_dir/$name/pack.yaml.bak"87
# Add extends: if requested88
if [ -n "$extends" ]; then89
# Insert after `version:` line90
awk -v ext="$extends" '91
/^version:/ { print; print "extends: " ext; next }92
{ print }93
' "$target_dir/$name/pack.yaml" > "$target_dir/$name/pack.yaml.tmp"94
mv "$target_dir/$name/pack.yaml.tmp" "$target_dir/$name/pack.yaml"95
fi96
```98
### Step 6 — Validate result100
```bash101
source "$REPO_ROOT/lib/pack-resolver.sh"102
if validate_pack "$name" 2>&1; then103
echo "✓ Pack '$name' created at $target_dir/$name/"104
else105
echo "WARN: pack created but validation failed — review pack.yaml"106
fi107
```109
### Step 7 — Audit + surface next steps111
```bash112
ts=$(date -u +"%Y-%m-%dT%H:%M:%SZ")113
printf '{"ts":"%s","kind":"pack_created","name":"%s","extends":"%s","scope":"%s","operator":"%s"}\n' \114
"$ts" "$name" "${extends:-none}" "$scope" "$(whoami)" \115
>> "$LINTEL_HOME/audit/pack-lifecycle.jsonl"… omitted uncited lines …
126
- After Step 6 if validation fails: surface, ask to retry or abandon128
## Integration130
**Reads:**131
- `packs/_default/pack.yaml` (template)132
- `lib/pack-resolver.sh` (validation)134
**Writes:**135
- `<scope>/packs/<name>/pack.yaml`136
- `~/.lintel/audit/pack-lifecycle.jsonl`138
**Triggers (recommends):**139
- `/li:pack-switch <name>` to activate the new pack140
- `/li:pack-list` to confirm142
## Anti-patterns144
- **Creating a pack to override one field** — edit `pack.yaml` of an existing pack instead145
- **Not validating extends parent** — broken extends silently degrades to _default at runtime146
- **Auto-activating after create** — operator decides when to switch (avoids surprise behavior changes mid-session)