-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Claude code plugin #2
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
tolusha
wants to merge
1
commit into
main
Choose a base branch
from
skills
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.
+450
−2
Open
Changes from all commits
Commits
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,20 @@ | ||
| { | ||
| "$schema": "https://anthropic.com/claude-code/marketplace.schema.json", | ||
| "name": "devfile", | ||
| "description": "Claude Code plugins for devfile development", | ||
| "owner": { | ||
| "name": "devfile.io" | ||
| }, | ||
| "plugins": [ | ||
| { | ||
| "name": "devfile", | ||
| "description": "Skills for creating, modifying, and reviewing devfile YAML files (devfile.io v2.3.0)", | ||
| "author": { | ||
| "name": "devfile.io" | ||
| }, | ||
| "source": "./plugins/devfile", | ||
| "category": "productivity", | ||
| "homepage": "https://github.com/devfile/claude-plugin/tree/main/plugins/devfile" | ||
| } | ||
| ] | ||
| } |
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 |
|---|---|---|
| @@ -1,2 +1,31 @@ | ||
| # claude-plugin | ||
| Claude plugin that contains skills related to devfile development | ||
| # devfile | ||
|
|
||
| Claude Code plugin marketplace by [devfile.io](https://devfile.io) for devfile development. | ||
|
|
||
| ## Plugins | ||
|
|
||
| | Plugin | Description | | ||
| |--------|-------------| | ||
| | [devfile](./plugins/devfile) | Skills for creating, modifying, and reviewing devfile YAML files (v2.3.0) | | ||
|
|
||
| ## Installation | ||
|
|
||
| ### 1. Register the marketplace (one-time) | ||
|
|
||
| In Claude Code, run: | ||
|
|
||
| ``` | ||
| /plugin marketplace add | ||
| ``` | ||
|
|
||
| Select "GitHub repository" and enter `devfile/claude-plugin`. | ||
|
|
||
| ### 2. Install plugins | ||
|
|
||
| ``` | ||
| /plugin install devfile@devfile | ||
| ``` | ||
|
|
||
| ## License | ||
|
|
||
| [Apache License 2.0](LICENSE) | ||
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,7 @@ | ||
| { | ||
| "name": "devfile", | ||
| "description": "Skills for creating, modifying, and reviewing devfile YAML files (devfile.io v2.3.0)", | ||
| "author": { | ||
| "name": "devfile.io" | ||
| } | ||
| } |
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,100 @@ | ||
| --- | ||
| name: devfile | ||
| description: Use when creating, modifying, or reviewing devfile/devfile.yaml files or devworkspace configurations (devfile.io v2.3.0) | ||
| --- | ||
|
|
||
| ## Overview | ||
|
|
||
| A devfile is a YAML file defining containerized development environments — components, commands, events, and deployment flows. | ||
| This skill covers the devfile v2.3.0 schema. | ||
|
|
||
| **Schema reference:** Read `devfile-schema-reference.md` when you need exact property names, types, defaults, or constraints. | ||
|
|
||
| **Output format:** Always output the full devfile YAML in a fenced code block. Add a brief explanation only for non-obvious choices. | ||
|
|
||
| ## Default Devfile | ||
|
|
||
| When starting from scratch, use this as the base: | ||
|
|
||
| ```yaml | ||
| schemaVersion: 2.3.0 | ||
| metadata: | ||
| name: devfile | ||
| components: | ||
| - name: tools | ||
| container: | ||
| image: quay.io/devfile/universal-developer-image:latest | ||
| ``` | ||
|
|
||
| ## Language/Framework Requests | ||
|
|
||
| When asked about a devfile for a specific programming language or framework: | ||
|
|
||
| 1. Fetch the registry index via `WebFetch` on `https://registry.devfile.io/index` — returns a JSON array of all stacks with `name`, `language`, `projectType`, `tags`, and `description` fields. | ||
| 2. Pick the best match by language, framework, or tags. | ||
| 3. Fetch the devfile via `WebFetch` on `https://registry.devfile.io/devfiles/{name}` — returns the raw devfile YAML. | ||
| 4. Adapt the devfile to the user's needs (adjust image, add components, set resources). | ||
| 5. Link to `https://registry.devfile.io/devfiles/{name}` as the source. | ||
|
|
||
| If no registry match exists, build the devfile from scratch using the default template and appropriate container image. | ||
|
|
||
| ## Guidelines | ||
|
|
||
| ### Container Component | ||
|
|
||
| - Include `mountSources: true` by default. Omit it only when the container uses `dedicatedPod: true`. | ||
| - For non-UDI images (anything other than `quay.io/devfile/universal-developer-image`), include `command: ['sleep', 'infinity']` to keep the container alive for exec commands. | ||
|
|
||
| ### Volume Component | ||
|
|
||
| When adding a volume mount to a container, always create a matching volume component with the same name and size. | ||
| For ephemeral volumes, add `ephemeral: true`. | ||
|
|
||
| ### Image Component | ||
|
|
||
| When adding an image component, add `buildContext: .`. | ||
|
|
||
| ### Variable Substitution Rules | ||
|
|
||
| **Syntax:** `{{variable-name}}` | ||
|
|
||
| **Cannot substitute in:** | ||
| - `schemaVersion`, `metadata`, `parent` source | ||
| - Element identifiers: `command.id`, `component.name`, `endpoint.name`, `project.name` | ||
| - References to identifiers: event bindings, `exec.component`, `volumeMounts.name` | ||
| - String enums: `group.kind`, `endpoint.exposure` | ||
|
|
||
| **Undefined variables:** Non-blocking warning (devfile still processed). | ||
|
|
||
| ### Reserved Environment Variables | ||
|
|
||
| These cannot be overridden via container `env`: | ||
| - `$PROJECTS_ROOT` — path where project sources are mounted (default `/projects`) | ||
| - `$PROJECT_SOURCE` — path to the default project source (`$PROJECTS_ROOT/<project-name>`) | ||
|
|
||
| ### Pod & Container Overrides | ||
|
|
||
| ```yaml | ||
| # Top-level pod overrides | ||
| attributes: | ||
| pod-overrides: | ||
| spec: | ||
| __KUBERNETES_POD_SPEC_FIELDS_HERE__ | ||
|
|
||
| # Component-level overrides | ||
| components: | ||
| - name: tools | ||
| attributes: | ||
| container-overrides: | ||
| __KUBERNETES_CONTAINER_FIELDS_HERE__ | ||
| pod-overrides: | ||
| spec: | ||
| __KUBERNETES_POD_SPEC_FIELDS_HERE__ | ||
| ``` | ||
|
|
||
| Merge strategy: devfile-level `pod-overrides` are applied first, then component-level, using Strategic Merge Patch. | ||
|
|
||
| | Override Type | Restricted Properties | | ||
| |--------------|----------------------| | ||
| | `container-overrides` | `image`, `name`, `ports`, `env`, `volumeMounts`, `command`, `args` | | ||
| | `pod-overrides` | `containers`, `initContainers`, `volumes` | |
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.
Add fence languages to command examples.
Both fenced blocks are missing a language identifier, which triggers markdownlint MD040.
Suggested patch
@@
-
+bash/plugin install devfile@devfile
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 17-17: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
[warning] 25-25: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Source: Linters/SAST tools