Kelos Skill
Use this skill when you need to author, debug, or operate Kelos resources
(Task, Workspace, AgentConfig, TaskSpawner) on a Kubernetes cluster.
Installing Kelos
Install the controller and CRDs into a Kubernetes cluster:
kelos install
Uninstall:
kelos uninstall
Initialize a local config file at ~/.kelos/config.yaml:
kelos init
Core Resources
Kelos defines four custom resources:
| Resource |
Purpose |
| Task |
A single agent run — prompt, credentials, optional workspace and config |
| Workspace |
A git repository to clone for the agent |
| AgentConfig |
Reusable instructions, skills, agents, MCP servers |
| TaskSpawner |
Automatically creates Tasks from GitHub issues, Jira tickets, or cron |
Task
A Task runs an AI agent with a prompt. Key fields:
spec.type (required): claude-code, codex, gemini, opencode, or cursor
spec.prompt (required): The task prompt
spec.credentials (required): type (api-key or oauth) and secretRef.name
spec.workspaceRef.name: Reference to a Workspace
spec.agentConfigRef.name: Reference to an AgentConfig
spec.branch: Git branch mutex — only one Task with the same branch runs at a time
spec.dependsOn: Task names that must succeed first
spec.ttlSecondsAfterFinished: Auto-delete after completion (seconds)
spec.model: Model override
spec.podOverrides: Resource limits, timeout, env vars, node selector
Task status phases: Pending -> Running -> Succeeded or Failed.
Tasks with unmet dependencies enter Waiting.
Workspace
A Workspace defines a git repository for the agent:
spec.repo (required): Git URL (HTTPS, git://, or SSH)
spec.ref: Branch, tag, or commit to checkout
spec.secretRef.name: Secret with GITHUB_TOKEN (PAT) or GitHub App credentials (appID, installationID, privateKey)
spec.remotes: Additional git remotes (name must not be origin)
spec.files: Files to inject into the repo before the agent starts (e.g., CLAUDE.md, skills)
AgentConfig
An AgentConfig injects reusable instructions and tools into Tasks:
spec.agentsMD: Instructions written to the agent's config (e.g., ~/.claude/CLAUDE.md). Additive — does not overwrite repo files
spec.plugins: Plugin bundles with skills and sub-agents
plugins[].name: Plugin name (directory namespace)
plugins[].skills[].name / .content: Skill definitions (become SKILL.md)
plugins[].agents[].name / .content: Agent definitions (become <name>.md)
spec.skills: skills.sh ecosystem packages
skills[].source: Package in owner/repo format
skills[].skill: Optional specific skill name
spec.mcpServers: MCP server configurations
- Supports
stdio, http, and sse transport types
- Use
headersFrom / envFrom with a secretRef for sensitive values
TaskSpawner
A TaskSpawner auto-creates Tasks from external sources:
spec.when.githubIssues: Discover from GitHub issues (labels, state, assignee, author, commentPolicy, priority labels)
spec.when.githubPullRequests: Discover from GitHub PRs (labels, state, reviewState, author, draft, commentPolicy, priority labels)
spec.when.cron: Trigger on a cron schedule
spec.when.jira: Discover from Jira (project, JQL filter, secret with JIRA_TOKEN)
spec.when.githubIssues.commentPolicy / spec.when.githubPullRequests.commentPolicy: Comment-based workflow control with authorization
triggerComment: Command that must appear for the item to be included (e.g., "/kelos pick-up")
excludeComments: Commands that exclude items; when combined with triggerComment, the most recent authorized command wins
allowedUsers: Restrict comment control to specific GitHub usernames
allowedTeams: Restrict to GitHub teams in org/team-slug format
minimumPermission: Require at least this repo permission (read, triage, write, maintain, admin)
spec.taskTemplate: Template for spawned Tasks (same fields as Task spec)
promptTemplate and branch support Go text/template variables: {{.ID}}, {{.Number}}, {{.Title}}, {{.Body}}, {{.URL}}, {{.Labels}}, {{.Comments}}, {{.Kind}}, {{.Time}}, {{.Schedule}}
spec.pollInterval: Polling frequency (default 5m)
spec.maxConcurrency: Limit concurrent running Tasks
spec.maxTotalTasks: Lifetime task creation limit
spec.suspend: Pause/resume without deleting
CLI Quick Reference
Running Tasks
# Simple task
kelos run -p "Fix the login bug" --type claude-code
# With workspace and agent config
kelos run -p "Add tests" --workspace my-ws --agent-config my-ac
# With model override and branch
kelos run -p "Refactor auth" --model opus --branch feature/auth
# Watch task progress
kelos run -p "Fix bug" -w
Creating Resources
# Create a workspace
kelos create workspace my-ws \
--repo https://github.com/org/repo.git \
--ref main \
--secret github-token
# Create an agent config with inline skill
kelos create agentconfig my-ac \
--skill review="Review the PR for correctness and security" \
--agents-md @instructions.md
# Create an agent config with skills.sh package
kelos create agentconfig my-ac \
--skills-sh anthropics/skills:skill-creator
# Create an agent config with MCP server
kelos create agentconfig my-ac \
--mcp github='{"type":"http","url":"https://api.githubcopilot.com/mcp/"}'
# Dry-run to preview YAML
kelos create agentconfig my-ac --skill review=@review.md --dry-run
Managing Resources
# List resources
kelos get tasks
kelos get taskspawners
kelos get workspaces
# View details
kelos get task my-task -d
kelos get task my-task -o yaml
# Stream logs
kelos logs my-task -f
# Suspend / resume a spawner
kelos suspend taskspawner my-spawner
kelos resume taskspawner my-spawner
# Delete
kelos delete task my-task
Configuration
Config file at ~/.kelos/config.yaml:
oauthToken: <token> # or apiKey: <key>
model: claude-sonnet-4-5-20250929
namespace: default
workspace:
repo: https://github.com/org/repo.git
ref: main
token: <github-token>
CLI flags always override config file values.
Dependency Chains
Tasks can depend on other Tasks using dependsOn. Dependent tasks access
upstream results via Go template syntax in the prompt:
dependsOn: [scaffold]
prompt: |
Code is on branch {{index .Deps "scaffold" "Results" "branch"}}.
PR: {{index .Deps "scaffold" "Results" "pr"}}
Available result keys: branch, commit, base-branch, pr, input-tokens, output-tokens, cost-usd.
Troubleshooting
Task stuck in Pending
- Check if the credentials secret exists:
kubectl get secret <name>
- Check controller logs:
kubectl logs deployment/kelos-controller-manager -n kelos-system
Task stuck in Waiting
- Check if a dependency in
dependsOn has not yet succeeded
- Check if another Task holds the branch lock (same
spec.branch)
Task fails immediately
- Verify agent credentials are valid
- Check the workspace repository is accessible
- Review pod logs:
kelos logs <task-name> or kubectl logs -l job-name=<job-name>
TaskSpawner not creating Tasks
- Check spawner status:
kubectl get taskspawner <name> -o yaml
- Verify the Workspace exists:
kubectl get workspace
- Check if
maxConcurrency is reached (active tasks at limit)
- Check if
maxTotalTasks limit is reached
- Check if
suspend: true is set
AgentConfig not taking effect
- Verify the Task references it:
spec.agentConfigRef.name must match
- Check plugin structure: skills become
<plugin>/skills/<skill>/SKILL.md
- For skills.sh: ensure the package source is valid
owner/repo format
Agent cannot push or create PRs
- Ensure the workspace secret has a valid
GITHUB_TOKEN
- Verify the token has
repo (and workflow if needed) permissions
- For GitHub Apps, check that
appID, installationID, and privateKey are correct
Supported Agent Types
| Type |
CLI |
Credential Env Var |
claude-code |
claude |
ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN |
codex |
codex |
CODEX_API_KEY or CODEX_AUTH_JSON |
gemini |
gemini |
GEMINI_API_KEY |
opencode |
opencode |
OPENCODE_API_KEY |
cursor |
agent (Cursor) |
CURSOR_API_KEY |
References
See the references/ directory next to this file for complete YAML examples:
task.yaml — Task patterns
workspace.yaml — Workspace patterns
agentconfig.yaml — AgentConfig patterns
taskspawner.yaml — TaskSpawner patterns
1---
2name: kelos
3description: Author, debug, and operate Kelos resources (Task, Workspace, AgentConfig, TaskSpawner) on Kubernetes. Use when working with Kelos CRDs or the kelos CLI.
4compatibility: Requires kubectl and access to a Kubernetes cluster
5metadata:
6 source: https://skillmd.com/skills/aibot88/kelos
7---
8
9# Kelos Skill
10
11Use this skill when you need to author, debug, or operate Kelos resources
12(Task, Workspace, AgentConfig, TaskSpawner) on a Kubernetes cluster.
13
14## Installing Kelos
15
16Install the controller and CRDs into a Kubernetes cluster:
17
18```bash
19kelos install
20```
21
22Uninstall:
23
24```bash
25kelos uninstall
26```
27
28Initialize a local config file at `~/.kelos/config.yaml`:
29
30```bash
31kelos init
32```
33
34## Core Resources
35
36Kelos defines four custom resources:
37
38| Resource | Purpose |
39|----------|---------|
40| **Task** | A single agent run — prompt, credentials, optional workspace and config |
41| **Workspace** | A git repository to clone for the agent |
42| **AgentConfig** | Reusable instructions, skills, agents, MCP servers |
43| **TaskSpawner** | Automatically creates Tasks from GitHub issues, Jira tickets, or cron |
44
45### Task
46
47A Task runs an AI agent with a prompt. Key fields:
48
49- `spec.type` (required): `claude-code`, `codex`, `gemini`, `opencode`, or `cursor`
50- `spec.prompt` (required): The task prompt
51- `spec.credentials` (required): `type` (`api-key` or `oauth`) and `secretRef.name`
52- `spec.workspaceRef.name`: Reference to a Workspace
53- `spec.agentConfigRef.name`: Reference to an AgentConfig
54- `spec.branch`: Git branch mutex — only one Task with the same branch runs at a time
55- `spec.dependsOn`: Task names that must succeed first
56- `spec.ttlSecondsAfterFinished`: Auto-delete after completion (seconds)
57- `spec.model`: Model override
58- `spec.podOverrides`: Resource limits, timeout, env vars, node selector
59
60Task status phases: `Pending` -> `Running` -> `Succeeded` or `Failed`.
61Tasks with unmet dependencies enter `Waiting`.
62
63### Workspace
64
65A Workspace defines a git repository for the agent:
66
67- `spec.repo` (required): Git URL (HTTPS, git://, or SSH)
68- `spec.ref`: Branch, tag, or commit to checkout
69- `spec.secretRef.name`: Secret with `GITHUB_TOKEN` (PAT) or GitHub App credentials (`appID`, `installationID`, `privateKey`)
70- `spec.remotes`: Additional git remotes (name must not be `origin`)
71- `spec.files`: Files to inject into the repo before the agent starts (e.g., `CLAUDE.md`, skills)
72
73### AgentConfig
74
75An AgentConfig injects reusable instructions and tools into Tasks:
76
77- `spec.agentsMD`: Instructions written to the agent's config (e.g., `~/.claude/CLAUDE.md`). Additive — does not overwrite repo files
78- `spec.plugins`: Plugin bundles with skills and sub-agents
79 - `plugins[].name`: Plugin name (directory namespace)
80 - `plugins[].skills[].name` / `.content`: Skill definitions (become `SKILL.md`)
81 - `plugins[].agents[].name` / `.content`: Agent definitions (become `<name>.md`)
82- `spec.skills`: skills.sh ecosystem packages
83 - `skills[].source`: Package in `owner/repo` format
84 - `skills[].skill`: Optional specific skill name
85- `spec.mcpServers`: MCP server configurations
86 - Supports `stdio`, `http`, and `sse` transport types
87 - Use `headersFrom` / `envFrom` with a `secretRef` for sensitive values
88
89### TaskSpawner
90
91A TaskSpawner auto-creates Tasks from external sources:
92
93- `spec.when.githubIssues`: Discover from GitHub issues (labels, state, assignee, author, commentPolicy, priority labels)
94- `spec.when.githubPullRequests`: Discover from GitHub PRs (labels, state, reviewState, author, draft, commentPolicy, priority labels)
95- `spec.when.cron`: Trigger on a cron schedule
96- `spec.when.jira`: Discover from Jira (project, JQL filter, secret with `JIRA_TOKEN`)
97- `spec.when.githubIssues.commentPolicy` / `spec.when.githubPullRequests.commentPolicy`: Comment-based workflow control with authorization
98 - `triggerComment`: Command that must appear for the item to be included (e.g., "/kelos pick-up")
99 - `excludeComments`: Commands that exclude items; when combined with triggerComment, the most recent authorized command wins
100 - `allowedUsers`: Restrict comment control to specific GitHub usernames
101 - `allowedTeams`: Restrict to GitHub teams in `org/team-slug` format
102 - `minimumPermission`: Require at least this repo permission (`read`, `triage`, `write`, `maintain`, `admin`)
103- `spec.taskTemplate`: Template for spawned Tasks (same fields as Task spec)
104 - `promptTemplate` and `branch` support Go `text/template` variables: `{{.ID}}`, `{{.Number}}`, `{{.Title}}`, `{{.Body}}`, `{{.URL}}`, `{{.Labels}}`, `{{.Comments}}`, `{{.Kind}}`, `{{.Time}}`, `{{.Schedule}}`
105- `spec.pollInterval`: Polling frequency (default `5m`)
106- `spec.maxConcurrency`: Limit concurrent running Tasks
107- `spec.maxTotalTasks`: Lifetime task creation limit
108- `spec.suspend`: Pause/resume without deleting
109
110## CLI Quick Reference
111
112### Running Tasks
113
114```bash
115# Simple task
116kelos run -p "Fix the login bug" --type claude-code
117
118# With workspace and agent config
119kelos run -p "Add tests" --workspace my-ws --agent-config my-ac
120
121# With model override and branch
122kelos run -p "Refactor auth" --model opus --branch feature/auth
123
124# Watch task progress
125kelos run -p "Fix bug" -w
126```
127
128### Creating Resources
129
130```bash
131# Create a workspace
132kelos create workspace my-ws \
133 --repo https://github.com/org/repo.git \
134 --ref main \
135 --secret github-token
136
137# Create an agent config with inline skill
138kelos create agentconfig my-ac \
139 --skill review="Review the PR for correctness and security" \
140 --agents-md @instructions.md
141
142# Create an agent config with skills.sh package
143kelos create agentconfig my-ac \
144 --skills-sh anthropics/skills:skill-creator
145
146# Create an agent config with MCP server
147kelos create agentconfig my-ac \
148 --mcp github='{"type":"http","url":"https://api.githubcopilot.com/mcp/"}'
149
150# Dry-run to preview YAML
151kelos create agentconfig my-ac --skill review=@review.md --dry-run
152```
153
154### Managing Resources
155
156```bash
157# List resources
158kelos get tasks
159kelos get taskspawners
160kelos get workspaces
161
162# View details
163kelos get task my-task -d
164kelos get task my-task -o yaml
165
166# Stream logs
167kelos logs my-task -f
168
169# Suspend / resume a spawner
170kelos suspend taskspawner my-spawner
171kelos resume taskspawner my-spawner
172
173# Delete
174kelos delete task my-task
175```
176
177### Configuration
178
179Config file at `~/.kelos/config.yaml`:
180
181```yaml
182oauthToken: <token> # or apiKey: <key>
183model: claude-sonnet-4-5-20250929
184namespace: default
185workspace:
186 repo: https://github.com/org/repo.git
187 ref: main
188 token: <github-token>
189```
190
191CLI flags always override config file values.
192
193## Dependency Chains
194
195Tasks can depend on other Tasks using `dependsOn`. Dependent tasks access
196upstream results via Go template syntax in the prompt:
197
198```yaml
199dependsOn: [scaffold]
200prompt: |
201 Code is on branch {{index .Deps "scaffold" "Results" "branch"}}.
202 PR: {{index .Deps "scaffold" "Results" "pr"}}
203```
204
205Available result keys: `branch`, `commit`, `base-branch`, `pr`, `input-tokens`, `output-tokens`, `cost-usd`.
206
207## Troubleshooting
208
209### Task stuck in Pending
210- Check if the credentials secret exists: `kubectl get secret <name>`
211- Check controller logs: `kubectl logs deployment/kelos-controller-manager -n kelos-system`
212
213### Task stuck in Waiting
214- Check if a dependency in `dependsOn` has not yet succeeded
215- Check if another Task holds the branch lock (same `spec.branch`)
216
217### Task fails immediately
218- Verify agent credentials are valid
219- Check the workspace repository is accessible
220- Review pod logs: `kelos logs <task-name>` or `kubectl logs -l job-name=<job-name>`
221
222### TaskSpawner not creating Tasks
223- Check spawner status: `kubectl get taskspawner <name> -o yaml`
224- Verify the Workspace exists: `kubectl get workspace`
225- Check if `maxConcurrency` is reached (active tasks at limit)
226- Check if `maxTotalTasks` limit is reached
227- Check if `suspend: true` is set
228
229### AgentConfig not taking effect
230- Verify the Task references it: `spec.agentConfigRef.name` must match
231- Check plugin structure: skills become `<plugin>/skills/<skill>/SKILL.md`
232- For skills.sh: ensure the package source is valid `owner/repo` format
233
234### Agent cannot push or create PRs
235- Ensure the workspace secret has a valid `GITHUB_TOKEN`
236- Verify the token has `repo` (and `workflow` if needed) permissions
237- For GitHub Apps, check that `appID`, `installationID`, and `privateKey` are correct
238
239## Supported Agent Types
240
241| Type | CLI | Credential Env Var |
242|------|-----|--------------------|
243| `claude-code` | `claude` | `ANTHROPIC_API_KEY` or `CLAUDE_CODE_OAUTH_TOKEN` |
244| `codex` | `codex` | `CODEX_API_KEY` or `CODEX_AUTH_JSON` |
245| `gemini` | `gemini` | `GEMINI_API_KEY` |
246| `opencode` | `opencode` | `OPENCODE_API_KEY` |
247| `cursor` | `agent` (Cursor) | `CURSOR_API_KEY` |
248
249## References
250
251See the `references/` directory next to this file for complete YAML examples:
252
253- `task.yaml` — Task patterns
254- `workspace.yaml` — Workspace patterns
255- `agentconfig.yaml` — AgentConfig patterns
256- `taskspawner.yaml` — TaskSpawner patterns