feat: add project-level skill support in skill_domains#4
feat: add project-level skill support in skill_domains#4cuioss-oliver wants to merge 4 commits intomainfrom
Conversation
Allow project-level skills from .claude/skills/ to be discovered and
attached to any configured domain in marshal.json using project:{skill}
notation. This bridges the gap where only marketplace bundle skills were
represented in skill_domains.
Changes:
- Add discover-project and attach-project verbs to skill-domains
- Extend configure to preserve project_skills across reconfiguration
- Extend get/resolve to include project_skills in output
- Add project: notation support in get_skill_description()
- Add Step 11f to marshall-steward wizard for project skill discovery
- Rename executor internal local: prefix to default-bundle:
- Add comprehensive tests (322 new lines)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary of ChangesHello @cuioss-oliver, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the skill management system by introducing native support for project-level skills. It provides a streamlined way for users to define, discover, and integrate custom skills directly within their projects, making the system more flexible and extensible. The changes include new command-line interface capabilities, improved configuration persistence, and clearer internal naming conventions, all aimed at improving the developer experience when working with skills. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request introduces support for project-level skills, a significant feature enhancement. The changes include a new project:{skill} notation, commands to discover and attach these skills to domains, and updates to preserve this configuration during domain reconfiguration. The implementation is solid, with good separation of concerns and comprehensive new tests. I've identified a couple of areas for improvement: one to make a new test case more robust and clear, and another to improve the robustness of a custom YAML parser while adhering to the 'stdlib-only' constraint. Overall, this is a great contribution that extends the system's flexibility.
| if line.startswith('description:'): | ||
| desc = line[12:].strip() | ||
| # Remove quotes if present | ||
| if (desc.startswith('"') and desc.endswith('"')) or (desc.startswith("'") and desc.endswith("'")): | ||
| desc = desc[1:-1] | ||
| return desc |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Good suggestion. Applied the more robust parsing using lstrip() and split(':', 1) instead of the fragile positional slice. Fixed in 7213c9f.
| def test_discover_project_empty_when_no_skills(): | ||
| """Test discover-project returns empty when no .claude/skills/ exists.""" | ||
| with PlanContext() as ctx: | ||
| create_nested_marshal_json(ctx.fixture_dir) | ||
|
|
||
| # Ensure no project skills directory | ||
| # (test runs in project root which has .claude/skills/, so we test count > 0 instead) | ||
| result = run_script(SCRIPT_PATH, 'skill-domains', 'discover-project') | ||
|
|
||
| assert result.success, f'Should succeed: {result.stderr}' | ||
| # Should have count field | ||
| assert 'count' in result.stdout |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Improved the test: renamed to test_discover_project_returns_structured_output, clarified the docstring and comments, and now asserts TOON-format fields (status: success and count:). Note: JSON parsing isn't applicable here as the output uses TOON format. Also, since the test runs from the project root which contains real .claude/skills/ entries, asserting count==0 would fail. Fixed in 7213c9f.
… clarity
- Use lstrip() + split(':', 1) for more robust YAML frontmatter parsing
- Improve test name and assertions for discover-project structured output
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…fidelity The TOON serializer wrote string values like "012345" unquoted, causing the parser to coerce them to int (12345), losing leading zeros. This made tests with random hex hash_ids flaky (~0.6% chance per hash of all-digit with leading zero). Fix quotes strings that _parse_value would misinterpret as numbers, booleans, null, or percentages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
project:{skill}notation for referencing project-level skills (from.claude/skills/) inskill_domainswithinmarshal.jsondiscover-projectandattach-projectverbs to theskill-domainsnoun for discovering and attaching project skills to any configured domainskill-domains configureto preserveproject_skillsacross domain reconfigurationget,resolve-domain-skills,get-skills-by-profile) to includeproject_skillsin outputlocal:prefix todefault-bundle:to avoid confusion with user-facingproject:notationTest plan
./pw verify plan-marshall)discover-projectverb discovering skills from.claude/skills/attach-projectverb (valid domain, system domain, invalid notation, unknown domain, deduplication)configurepreservingproject_skillsand dropping for removed domainsgetincludingproject_skillsin domain output🤖 Generated with Claude Code