⚠️ Experimental — Manages a manually created Guild skill from SKILL.md content. Do not use this resource for skills synced via sg_skill_source. Companion files are create-only; changing them forces replacement.
Create-time 409 adoption is controlled by the provider attribute adopt_on_conflict (default true). Adoption lists provider=manual and matches the front-matter name exactly.
# When to use: Create a manual Guild skill from SKILL.md content (YAML front
# matter + Markdown body). Front matter must include a stable `name:`.
# Companion files are create-only (changing forces replace).
#
# Related: sg_agent.skills (attach by computed name), data.sg_skill (lookup).
resource "sg_skill" "kubectl_readonly" {
skill_md = <<-SKILL
---
name: kubectl-readonly
description: Read-only Kubernetes inspection helpers for SRE agents.
---
# kubectl-readonly
Use these helpers to inspect cluster state without mutating resources.
Prefer `kubectl get` / `describe` over apply or delete.
SKILL
files = [
{
kind = "script"
path = "scripts/node-ready.sh"
content = "#!/usr/bin/env bash\nset -euo pipefail\nkubectl get nodes -o wide\n"
},
]
}
# Prefer agent.skills = [name] for startup materialization (do not wait on search_skill).
resource "sg_agent" "sre" {
name = "sre-kubectl-helper"
skills = [sg_skill.kubectl_readonly.name]
}
Import an existing sg_skill using its skill ID:
terraform import sg_skill.example '123e4567-e89b-12d3-a456-426614174000'
skill_md (String) Complete SKILL.md content (YAML front matter + Markdown body). Front matter must include a stable name matching ^[a-z0-9]+(-[a-z0-9]+)*$. Name must not change on update.files (Attributes List) Optional companion files stored with the skill. Changing forces replacement because UpdateSkill does not modify companions. (see below for nested schema)body (String) Markdown body returned by the API (may omit front matter).content_type (String) Content type of the stored skill document.created_at (String) Creation timestamp (RFC 3339).description (String) Skill description parsed from SKILL.md front matter.file_path (String) Storage path of the skill document.flagged (Boolean) Whether security scanning flagged this skill.id (String) Server-assigned skill UUID. Import with: terraform import sg_skill.example ‘name (String) Skill name parsed from SKILL.md front matter. Wire to sg_agent.skills / workflow skill_refs.name_inferred (Boolean) True when Guild invented the name because front matter omitted name.source_id (String) Skill source UUID. Empty or zero UUID for manually created skills.synced_at (String) Last sync timestamp (RFC 3339).tags (List of String) Tags associated with the skill.updated_at (String) Last modification timestamp (RFC 3339).filesRequired:
kind (String) Companion file kind (doc, script, reference, or asset).path (String) Relative path of the companion file within the skill (e.g. scripts/setup.sh).Optional:
content (String, Sensitive) File content. Marked sensitive because companion scripts may contain credentials.