Subchapter 11.2
references/local-index-and-profiles.mdMarkdown3 KBView on GitHub
Progressive loading and project profiles solve different layers:
They are complementary. A profile narrows the candidate set and routing before a match; progressive loading keeps the chosen Skill lightweight afterward.
When the client supports project-local Skill directories, installing to the project is the strongest scope control. A profile file alone expresses routing preferences but cannot force the underlying client to unload globally installed metadata.
The index prevents installed Skills from becoming invisible inventory. Build it from all relevant roots and refresh it after installs, removals, or updates.
Each record contains:
The index does not execute Skills and stores no prompts, hit rates, or usage history.
Build:
python3 scripts/skill_index.py build \
--root ~/.codex/skills \
--root ~/.codex/plugins/cache \
--root .codex/skills \
--root ~/.agents/skills \
--root ~/.hermes/skills \
--output ~/.codex/skill-index.jsonSearch:
python3 scripts/skill_index.py search \
--index ~/.codex/skill-index.json \
--query "natural Chinese writing" \
--limit 8Use the JSON result internally. Present only names, plain summaries, current scope, and recommendation status to a novice.
Store the selected stack at <project>/.codex/skill-stack.json.
The profile records:
Create a preview:
python3 scripts/project_profile.py \
--project /path/to/project \
--name my-project-stack \
--skill primary-skill \
--skill helper-skill \
--route "main task=primary-skill" \
--route "writing quality=helper-skill"Repeat with --apply only after confirmation. Creating a profile does not install a Skill and does not grant new permissions.
When a profile exists:
Rebuild the local index and rerun the recall check after changing a profile.