diff --git a/.claude/agents/artifacthub-headlamp.md b/.claude/agents/artifacthub-headlamp.md index 084151e..6e3130d 100644 --- a/.claude/agents/artifacthub-headlamp.md +++ b/.claude/agents/artifacthub-headlamp.md @@ -40,6 +40,7 @@ owners: ``` **How to get the repositoryID:** + 1. Log into artifacthub.io 2. Go to Control Panel → Repositories → Add 3. Select repository kind: "Headlamp plugins" @@ -99,6 +100,7 @@ annotations: # CRITICAL — Headlamp-specific These annotations in `artifacthub-pkg.yml` are what make ArtifactHub treat the package as a Headlamp plugin: ### headlamp/plugin/archive-url + **Required.** Direct download URL to the plugin tarball on GitHub Releases. Format: `https://github.com///releases/download/v/-.tar.gz` @@ -108,6 +110,7 @@ Format: `https://github.com///releases/download/v/` @@ -117,14 +120,17 @@ Generated via: `sha256sum | awk '{print $1}'` Can be empty string if not yet computed (release workflow fills it in). ### headlamp/plugin/version-compat + **Required.** Minimum Headlamp version the plugin works with. Format: `>=X.Y.Z` (e.g., `>=0.20.0`, `>=0.26`) ### headlamp/plugin/distro-compat + **Required.** Comma-separated list of supported Headlamp deployment targets. Valid values: + - `in-cluster` — Headlamp running inside a Kubernetes cluster - `web` — Web-based Headlamp deployment - `app` — Headlamp desktop application (Electron) @@ -138,6 +144,7 @@ Example: `"in-cluster,web,app"` ## ArtifactHub Categories Valid `category` values for Headlamp plugins: + - `security` — Secrets, RBAC, policy enforcement - `storage` — CSI drivers, persistent volumes, Ceph/Rook - `monitoring-logging` — Metrics, GPU monitoring, observability @@ -148,7 +155,9 @@ Valid `category` values for Headlamp plugins: ## Optional Fields ### containersImages + For plugins associated with a specific container/operator: + ```yaml containersImages: - name: @@ -156,14 +165,18 @@ containersImages: ``` ### recommendations + Link to related ArtifactHub packages: + ```yaml recommendations: - url: https://artifacthub.io/packages/helm// ``` ### install + Custom installation instructions (markdown): + ```yaml install: | ## Install via Headlamp Plugin Manager @@ -171,6 +184,7 @@ install: | ``` ### logoPath + Path to a logo image file in the repo (relative to root). --- @@ -179,7 +193,7 @@ Path to a logo image file in the repo (relative to root). This is the actual flow. There is NO other way to publish: -``` +```text 1. Developer triggers release workflow (workflow_dispatch with version) 2. CI runs tests 3. Workflow updates: @@ -196,6 +210,7 @@ This is the actual flow. There is NO other way to publish: ``` **Key points:** + - Steps 1-9 happen in your GitHub Actions workflow - Step 10 is entirely controlled by ArtifactHub — you cannot trigger it - The tarball lives on GitHub Releases, not ArtifactHub @@ -220,7 +235,7 @@ This is the actual flow. There is NO other way to publish: The plugin tarball built by `@kinvolk/headlamp-plugin` contains: -``` +```text / main.js # Bundled plugin code package.json # Plugin metadata @@ -233,6 +248,7 @@ The `` directory inside the tarball matches the `name` field from `pack ## Validating Metadata Before committing, check: + 1. `version` matches across `package.json` and `artifacthub-pkg.yml` 2. `archive-url` version tag matches the `version` field 3. `name` in `artifacthub-pkg.yml` matches `package.json` `name` diff --git a/.claude/agents/headlamp-plugin-developer.md b/.claude/agents/headlamp-plugin-developer.md index 9ab8b4b..df3b6cf 100644 --- a/.claude/agents/headlamp-plugin-developer.md +++ b/.claude/agents/headlamp-plugin-developer.md @@ -99,6 +99,7 @@ class KubeObject { ### ResourceClasses All standard K8s resource types available (Secret, Namespace, Pod, etc.): + ```typescript const [secrets, error, loading] = K8s.ResourceClasses.Secret.useList({ namespace: 'default' }); const [secret, error] = K8s.ResourceClasses.Secret.useGet('my-secret', 'default'); @@ -127,7 +128,8 @@ ApiProxy.apiFactory(group, version, resource): ApiClient ``` **Service proxy URL** (accessing in-cluster services): -``` + +```text /api/v1/namespaces/${ns}/services/http:${name}:${port}/proxy${path} ``` @@ -146,6 +148,7 @@ From `@kinvolk/headlamp-plugin/lib/CommonComponents`: `PercentageBar` — bar chart with `data` array of `{ name, value, fill }` ### SimpleTable (non-obvious props) + ```typescript ('plugin-name'); @@ -177,6 +182,7 @@ store.useConfig(): () => MyConfig; ``` ### Pre-bundled (no package.json entry needed) + react, react-dom, react-router-dom, @iconify/react, react-redux, @material-ui/core, @material-ui/styles, lodash, notistack, recharts, monaco-editor --- @@ -264,6 +270,7 @@ vi.mock('@kinvolk/headlamp-plugin/lib/CommonComponents', () => ({ Headlamp supports light and dark themes. **Never hardcode colors.** Use CSS custom properties with light-mode fallbacks: ### Required CSS variables for inline styles + ```typescript // Text color: 'var(--mui-palette-text-primary)' @@ -289,6 +296,7 @@ color: 'var(--link-color, #1976d2)' ``` ### Common mistakes to avoid + - **NEVER** use raw `#fff`, `#000`, `#333`, `#666` etc. without wrapping in `var(--mui-palette-*)` - **NEVER** use `rgba(0,0,0,0.5)` for overlays without a variable — this is the one exception where raw rgba is acceptable (backdrop overlays) - **NEVER** assume white backgrounds or dark text — always use `background-paper`/`text-primary` @@ -296,6 +304,7 @@ color: 'var(--link-color, #1976d2)' - Fallback values after the comma are for environments where the variable isn't set — always use the light-mode default ### Form inputs in custom components + ```typescript const inputStyle = { border: '1px solid var(--mui-palette-divider, #ccc)', diff --git a/.markdownlint-cli2.jsonc b/.markdownlint-cli2.jsonc new file mode 100644 index 0000000..643038d --- /dev/null +++ b/.markdownlint-cli2.jsonc @@ -0,0 +1,8 @@ +{ + "config": { + // Line length — not enforced for agent skill docs with code examples + "MD013": false, + // First line heading — files use YAML frontmatter, not headings + "MD041": false + } +} diff --git a/CLAUDE.md b/CLAUDE.md index f9d85f5..6ca1b42 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,7 +4,7 @@ This repository is the home for developing and maintaining Claude Code agent ski ## Repository Structure -``` +```text .claude/agents/ # Agent skill definitions (markdown with YAML frontmatter) README.md # Project documentation ```