Skip to content

[IMP] skills: install PS skills from git, not npx - #35

Open
kfr-odoo wants to merge 1 commit into
odoo-odev:betafrom
kfr-odoo:imp/skills-from-git
Open

[IMP] skills: install PS skills from git, not npx#35
kfr-odoo wants to merge 1 commit into
odoo-odev:betafrom
kfr-odoo:imp/skills-from-git

Conversation

@kfr-odoo

@kfr-odoo kfr-odoo commented Aug 7, 2026

Copy link
Copy Markdown

Description

odev never actually installed the PS skills. run_ai_agent() only ran npx skills list -g --json and, when odev
or test_skill was missing from the output, printed an npx -y skills add … command for the user to run by hand. A
fresh setup therefore ran without a single skill, an existing installation was never updated, and both paths depended
on a package fetched from the npm registry before every agent start.

This replaces npx with git:

  • the repository is cloned once into ~/odev/skills through odev's own GitConnector, then pulled every 7 days
    (skills.interval, skills.date);
  • every skill it contains is symlinked into the global skills directory of each supported agent — ~/.claude/skills,
    ~/.gemini/antigravity-cli/skills (agy), ~/.copilot/skills, ~/.config/opencode/skills, plus
    ~/.gemini/antigravity/skills for the Antigravity IDE;
  • agents that are not installed are skipped, which is the same check the skills npm CLI performs before installing
    anything for them;
  • links are named after the name: declared in SKILL.md: that is how agents identify a skill, and it does not
    always match the directory name (a mismatch used to install the same skill twice under two names);
  • the clone is bound into the sandbox, otherwise the symlinks resolve to nothing inside the bwrap mount namespace;
  • .config/opencode was added to the OpenCode handler config and persistent directories, without which its skills
    directory is not visible from inside the sandbox.

Skills can be skipped with odev config skills.disabled <names>, by declared name or by directory name.

Impact on existing installations

An installation made with npx skills add odoo-ps/ps-ai-skills keeps working, with one change: the symlinks it created
in the agents' directories for skills coming from that same repository are removed, otherwise they shadow the
git-managed ones under the same name and stay frozen at the version installed back then. Only symlinks are removed —
the copies under ~/.agents/skills, and anything npm wrote in place of a link, are kept and reported so the user
decides what to do with them. Skills coming from another repository or managed by the user are never touched, and a
directory or a symlink we do not own is never overwritten.

Failures are logged and swallowed: no network, no SSH key, or no access to the skills repository must never prevent an
agent from starting.

Compliance

  • I made sure the documentation is up-to-date both in doctrings and the docs directory
  • I have added or modified unit tests where necessary — this plugin has no test suite; python3 common/skills.py runs an assert-based self-check of the linking and migration logic on a temporary tree
  • I have added new libraries to the requirements.txt file, if any — none, the standard library is enough
  • The PR contains my changes only and no other external commit

Co-Authored-By: Claude Opus 5

Skills were never actually installed: odev only ran 'npx skills list -g'
and printed a command for the user to run by hand. A fresh setup ran
without any skill, an existing installation was never updated, and both
depended on a package pulled from npm at every check.

Clone odoo-ps/ps-ai-skills in the odev home directory instead, pull it
once a week, and symlink every skill into the global skills directory
of each supported agent. Nothing is downloaded from npm anymore.

* Link into '.gemini/antigravity-cli/skills', the directory the 'agy'
  CLI reads, and into '.config/opencode/skills' for OpenCode.
* Skip the agents the user does not have, the way 'npx skills' does:
  their configuration directory tells whether they are installed.
* Name the links after the 'name:' declared in SKILL.md rather than
  after the directory, as agents do: a skill whose declared name
  differs from its directory would otherwise show up twice.
* Unlink the skills a previous 'npx skills add' installed from this
  same repository. They shadow ours under the same name and would stay
  frozen at the version installed back then. Only symlinks are removed,
  so the copies under '~/.agents/skills' and the ones npm wrote in
  place of a link are kept, and skills from another source or managed
  by the user are never touched.
* Never overwrite a directory or a symlink we do not own, and remove
  our own links once a skill disappears or is disabled.
* Bind the clone into the sandbox, otherwise the symlinks resolve to
  nothing inside the bwrap mount namespace.

Failures are logged and swallowed: a missing network or SSH key must
never prevent an agent from starting. Configuration goes through
'skills.disabled' and 'skills.interval'.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@kfr-odoo
kfr-odoo force-pushed the imp/skills-from-git branch from dd4ed37 to 26a3b73 Compare August 7, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant