Skip to content

Use the gt Plugin

The engineer's guide to the gt Claude Code plugin. Use this runbook to:

  • Install the plugin on a workstation.
  • Run a skill.
  • Check which version you have, and update.
  • Change or add a skill, and try it before merging.
  • Release a change to every engineer.
  • Understand why Claude stopped to run a desired-state check.

How it is designed, and why: The gt Claude Code Plugin.

Engineers only receive a change when the version goes up

Every workstation runs the version released from main. A merged change that doesn't raise the version in CHANGELOG.md reaches nobody. The CI check on every merge request enforces this.

The projects

Project Holds
devops/ai-prompts The plugin: skills, guard hook, installer, release pipeline.
devops/azgovviz-analyzer Datum, the desired state that gt:desired-state checks against.
The workspace repo (CLAUDE.md, claude-user/settings.json) The standards every skill reads, and the shared settings that enable the plugin.

Before you start

  • Claude Code, with the claude CLI on your PATH.
  • PowerShell 7 (pwsh). The installer and the guard hook both need it.
  • An SSH key for gitlab.com loaded in ssh-agent. Claude Code fetches the plugin with git and can't answer a passphrase prompt.
  • Read access to devops/ai-prompts.
  • For gt:desired-state and gt:review-mr: a signed-in glab.

Windows and WSL on the same PC are two separate installs: do the install in each.


Install the plugin

📁 ai-prompts: 📃 setup.ps1

  1. Clone the repo and run the installer:

    git clone git@gitlab.com:grinntec-cloud/devops/ai-prompts.git
    cd ai-prompts
    pwsh ./setup.ps1
    
  2. Restart Claude Code.

It worked when the last line reads done gt@grinntec vX.Y.Z. Restart Claude Code to load it., and typing /gt: in Claude Code lists the skills.

The installer is safe to run again. It adds the grinntec marketplace, installs gt, turns on auto-update in ~/.claude/settings.json (saving the old file as settings.json.bak), removes any skill links left by the old sync.ps1, and turns on the repo's git hook.

When it fails:

Message Fix
claude CLI not found on PATH Install Claude Code, or open a new shell so PATH is current.
claude plugin marketplace add … failed Usually SSH: check ssh -T git@gitlab.com works without a prompt, and that ssh-agent holds your key.
grinntec is not in …/settings.json after 'claude plugin marketplace add' The add step didn't register. Run claude plugin marketplace list and rerun the installer.

Run a skill

📁 any workspace project

Type /gt:<skill> in Claude Code, optionally followed by a path or a short description. Claude also picks a skill by itself when your request matches its description. Skills that act on a project show the workspace project menu if you don't name one.

Skill Use it to
/gt:desired-state Check a planned change against the Datum desired state. Runs by itself before identity, policy and Defender edits.
/gt:access-requirements Write docs/access-requirements.md: the access a project's pipeline and operators need.
/gt:review-mr Review a colleague's GitLab merge request and draft a comment.
/gt:grinntec-website-update Write or update a project's two pages on this site.
/gt:tf-new-module Scaffold a Terraform module to workspace standards.
/gt:tf-red-team Review Terraform like an attacker and write docs/red-team-report.md.
/gt:tf-replace-secrets-with-oidc Move a pipeline from stored secrets to OIDC.
/gt:tf-review-project Answer "is this project good enough to use?" and save a report to _reviews/.
/gt:tf-write-readme-adr Write README prose and, where a decision exists, an ADR.

Check your version and update

📁 any folder

Updates install by themselves when Claude Code starts. To check or update by hand:

claude plugin list                  # shows gt@grinntec and its version
claude plugin update gt@grinntec    # update now, then restart Claude Code

It worked when claude plugin list shows the version of the newest release on the repo's Releases page.

Change or add a skill

📁 ai-prompts: 📃 skills/<name>/SKILL.md

  1. Make a branch: git switch -c feat/<change>.
  2. Edit skills/<name>/SKILL.md, or add a new folder. The folder name must match name: in the front matter; the command becomes /gt:<name>. Say in description when Claude should use the skill.
  3. Point at workspace files as <workspace>/... and at plugin files through ${CLAUDE_SKILL_DIR}. Never copy standards into a skill; tell it to read the workspace CLAUDE.md.
  4. Try it in one session with your working copy:

    claude --plugin-dir .
    
  5. Check the manifests and skills:

    claude plugin validate .
    
  6. Add a line under ## [Unreleased] in CHANGELOG.md.

It worked when the skill behaves as expected under --plugin-dir, and claude plugin validate . ends with Validation passed.

To try a pushed branch as a real install, the way engineers will get it: pwsh ./setup.ps1 -Ref <branch>. Go back to main afterwards with pwsh ./setup.ps1.

Release a change

📁 ai-prompts: 📃 CHANGELOG.md

  1. Pick the version from the change:
    • Major: a skill renamed or removed, or a required argument added.
    • Minor: a new skill, or new behaviour in an existing one.
    • Patch: a fix or wording change with no change in behaviour.
  2. In CHANGELOG.md, move the [Unreleased] entries under a new ## [x.y.z] heading.
  3. Commit. The git hook prints pre-commit: plugin.json version … -> x.y.z (from CHANGELOG.md) and adds plugin.json to the commit.
  4. Push and open a merge request. The version:check job should print Bump <old> -> <new>.
  5. Merge. The release job on main creates tag vx.y.z and a GitLab Release.

It worked when the new version appears on the Releases page. Engineers get it the next time Claude Code starts.

Never edit the version in plugin.json or marketplace.json by hand, and don't tag by hand.

When it fails:

Message Where Fix
plugin.json must match the newest CHANGELOG.md version heading version:check or release The git hook wasn't on. Run pwsh ./setup.ps1 (or git config core.hooksPath .githooks), then make any commit that touches CHANGELOG.md.
Plugin content changed but the version is still x.y.z version:check Do step 2, then commit and push.
pre-commit: .claude-plugin/plugin.json has unstaged changes Your commit Stage or stash your own plugin.json edits, then commit again.
vx.y.z already released; nothing to do. release Not an error: that version was already published.

When Claude stops to run a desired-state check

📁 any workspace project

If Claude is about to write a .tf, .tfvars, .hcl, JSON, YAML, PowerShell, shell or Bicep file that touches role assignments, identities, federated credentials, policy or Defender, the guard denies the edit with Desired-state check required before this edit. You don't need to do anything:

  1. Claude runs gt:desired-state on the change.
  2. It tells you which statements it checked (e.g. IAM-04) and the Datum version.
  3. If nothing breaks, it retries the edit. If something breaks, it stops and offers a compliant option. You decide whether to go ahead.

The check counts once per request: after it has run, further edits in the same request go through.

The guard fails open, so an edit can go through unchecked:

  • Claude reports The gt desired-state guard could not run: the guard started but couldn't read its input or the session transcript.
  • No guard at all: pwsh isn't on PATH, so the hook can't start. Check with pwsh -v.

In both cases, ask Claude to run /gt:desired-state on the change by hand.