Skip to content

fix(skills): package skills in build#433

Open
squat wants to merge 1 commit into
PrefectHQ:mainfrom
squat:package_skills_in_build
Open

fix(skills): package skills in build#433
squat wants to merge 1 commit into
PrefectHQ:mainfrom
squat:package_skills_in_build

Conversation

@squat
Copy link
Copy Markdown

@squat squat commented Apr 30, 2026

Right now, when you build a wheel/sdist, the skills directory is not
included in the resulting build, making generative.py fail (along with
tests run on the build). This commit adds Hatch instructions to
include the static files in the skills directory in builds and updates
the Python code in generative.py to point at the synthetic location in
the package.

This issue surfaced in NixOS/nixpkgs while trying to package the project
and finding that without adding Hatch instructions, builds and tests
would fail: NixOS/nixpkgs#510123.

Signed-off-by: squat lserven@gmail.com

@marvin-context-protocol marvin-context-protocol Bot added bug Something isn't working. Reports of errors, unexpected behavior, or broken functionality. python Related to the Python SDK: components, actions, serialization. labels Apr 30, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b0fe993198

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

MIME_TYPE = "text/html;profile=mcp-app"

_SKILLS_DIR = Path(__file__).parent.parent.parent / "skills"
_SKILLS_DIR = Path(__file__).parent / "skills"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep a source-tree fallback for skills directory

Resolve _SKILLS_DIR from both install layouts, because this hardcoded path only works after packaging. In a normal source checkout (and many editable/dev runs), the repository has skills/ at the project root but no src/prefab_ui/skills, so list_guides() returns an empty list and get_guide("prefab-ui") raises ValueError. This regresses local development and repo test runs that rely on guides being discoverable.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Right now, when you build a wheel/sdist, the skills directory is not
included in the resulting build, making generative.py fail (along with
tests run on the build). This commit adds Hatch instructions to
include the static files in the skills directory in builds and updates
the Python code in generative.py to point at the synthetic location in
the package.

This issue surfaced in NixOS/nixpkgs while trying to package the project
and finding that without adding Hatch instructions, builds and tests
would fail: NixOS/nixpkgs#510123.

Signed-off-by: squat <lserven@gmail.com>
@squat squat force-pushed the package_skills_in_build branch from b0fe993 to 5860b2f Compare April 30, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working. Reports of errors, unexpected behavior, or broken functionality. python Related to the Python SDK: components, actions, serialization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant