Skip to content

Commit eb1a476

Browse files
committed
update codex install
1 parent 5073f6d commit eb1a476

3 files changed

Lines changed: 23 additions & 18 deletions

File tree

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@ cd vara-skills
3737
bash scripts/install-codex-skills.sh
3838
```
3939

40-
Then start a new Codex session and load the top-level `SKILL.md` when you want the pack router.
40+
This installs the full Codex pack surface:
41+
42+
- `$CODEX_HOME/skills/vara-skills` -> repo root, including the router `SKILL.md`, shared `assets/`, shared `references/`, and helper scripts.
43+
- `$CODEX_HOME/skills/<skill-name>` -> each installable skill directory under `skills/`.
44+
45+
Then start a new Codex session and use `vara-skills` when you want the pack router.
4146

4247
### Claude Code Plugin
4348

scripts/install-codex-skills.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
55
REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
66
CODEX_HOME="${CODEX_HOME:-${HOME}/.codex}"
77
TARGET_DIR="${CODEX_HOME}/skills"
8+
PACK_NAME="vara-skills"
89

910
mkdir -p "${TARGET_DIR}"
1011

12+
pack_target="${TARGET_DIR}/${PACK_NAME}"
13+
ln -sfn "${REPO_ROOT}" "${pack_target}"
14+
printf 'INSTALLED_PACK=%s\n' "${PACK_NAME}"
15+
printf 'TARGET=%s\n' "${pack_target}"
16+
1117
find "${REPO_ROOT}/skills" -mindepth 1 -maxdepth 1 -type d | LC_ALL=C sort | while IFS= read -r skill_dir; do
1218
skill_name="$(basename "${skill_dir}")"
1319
target_path="${TARGET_DIR}/${skill_name}"

tests/test_install_codex_skills.py

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,9 @@
99

1010
ROOT = Path(__file__).resolve().parents[1]
1111
SCRIPT = ROOT / "scripts" / "install-codex-skills.sh"
12-
EXPECTED_SKILLS = (
13-
"gear-architecture-planner",
14-
"gear-gstd-api-map",
15-
"gear-message-execution",
16-
"gtest-tdd-loop",
17-
"idea-to-spec",
18-
"sails-dev-env",
19-
"sails-frontend",
20-
"sails-architecture",
21-
"sails-feature-workflow",
22-
"sails-gtest",
23-
"sails-idl-client",
24-
"sails-local-smoke",
25-
"sails-new-app",
26-
"sails-rust-implementer",
27-
"ship-sails-app",
28-
"task-decomposer",
12+
PACK_NAME = "vara-skills"
13+
EXPECTED_SKILLS = tuple(
14+
sorted(path.name for path in (ROOT / "skills").iterdir() if path.is_dir())
2915
)
3016

3117

@@ -44,6 +30,14 @@ def main() -> int:
4430
)
4531
assert result.returncode == 0, result.stderr
4632
target = Path(tmpdir) / "skills"
33+
pack_link = target / PACK_NAME
34+
assert pack_link.is_symlink(), f"missing symlink for {PACK_NAME}"
35+
assert pack_link.resolve() == ROOT.resolve(), (
36+
f"wrong target for {PACK_NAME}: {pack_link.resolve()}"
37+
)
38+
assert (pack_link / "SKILL.md").exists(), "root pack should expose SKILL.md"
39+
assert (pack_link / "assets").is_dir(), "root pack should expose assets/"
40+
assert (pack_link / "references").is_dir(), "root pack should expose references/"
4741
for skill in EXPECTED_SKILLS:
4842
link = target / skill
4943
assert link.is_symlink(), f"missing symlink for {skill}"

0 commit comments

Comments
 (0)