Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://json.schemastore.org/claude-code-marketplace.json",
"name": "cloudfoundry-skills",
"description": "Cloud Foundry skills for AI coding agents.",
"owner": {
"name": "Cloud Foundry Community",
"url": "https://www.cloudfoundry.org/"
},
"plugins": [
{
"name": "cf-kind-verify",
"source": "./skills/cf-kind-verify",
"description": "Verify Cloud Foundry component changes on a local cf-on-kind cluster."
}
]
}
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches:
- main
- v[0-9]*

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.1

- name: Install shellcheck
run: sudo apt-get update && sudo apt-get install -y shellcheck

- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: 24

- name: Install Claude Code CLI
run: npm install -g @anthropic-ai/claude-code

- name: Install uv
uses: astral-sh/setup-uv@v10.1.0
with:
enable-cache: true
cache-dependency-glob: uv.lock

- name: Run checks
run: make check
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Eval run outputs — regenerated, not part of the published skill
cf-kind-verify-workspace/
13 changes: 13 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Code of Conduct

The Cloud Foundry Agentic Runtime Working Group, like all Cloud Foundry community spaces,
operates under the **Cloud Foundry Foundation Code of Conduct**.

Please read it here: https://www.cloudfoundry.org/code-of-conduct/

By participating in this repository — through issues, pull requests, reviews, or any other
interaction — you agree to abide by its terms.

