Skip to content

Commit eb991dd

Browse files
committed
feat: Reimplement skill management with a new skill model and dedicated modules.
1 parent c3ae772 commit eb991dd

File tree

20 files changed

+1058
-1492
lines changed

20 files changed

+1058
-1492
lines changed

.vtcode/tool-policy.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,18 @@
1515
"grep_file",
1616
"list_files",
1717
"list_pty_sessions",
18+
"list_skills",
19+
"load_skill",
20+
"load_skill_resource",
1821
"mcp::fetch::fetch",
1922
"mcp::time::convert_time",
2023
"mcp::time::get_current_time",
24+
"mcp_convert_time",
25+
"mcp_fetch",
26+
"mcp_fetch_fetch",
27+
"mcp_get_current_time",
28+
"mcp_time_convert_time",
29+
"mcp_time_get_current_time",
2130
"read_file",
2231
"read_pty_session",
2332
"resize_pty_session",
@@ -61,7 +70,10 @@
6170
"mcp_convert_time": "prompt",
6271
"mcp_time_convert_time": "prompt",
6372
"mcp_get_current_time": "prompt",
64-
"mcp_time_get_current_time": "prompt"
73+
"mcp_time_get_current_time": "prompt",
74+
"list_skills": "allow",
75+
"load_skill": "allow",
76+
"load_skill_resource": "allow"
6577
},
6678
"constraints": {},
6779
"mcp": {

Cargo.lock

Lines changed: 35 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vtcode-core/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ tree-sitter-bash = "0.25"
6262
indexmap = { version = "2.12", features = ["serde"] }
6363
itertools = "0.14.0"
6464
tempfile = { workspace = true }
65+
dunce = "1.0"
66+
include_dir = "0.7"
6567
once_cell = "1.19"
6668
parking_lot = "0.12"
6769
sha2 = "0.10"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: skill-creator
3+
description: Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Codex's capabilities with specialized knowledge, workflows, or tool integrations.
4+
metadata:
5+
short-description: Create or update a skill
6+
---
7+
8+
# Skill Creator
9+
10+
This skill provides guidance for creating effective skills.
11+
12+
## About Skills
13+
14+
Skills are modular, self-contained packages that extend Codex's capabilities by providing
15+
specialized knowledge, workflows, and tools. Think of them as "onboarding guides" for specific
16+
domains or tasks—they transform Codex from a general-purpose agent into a specialized agent
17+
equipped with procedural knowledge that no model can fully possess.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: skill-installer
3+
description: Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).
4+
metadata:
5+
short-description: Install curated skills from openai/skills or other repos
6+
---
7+
8+
# Skill Installer
9+
10+
Helps install skills. By default these are from https://github.com/openai/skills/tree/main/skills/.curated, but users can also provide other locations.
11+
12+
Use the helper scripts based on the task:
13+
- List curated skills when the user asks what is available, or if the user uses this skill without specifying what to do.
14+
- Install from the curated list when the user provides a skill name.
15+
- Install from another repo when the user provides a GitHub repo/path (including private repos).

vtcode-core/src/skills/cli_bridge.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ mod tests {
593593

594594
let bridge = CliToolBridge::new(config).unwrap();
595595
let result = bridge
596-
.execute(Value::String("hello world".to_string()))
596+
.execute_internal(Value::String("hello world".to_string()))
597597
.await
598598
.unwrap();
599599

vtcode-core/src/skills/container_validation.rs

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -472,17 +472,7 @@ mod tests {
472472
description: "Generate PDFs".to_string(),
473473
version: Some("1.0.0".to_string()),
474474
author: Some("Test".to_string()),
475-
license: None,
476-
model: None,
477-
mode: None,
478-
vtcode_native: None,
479-
allowed_tools: None,
480-
disable_model_invocation: None,
481-
when_to_use: None,
482-
requires_container: None,
483-
disallow_container: None,
484-
compatibility: None,
485-
metadata: None,
475+
..Default::default()
486476
};
487477

488478
let instructions = r#"
@@ -517,17 +507,8 @@ mod tests {
517507
description: "Generate spreadsheets".to_string(),
518508
version: Some("1.0.0".to_string()),
519509
author: Some("Test".to_string()),
520-
license: None,
521-
model: None,
522-
mode: None,
523510
vtcode_native: Some(true),
524-
allowed_tools: None,
525-
disable_model_invocation: None,
526-
when_to_use: None,
527-
requires_container: None,
528-
disallow_container: None,
529-
compatibility: None,
530-
metadata: None,
511+
..Default::default()
531512
};
532513

533514
let instructions = r#"
@@ -570,17 +551,7 @@ mod tests {
570551
description: "Generate PDFs".to_string(),
571552
version: Some("1.0.0".to_string()),
572553
author: Some("Test".to_string()),
573-
license: None,
574-
model: None,
575-
mode: None,
576-
vtcode_native: None,
577-
allowed_tools: None,
578-
disable_model_invocation: None,
579-
when_to_use: None,
580-
requires_container: None,
581-
disallow_container: None,
582-
compatibility: None,
583-
metadata: None,
554+
..Default::default()
584555
};
585556

586557
let instructions = r#"

vtcode-core/src/skills/context_manager.rs

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -585,17 +585,8 @@ mod tests {
585585
description: "Test skill".to_string(),
586586
version: Some("1.0.0".to_string()),
587587
author: Some("Test".to_string()),
588-
license: None,
589-
model: None,
590-
mode: None,
591588
vtcode_native: Some(true),
592-
allowed_tools: None,
593-
disable_model_invocation: None,
594-
when_to_use: None,
595-
requires_container: None,
596-
disallow_container: None,
597-
compatibility: None,
598-
metadata: None,
589+
..Default::default()
599590
};
600591

601592
assert!(manager.register_skill_metadata(manifest).is_ok());
@@ -610,19 +601,7 @@ mod tests {
610601
let manifest = SkillManifest {
611602
name: "test-skill".to_string(),
612603
description: "Test skill".to_string(),
613-
version: None,
614-
author: None,
615-
license: None,
616-
model: None,
617-
mode: None,
618-
vtcode_native: None,
619-
allowed_tools: None,
620-
disable_model_invocation: None,
621-
when_to_use: None,
622-
requires_container: None,
623-
disallow_container: None,
624-
compatibility: None,
625-
metadata: None,
604+
..Default::default()
626605
};
627606

628607
manager.register_skill_metadata(manifest.clone()).unwrap();

vtcode-core/src/skills/enhanced_validator.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -391,17 +391,9 @@ mod tests {
391391
description: "A test skill for validation".to_string(),
392392
version: Some("1.0.0".to_string()),
393393
author: Some("Test Author".to_string()),
394-
license: None,
395-
model: None,
396-
mode: None,
397-
vtcode_native: None,
398394
allowed_tools: Some("Read Write Bash".to_string()),
399-
disable_model_invocation: None,
400-
when_to_use: None,
401-
requires_container: None,
402-
disallow_container: None,
403395
compatibility: Some("Designed for VTCode".to_string()),
404-
metadata: None,
396+
..Default::default()
405397
};
406398

407399
// Note: We can't easily test directory validation without creating temp dirs

vtcode-core/src/skills/executor.rs

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -329,19 +329,8 @@ mod tests {
329329
let manifest = SkillManifest {
330330
name: "test-skill".to_string(),
331331
description: "Test skill".to_string(),
332-
version: None,
333-
author: None,
334332
vtcode_native: Some(true),
335-
allowed_tools: None,
336-
disable_model_invocation: None,
337-
when_to_use: None,
338-
requires_container: None,
339-
disallow_container: None,
340-
compatibility: None,
341-
metadata: None,
342-
license: None,
343-
mode: None,
344-
model: None,
333+
..Default::default()
345334
};
346335

347336
let skill = Skill::new(
@@ -360,19 +349,8 @@ mod tests {
360349
let manifest = SkillManifest {
361350
name: "test-skill".to_string(),
362351
description: "Test skill".to_string(),
363-
version: None,
364-
author: None,
365352
vtcode_native: Some(true),
366-
allowed_tools: None,
367-
disable_model_invocation: None,
368-
when_to_use: None,
369-
requires_container: None,
370-
disallow_container: None,
371-
compatibility: None,
372-
metadata: None,
373-
license: None,
374-
mode: None,
375-
model: None,
353+
..Default::default()
376354
};
377355

378356
let skill = Skill::new(
@@ -397,19 +375,8 @@ mod tests {
397375
let manifest = SkillManifest {
398376
name: "test-skill".to_string(),
399377
description: "Test skill".to_string(),
400-
version: None,
401-
author: None,
402378
vtcode_native: Some(true),
403-
allowed_tools: None,
404-
disable_model_invocation: None,
405-
when_to_use: None,
406-
requires_container: None,
407-
disallow_container: None,
408-
compatibility: None,
409-
metadata: None,
410-
license: None,
411-
mode: None,
412-
model: None,
379+
..Default::default()
413380
};
414381

415382
let skill = Skill::new(manifest, PathBuf::from("/tmp"), "Instructions".to_string())

0 commit comments

Comments
 (0)