Skip to content

Ship the agent skills inside the package and add an agent_skills entry point - #57

Open
ronpandolfi wants to merge 3 commits into
lbl-camera:masterfrom
ronpandolfi:skills/package-skills
Open

ronpandolfi wants to merge 3 commits into
lbl-camera:masterfrom
ronpandolfi:skills/package-skills

Conversation

@ronpandolfi

@ronpandolfi ronpandolfi commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Claude Code skills lived in a top-level skills/ folder outside the gpcam package, so wheels and pip install git+... installs didn't include them. This PR:

  • Moves skills/ to gpcam/skills/ (git mv, layout unchanged, including acquisition-functions/references/). An __init__.py with only a docstring makes it a regular package, so importlib.resources.files("gpcam.skills") works from an install. packages = ["gpcam"] picks up the files with no extra include rules.
  • Keeps the Claude Code marketplace working with no second copy and no symlink: .claude-plugin/plugin.json gains "skills": "./gpcam/skills/". Per the plugin manifest reference, this field names directories to scan for skills and adds to the default skills/ scan.
  • Adds a discovery entry point:
    [project.entry-points."agent_skills"]
    gpcam = "gpcam.skills"
    Contract: the entry point loads to a package; each subfolder of importlib.resources.files(pkg) that contains a SKILL.md is one skill. As far as we know there is no established cross-tool group for this, so it sets a convention. Lightfall (the ALS beamline control dashboard) uses it to load these skills into its agents.
  • Updates the old skills/ paths in CLAUDE.md, README.md and docs/source/claude-skills.md (new section "Skills in the Python package"), and adds a HISTORY.rst entry.

Verification

  • Wheel contents (uv build --wheel): gpcam/skills/__init__.py, all 11 gpcam/skills/*/SKILL.md, gpcam/skills/acquisition-functions/references/choosing-an-acquisition-function.md. entry_points.txt reads [agent_skills] gpcam = gpcam.skills.
  • Clean Python 3.12 venv, wheel installed with its dependencies: files("gpcam.skills") / "experiment-designer" / "SKILL.md" exists, entry_points(group="agent_skills") lists gpcam, and all 11 skills plus the references file are found through it.
  • Plugin: claude plugin validate . passes (only the existing no-version and root-CLAUDE.md warnings), and it fails with "Path not found" when the path is deliberately wrong. Loading a copy of the plugin with claude -p --plugin-dir listed all 11 skills.
  • Not tested: the real /plugin marketplace add lbl-camera/gpCAM flow, which needs this merged; the pytest suite (no library code changed); the Sphinx build.

Skill names

Skill names stay bare (kernel-designer, troubleshooting, ...), with no gpcam- prefix. Claude Code already shows them as gpcam:kernel-designer, and a prefix would make that gpcam:gpcam-kernel-designer. A host that merges skills from several packages should namespace them by entry-point name instead; docs/source/claude-skills.md says so.

🤖 Generated with Claude Code

…try point

The skills lived in a top-level skills/ folder outside the gpcam package, so
wheels and pip installs left them out. Move them to gpcam/skills/ (a regular
package, so importlib.resources.files("gpcam.skills") works from an install)
and point the Claude Code plugin at the new folder with plugin.json's
"skills" field; no second copy, no symlink.

Add an agent_skills entry point (gpcam = "gpcam.skills") so agent hosts such
as Lightfall can discover the skills. Contract: the entry point loads to a
package; each subfolder of importlib.resources.files(pkg) that contains a
SKILL.md is one skill.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.60%. Comparing base (a21385a) to head (a164cfb).

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #57   +/-   ##
=======================================
  Coverage   98.60%   98.60%           
=======================================
  Files           8        8           
  Lines        1509     1509           
=======================================
  Hits         1488     1488           
  Misses         21       21           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…are names

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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