add-ansible-rolelisted
Install: claude install-skill bcmyguest/personal-skills
# Add a role to the user's Ansible setup
**At a glance:** (0) read `config.json` to find the playbook → (1) pick the archetype
(GitHub release / package manager / install script) → (2) gather the real release asset
from the live GitHub API → (3) write the role from the bundled template, version-driven
and idempotent → (4) register the tool's shell completion → (5) register the role in the
playbook and verify a second run reports no changes. Match the repo's existing conventions throughout; fix the common bugs (hardcoded
versions, no-op PATH `shell:` tasks) rather than copying them.
## Step 0 — Locate the setup
Read `config.json` next to this SKILL.md:
```json
{
"ansible_dir": "~/.config/nvim/ansible",
"playbook": "nvim.yml"
}
```
`ansible_dir` is the directory holding the playbook, `roles/`, and `ansible.cfg`;
`playbook` is the main playbook filename. If `config.json` is missing, ask the user
where their ansible setup lives (or find it: a directory containing both `ansible.cfg`
and a `roles/` dir), then offer to write `config.json` so this step disappears next time.
Before writing anything, skim the playbook and one or two existing roles — match the
repo's conventions (tag naming, FQCN vs short module names, yamllint strictness) rather
than imposing your own. The guidance below describes the common shape of these personal
provisioning repos: a single playbook on `hosts: localhost`, every role listed with a
tag matching the role name, roles under `roles/<name>/` with