fix(cli): improve skills validation#170
Conversation
- Added a well-known endpoint for installing the `elements` skill via skills CLI - Implemented validation for skill names and descriptions to ensure compliance with defined standards. - Updated the `elements` skill metadata to include a title and license in the generated markdown. - Refactored skill markdown formatting to ensure proper structure and compliance with new requirements. - Introduced tests for validating skill entries and ensuring correct markdown formatting. - Removed deprecated markdown utility functions and updated imports accordingly. This update improves the usability and reliability of the Agent Skills feature in the CLI. Signed-off-by: Cory Rylan <crylan@nvidia.com>
📝 WalkthroughWalkthroughThis PR adds a new ChangesAgent Skills Artifacts and Site Publishing
Estimated code review effort: 3 (Moderate) | ~30 minutes Sequence Diagram(s)sequenceDiagram
participant Eleventy as Eleventy Build
participant Plugin as agentSkillsPlugin
participant Utils as writeAgentSkillArtifacts
participant FS as Filesystem
Eleventy->>Plugin: eleventy.before hook
Plugin->>Plugin: filter registry to "elements" skill
Plugin->>Utils: writeAgentSkillArtifacts(publicOutputPath, [elements])
Utils->>Utils: createAgentSkillArtifacts (validate, sort, sha256 digest)
Utils->>FS: remove existing .well-known/agent-skills dir
Utils->>FS: write SKILL.md per skill
Utils->>FS: write index.json
FS-->>Utils: write complete
Utils-->>Plugin: return AgentSkillArtifacts
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
projects/internals/tools/src/skills/index.test.tsParsing error: error TS5012: Cannot read file '/tsconfig.json': ENOENT: no such file or directory, open '/tsconfig.json'. projects/internals/tools/src/skills/service.test.tsParsing error: error TS5012: Cannot read file '/tsconfig.json': ENOENT: no such file or directory, open '/tsconfig.json'. projects/internals/tools/src/skills/utils.test.tsParsing error: error TS5012: Cannot read file '/tsconfig.json': ENOENT: no such file or directory, open '/tsconfig.json'.
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@projects/cli/README.md`:
- Around line 166-172: The install example in the README points `npx skills add`
at the hosted `elements` URL, but that CLI resolves the
`/.well-known/skills/index.json` discovery path while this site publishes
`/.well-known/agent-skills/index.json`. Update the example in the README to use
the correct `skills`-compatible endpoint or add a `/.well-known/skills` alias so
`npx skills add` can discover the `elements` skill from the hosted registry.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: f89cf562-79e3-4a36-9472-1da88361ed99
📒 Files selected for processing (17)
projects/cli/README.mdprojects/internals/tools/src/skills/index.test.tsprojects/internals/tools/src/skills/index.tsprojects/internals/tools/src/skills/markdown.tsprojects/internals/tools/src/skills/registry.tsprojects/internals/tools/src/skills/service.test.tsprojects/internals/tools/src/skills/service.tsprojects/internals/tools/src/skills/utils.test.tsprojects/internals/tools/src/skills/utils.tsprojects/site/eleventy.config.jsprojects/site/package.jsonprojects/site/src/_11ty/plugins/agent-skills.jsprojects/site/src/_11ty/plugins/agent-skills.test.tsprojects/site/src/_11ty/plugins/llms-txt.jsprojects/site/src/_11ty/plugins/llms-txt.test.tsprojects/site/src/_11ty/utils/public-output.jsprojects/site/src/docs/skills/index.md
💤 Files with no reviewable changes (1)
- projects/internals/tools/src/skills/markdown.ts
|
🎉 This issue has been resolved in version 2.1.4 🎉 |
elementsskill via skills CLIelementsskill metadata to include a title and license in the generated markdown.Summary by CodeRabbit
New Features
elementsskill through the site build, with a standardized skill artifact format.Bug Fixes
Documentation