-
Notifications
You must be signed in to change notification settings - Fork 1
Feat: Add cloudinary-upload skill #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
njb90
wants to merge
5
commits into
main
Choose a base branch
from
feat/catalog-restructure
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
8eab812
Move skills into category directories
njb90 6249033
Add skills discovery check
njb90 bbb8972
Document catalog layout and authoring conventions
njb90 4ba491f
Disable colour in discovery check output
njb90 809ce37
Add cloudinary-upload skill
njb90 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| name: Skills discovery | ||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [main] | ||
| jobs: | ||
| discovery: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
| - name: Every SKILL.md is discovered by the skills CLI | ||
| env: | ||
| INSTALL_INTERNAL_SKILLS: "1" | ||
| NO_COLOR: "1" | ||
| run: | | ||
| expected=$(find skills -name SKILL.md | wc -l | tr -d ' ') | ||
| output=$(npx -y skills@latest add . --list 2>&1 || true) | ||
| # Strip ANSI escapes: the CLI colours its output whenever CI is set. | ||
| plain=$(printf '%s' "$output" | sed -E 's/\x1b\[[0-9;?]*[a-zA-Z]//g') | ||
| found=$(printf '%s' "$plain" | grep -oE 'Found [0-9]+ skills?' | grep -oE '[0-9]+' || echo 0) | ||
| echo "expected=$expected found=$found" | ||
| if [ "$found" != "$expected" ]; then | ||
| echo "::error::Discovery mismatch. A SKILL.md is being dropped (bad frontmatter, wrong depth, or missing name/description)." | ||
| printf '%s\n' "$output" | ||
| exit 1 | ||
| fi | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| specs/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| # Contributing | ||
|
|
||
| Rules for adding or changing skills in this repo. The `skills` CLI is unforgiving | ||
| about layout and frontmatter: a skill that breaks these rules is dropped from | ||
| discovery with no warning, so read this before opening a PR. | ||
|
|
||
| ## Layout | ||
|
|
||
| Every skill lives at `skills/<category>/<name>/SKILL.md`, exactly two directories | ||
| deep. The CLI does not look any deeper, so a skill nested at depth three is | ||
| invisible to users. | ||
|
|
||
| Categories: | ||
|
|
||
| - `platform` — reference skills for a Cloudinary capability (uploads, | ||
| transformations, docs lookup) | ||
| - `frameworks` — patterns for using Cloudinary in a specific framework or SDK | ||
| - `use-cases` — end-to-end recipes that combine several capabilities | ||
| - `utilities` — tools that do a job using Cloudinary | ||
|
|
||
| Category directories are created with their first skill. Do not add a README or | ||
| placeholder to an empty category. | ||
|
|
||
| Users install skills by name, not by path, so the category is invisible to them. | ||
| Moving a skill between categories does not affect existing installs. | ||
|
|
||
| ## Frontmatter | ||
|
|
||
| ```yaml | ||
| --- | ||
| name: cloudinary-example | ||
| description: "Reference for <capability>. Use when <trigger phrases>." | ||
| license: MIT | ||
| metadata: | ||
| author: cloudinary | ||
| version: '1.0.0' | ||
| --- | ||
| ``` | ||
|
|
||
| - `name` must equal the directory name. | ||
| - `name` and `description` must both be strings. If either is missing, or the | ||
| frontmatter fails to parse, the skill silently vanishes from discovery. | ||
| - A description containing a colon must be quoted. Unquoted, YAML reads the colon | ||
| as a nested key, the description is no longer a string, and the skill vanishes. | ||
| - Include `license`, `metadata.author`, and `metadata.version` (semver). | ||
| - Set `metadata.internal: true` on a work-in-progress skill that should not appear | ||
| in the default install. Users can reveal it with `INSTALL_INTERNAL_SKILLS=1`. | ||
|
|
||
| ## Description shapes | ||
|
|
||
| Agents see the catalog as a flat list of names and descriptions, so every | ||
| description does two jobs. It opens with a clause that self-locates the skill in | ||
| that list, then follows with a "Use when..." sentence that carries the trigger | ||
| phrases. | ||
|
|
||
| | Category | Opening shape | | ||
| |---|---| | ||
| | Platform | `Reference for <capability>.` | | ||
| | Frameworks | `Patterns for using Cloudinary in <framework>.` | | ||
| | Use-case | `End-to-end recipe for <outcome>.` | | ||
| | Utility | `Tool that <does X> using Cloudinary.` | | ||
|
|
||
| Rules: | ||
|
|
||
| - The opening clause never contains a colon before its first period unless the | ||
| whole description is quoted. | ||
| - Trigger phrases live in the "Use when" sentence, not in the opening clause. | ||
|
|
||
| Existing skills predate these shapes and are not yet retrofitted. New skills must | ||
| follow them. | ||
|
|
||
| ## Referencing other skills | ||
|
|
||
| Refer to another skill by its name only, for example "use cloudinary-docs for | ||
| anything outside this skill's scope". Never reference another skill by file path. | ||
| Installed paths differ per agent and per install scope, so a path that works on | ||
| your machine will be wrong on someone else's. | ||
|
|
||
| ## Versioning | ||
|
|
||
| Bump `metadata.version` on any content change to a skill, including its | ||
| references and assets. Moving or renaming files with identical content does not | ||
| bump the version; the lock-file hash is unchanged and `skills update` correctly | ||
| reports nothing to do. | ||
|
|
||
| ## Local check | ||
|
|
||
| Before opening a PR, run the same check CI runs: | ||
|
|
||
| ```bash | ||
| INSTALL_INTERNAL_SKILLS=1 npx -y skills@latest add . --list | ||
| ``` | ||
|
|
||
| The `Found N skills` line must match the number of `SKILL.md` files under | ||
| `skills/`, and every skill name must appear in the list. A mismatch means a skill | ||
| is being dropped: check for bad frontmatter, an unquoted colon in the | ||
| description, a missing `name` or `description`, or a directory nested at the wrong | ||
| depth. CI (`.github/workflows/skills-discovery.yml`) fails the PR on the same | ||
| mismatch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're adding tests to the skills, worth also adding a test that all URLs to llms.txt or md files include the install-source & referrer params + another test that validates that every new PR includes updated version values for any skill that changes.