Repository navigation
Load the user skills folder and write approved skills there - #442
Merged
Merged
Conversation
…loaded) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every skill registry reads the built-in folder (SKILLS_DIR, the repo's skills/ on this Mac) and then the user folder (USER_SKILLS_DIR, ~/.codec/skills): a built-in name always wins, user files are never trusted by the manifest so every load runs the AST gate, and _ files and sub-folders are skipped. /api/skill/approve (review-and-approve, Settings > Learning) writes to the user folder (0700 folder, 0600 file, atomic) instead of the repo's built-in folder; the built-in-name refusal and the AST gate are unchanged. Learning's installed check and self-improve's name scan see user skills. The suite points CODEC_USER_SKILLS_DIR at a temp folder and no longer imports the owner's user skills. docs/USER-SKILLS-DIR-DESIGN.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Mickael (7 Oct): "point approve at ~/.codec/skills". On this Mac every skill registry read one folder,
SKILLS_DIR(the repo'sskills/, as config has noskills_dir), so~/.codec/skillswas never loaded and/api/skill/approvewrote approved skills into the live git tree. Design:docs/USER-SKILLS-DIR-DESIGN.md(approved by Mickael, "As designed").codec_config.USER_SKILLS_DIR:CODEC_USER_SKILLS_DIRenv, elseconfig.json:user_skills_dir, else~/.codec/skills.SkillRegistry(skills_dir, user_dir=None): reads the built-ins, then the user folder. A built-in name always wins; a user file is never trusted by the manifest (every load runs the AST gate);_files and sub-folders are skipped. All six registries (dispatch, MCP, voice, agents, autopilot, slash commands) pass the user folder./api/skill/approvewrites to the user folder: 0700 folder, 0600 file, atomic write. Built-in-name refusal and the write-time AST gate unchanged; auditskill_approvedgainsdir: "user".codec_self_improve's existing-name scan include the user folder; page text names~/.codec/skills.CODEC_USER_SKILLS_DIRat a temp folder;tests/test_skills.pyno longer imports the owner's user skills (it used to run their module code on every suite run).No change to the manifest, the built-in folder, the AST gate, the security lists or MCP exposure rules.
Migration (done on the Mac, approved)
The 6 old files in
~/.codec/skills(Mar-Apr 2026, never loaded here; 5 fail the gate,lucy.pypasses) moved to~/.codec/skills/_dormant-2026-10-07/before deploy. Nothing deleted.Checks
tests/test_user_skills_dir.py: 8 passed; negative control on main's code: 8 failed. Empty HOME: passed.--check).Deploy
Restart
codec-dashboardandopen-codec.codec-mcp-http,codec-agent-runnerandcodec-autopilotread the user folder after Mickael restarts them.🤖 Generated with Claude Code