To report a concern, follow the reporting instructions in the linked Code of Conduct, or
reach a working-group lead in [#wg-ai](https://cloudfoundry.slack.com/archives/C0B214KJ1HA)
on the Cloud Foundry Slack.
56 changes: 56 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
## Contributing

Contributions are welcome. This is a collection of portable Cloud Foundry Agent
Skills.

For Cloud Foundry Foundation repositories, contributors must sign the
[Contributor License Agreement](https://corporate.v1.easycla.lfx.linuxfoundation.org/).
EasyCLA prompts you when you open your first pull request.

### Dev setup

```bash
git clone https://github.com/cloudfoundry/skills
cd skills
mkdir -p ~/.config/opencode/skills
ln -s "$(pwd)/skills/<skill-name>" ~/.config/opencode/skills/<skill-name>
```

This symlink is the recommended edit-test workflow: changes to a skill are
available in new OpenCode sessions without reinstalling it. `gh skill install
--from-local` copies files rather than creating a symlink, so use it only to
test the installation flow. Remove a copied installation before creating the
symlink:

```bash
rm -rf ~/.config/opencode/skills/<skill-name>
```

### Checks

Run before opening a PR — CI runs the same target:

```bash
make check # Claude marketplace + shellcheck + JSON validation
```

### Making changes

- Each skill lives in `skills/<skill-name>/`; keep scripts and references with its `SKILL.md`.
- Keep `SKILL.md` portable. Put harness-specific packaging or configuration under the skill's `docs/<harness>/` directory.

### Commits and PRs

- Fork the repository, create a branch, and open a pull request from that branch.
- Small, focused PRs.
### Getting help

- Report bugs or propose skills with an issue in this repository.
- Ask usage questions in [#wg-ai](https://cloudfoundry.slack.com/archives/C0B214KJ1HA) channel within Cloud Foundry Slack.
- Discuss broader agent-workload design with the [Agentic Runtime working group](https://github.com/cloudfoundry/community/blob/main/toc/working-groups/WORKING-GROUPS.md#agentic-runtime).

### Code of conduct

This project follows the [Cloud Foundry Code of Conduct](./CODE_OF_CONDUCT.md).

Licensed under Apache-2.0.
58 changes: 58 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Cloud Foundry Skills — CI / local checks
#
# Run `make` (or `make check`) to run everything CI runs.
# Individual targets are useful while iterating locally.

SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
.DEFAULT_GOAL := check

# All shipped scripts and JSON files in the working tree, including untracked
# files introduced by a change under review.
SCRIPTS := $(shell git ls-files -co --exclude-standard -- '*.sh' | while IFS= read -r f; do [ -f "$$f" ] && printf '%s ' "$$f"; done)
JSON := $(shell git ls-files -co --exclude-standard -- '*.json' | while IFS= read -r f; do [ -f "$$f" ] && printf '%s ' "$$f"; done)
PY := $(shell git ls-files -co --exclude-standard -- '*.py' | while IFS= read -r f; do [ -f "$$f" ] && printf '%s ' "$$f"; done)

.PHONY: check validate shellcheck json ruff ty help

## check: run all CI checks (default)
check: validate shellcheck json ruff ty
@echo "All checks passed."

## validate: validate the Claude marketplace and each skill plugin (strict — warnings fail)
validate:
@echo ">> claude plugin validate --strict marketplace"
claude plugin validate --strict .
@echo ">> claude plugin validate --strict skills/cf-kind-verify"
claude plugin validate --strict skills/cf-kind-verify

## shellcheck: lint every tracked shell script (all severities must pass)
shellcheck:
@echo ">> shellcheck ($(words $(SCRIPTS)) scripts)"
@if command -v shellcheck >/dev/null 2>&1; then \
shellcheck $(SCRIPTS); \
else \
echo "shellcheck not installed" >&2; \
exit 1; \
fi

## json: check every tracked JSON file parses
json:
@echo ">> jq parse ($(words $(JSON)) files)"
@for f in $(JSON); do \
jq empty "$$f" || { echo "invalid JSON: $$f" >&2; exit 1; }; \
done

## ruff: lint Python helper scripts
ruff:
@echo ">> ruff ($(words $(PY)) files)"
@if [ -n "$(strip $(PY))" ]; then uv run --group dev ruff check $(PY); else echo "(no python files)"; fi

## ty: type-check Python helper scripts
ty:
@echo ">> ty ($(words $(PY)) files)"
@if [ -n "$(strip $(PY))" ]; then uv run --group dev ty check $(PY); else echo "(no python files)"; fi

## help: list targets
help:
@grep -E '^## ' $(MAKEFILE_LIST) | sed 's/^## / /'
70 changes: 70 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Cloud Foundry Skills

A collection of portable [Agent Skills](https://agentskills.io/) for AI coding
agents that work with Cloud Foundry.

## Available skills

| Skill | Description |
| --- | --- |
| [`cf-kind-verify`](./skills/cf-kind-verify/) | Verify CF component changes on a local cf-on-kind cluster. |

## Install

### GitHub CLI

Install with [GitHub CLI v2.90.0 or later](https://github.blog/changelog/2026-04-16-manage-agent-skills-with-github-cli/).
Use `--scope project` to install it in the current repository.

```bash
gh skill install cloudfoundry/skills <skill-name> \
--agent opencode --scope user
```

Supported `--agent` values include `opencode`, `claude-code`, `github-copilot`,
`cursor`, `codex`, `gemini-cli`, and `cline`. Compatible harnesses use the
portable `.agents/skills/` project path.

### Agent Skills CLI

Install with [Open Agent Skills](https://www.skills.sh/) installer:

```bash
npx skills add cloudfoundry/skills --skill <skill-name>
```

### Claude Code marketplace

The repository also exposes a Claude Code marketplace adapter:

```
/plugin marketplace add cloudfoundry/skills
/plugin install <skill-name>@cloudfoundry-skills
```

### Manual fallback

You can also manually clone to install them in a harness e.g. due to
lacking `gh skill` support.

Copy or symlink a `skills/<skill-name>` directory into a
directory the harness discovers. Common user-level locations are:

| Harness | Location |
| --- | --- |
| OpenCode | `~/.agents/skills/` or `~/.config/opencode/skills/` |
| Claude Code | `~/.claude/skills/` |
| GitHub Copilot | `~/.agents/skills/` or `~/.copilot/skills/` |
| Cursor | `~/.agents/skills/` or `~/.cursor/skills/` |

For example, OpenCode reads the shared Agent Skills location:

```bash
git clone https://github.com/cloudfoundry/skills
ln -s "$(pwd)/skills/skills/<skill-name>" \
~/.agents/skills/<skill-name>
```

## Contributing

See [`CONTRIBUTING.md`](./CONTRIBUTING.md).
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[project]
name = "cloudfoundry-skills"
version = "0.0.0"
requires-python = ">=3.11"

[dependency-groups]
dev = [
"ruff==0.16.7",
"ty==0.0.80",
]
19 changes: 19 additions & 0 deletions skills/cf-kind-verify/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "cf-kind-verify",
"displayName": "cf-kind-verify",
"description": "Verify Cloud Foundry component changes on a local cf-on-kind cluster.",
"version": "0.1.0",
"author": {
"name": "Cloud Foundry Community"
},
"repository": "https://github.com/cloudfoundry/skills",
"license": "Apache-2.0",
"keywords": [
"cloud-foundry",
"cf-on-kind",
"kind",
"kubernetes",
"verification",
"testing"
]
}
56 changes: 56 additions & 0 deletions skills/cf-kind-verify/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# cf-kind-verify

Verify a Cloud Foundry component change on a local
[cf-on-kind](https://github.com/cloudfoundry/kind-deployment) cluster:
build, load, redeploy, roll out, and test.

- **Build:** create the changed component image with `docker buildx bake`.
- **Load:** import that local image into the kind cluster.
- **Redeploy:** find the running Deployment and container, then point it at the new image.
- **Rollout:** wait for Kubernetes to replace the old Pods and report the Deployment ready.
- **Test:** run the component's relevant test command against the updated cluster.

## What it does

Given a change in a CF release repo, the skill follows this sequence:

1. Check prerequisites with `prereqs.sh`.
2. **Agent:** offer and, when approved, manage cluster lifecycle with `lifecycle.sh`.
3. For Helm-chart changes, render the chart before mutating the cluster with `render-check.sh`.
4. **Agent:** select and explain the changed image, then build, load, redeploy, and roll out with `redeploy.sh` (which invokes `discover-target.sh` to find the Deployment, container, and namespace).
5. Verify containers and report the rollout with `verify-status.sh`.
6. **Agent:** select, explain, and run focused CATS with `cats.sh` when appropriate.

## Claude Code permissions

The skill works without additional configuration, though Claude Code prompts for
the docker/kind/kubectl steps. To reduce those prompts, merge
[`docs/claude-code/settings.json`](./docs/claude-code/settings.json)
into your project `.claude/settings.json`, then restart the session.

See [`docs/claude-code/permissions.md`](./docs/claude-code/permissions.md)
for what to edit, how the config works, and the security trade-offs of running
these commands unsandboxed.

## Scripts

| Script | Purpose |
| --- | --- |
| `prereqs.sh` | Tools + `cfk8s` cluster + kube-context ready? |
| `lifecycle.sh` | `up` / `down` / `status` |
| `redeploy.sh` | Build → load → redeploy (discover + set image) → rollout → status |
| `discover-target.sh` | Map an image to its `(deployment, container, namespace)` |
| `cats.sh` | Render the kind-deployment CATS configuration and run focused CATS tests |
| `verify-status.sh` | Per-container ready/restarts/image for a deployment |
| `render-check.sh` | `helm template … \| grep` render validation |

## Scope

**v1:** CF component verification + cluster up/down. **Deferred (v2):** first-class
`cf push` app testing, discovery cache, prereq auto-install. App-level CATS notes:
[`references/test-conventions.md`](./references/test-conventions.md).

## References

- [cf-on-kind local development guide](https://github.com/cloudfoundry/kind-deployment/blob/main/docs/local-development-guide.md)
- [`references/test-conventions.md`](./references/test-conventions.md) — CATS focus gotcha, helm SSA conflict, config-contract sources.
Loading