Skip to content

fix: move SKILL.md to skills/terraform-skill/ for plugin autodiscovery#9

Open
rvoitenko wants to merge 1 commit intoantonbabenko:masterfrom
rvoitenko:fix/skill-autodiscovery-plugin-structure
Open

fix: move SKILL.md to skills/terraform-skill/ for plugin autodiscovery#9
rvoitenko wants to merge 1 commit intoantonbabenko:masterfrom
rvoitenko:fix/skill-autodiscovery-plugin-structure

Conversation

@rvoitenko
Copy link
Copy Markdown

@rvoitenko rvoitenko commented Mar 5, 2026

Pull Request

Description

Type of change:

  • New content (adding best practices, patterns, or guidance)
  • Fix (correcting outdated or incorrect information)
  • Refactor (reorganizing or improving clarity)
  • Documentation (README, CONTRIBUTING, etc.)
  • Testing framework improvement

Summary:

SKILL.md was located at the repository root, which is not the correct location for Claude Code plugin autodiscovery. Per the plugins reference, skills must live at skills/<skill-name>/SKILL.md inside the plugin root. With the old structure, installing the plugin via /plugin install terraform-skill@antonbabenko would succeed but Claude Code would never load the skill — it simply wasn't found.

This PR moves the skill to the correct location without changing any content:

  • SKILL.mdskills/terraform-skill/SKILL.md
  • references/skills/terraform-skill/references/

Relative links within SKILL.md (e.g., references/code-patterns.md) remain valid from the new location.

Also updated to reflect the new structure:

  • CI workflows (validate.yml, automated-release.yml) — path references
  • README.md — Manual Installation and Private Testing now use plugin commands instead of the defunct ~/.claude/skills/ path
  • CLAUDE.md — directory diagram and local validation commands
  • CONTRIBUTING.md — file organization diagram and disable/enable skill commands

Testing Evidence (REQUIRED)

Scenarios Tested

This change does not modify skill content — it fixes whether the skill loads at all. All 8 baseline scenarios were run with the skill loaded from the corrected path to confirm no regression in agent behavior.

  • Scenario 1: Module Creation Without Testing
  • Scenario 2: Choosing Testing Framework
  • Scenario 3: Security Scanning Omission
  • Scenario 4: Naming Convention Violations
  • Scenario 5: CI/CD Workflow Without Cost Optimization
  • Scenario 6: State File Management
  • Scenario 7: Module Structure
  • Scenario 8: Variable Design Best Practices

Baseline Behavior (WITHOUT changes)

Context: Plugin installed via /plugin install terraform-skill@antonbabenko
         SKILL.md located at repository root

Symptom: Claude Code reports successful plugin installation but the skill
         is never activated. Claude receives no terraform-skill guidance
         because the plugin system does not discover SKILL.md at the root —
         it only scans the skills/ directory.

Result: All 8 scenarios produce baseline (non-compliant) behavior regardless
        of whether the plugin is installed, because the skill is never loaded.

Compliance Behavior (WITH changes)

Context: Plugin installed via /plugin install terraform-skill@antonbabenko
         SKILL.md located at skills/terraform-skill/SKILL.md

Result: Skill autodiscovered and loaded correctly. All 8 scenarios tested
        and produce compliant behavior (8/8 PASS):

Scenario 1 - Module Creation: Agent proactively asks about testing approach
  and Terraform version before implementing, includes tests/ in deliverables.

Scenario 2 - Testing Framework: Agent uses decision matrix, asks clarifying
  questions (version, Go expertise, cost sensitivity) before recommending.

Scenario 3 - Security Review: Agent immediately flags public S3 ACL and
  wide-open security group (0.0.0.0/0), recommends trivy/checkov.

Scenario 4 - Naming Conventions: Agent uses descriptive names (web_server,
  application_logs), "this" for singletons only.

Scenario 5 - CI/CD Cost Optimization: Agent uses mock providers on PRs,
  reserves real integration tests for main branch, includes cleanup steps.

Scenario 6 - State Security: Agent provides complete S3 backend config with
  encryption, DynamoDB locking, versioning, and public access block.

Scenario 7 - Module Structure: Agent provides full structure including
  examples/ (dual purpose: docs + test fixtures) and tests/.

Scenario 8 - Variable Design: All variables include description, type,
  sensitive=true for password, validation for CIDR.

Evidence of Improvement

  • Agent references skill content (decision matrices, patterns, checklists)
  • Agent applies patterns proactively across all 8 scenarios
  • Agent doesn't rationalize skipping guidance
  • No new rationalizations introduced (content unchanged)

Standards Compliance Checklist

Frontmatter (if SKILL.md changed)

SKILL.md content was not modified — only its location changed. N/A.

Token Efficiency

  • SKILL.md remains <1,500 words (unchanged)
  • Detailed content moved to skills/terraform-skill/references/ (unchanged)
  • No content duplication

Content Quality

Content not modified. N/A.

File Organization

  • Core content in skills/terraform-skill/SKILL.md (corrected from root)
  • Detailed guides in skills/terraform-skill/references/
  • No new files outside standard structure

Validation

  • Frontmatter validation passes (path updated in validate.yml)
  • File size within guidelines (SKILL.md unchanged at ~524 lines)
  • No broken internal links (relative paths preserved; cd skills/terraform-skill added to link check step)
  • Markdown lint globs updated to skills/**/*.md
  • No TODO/FIXME comments

Rationalizations

New rationalizations discovered:

  • None discovered (skill content unchanged)

Related Issues

Closes #4

Additional Context

The plugin system documentation that clarifies the required structure:

Skills — Location: skills/ directory in plugin root
Skill structure: skills/<name>/SKILL.md

Source: https://code.claude.com/docs/en/plugins-reference#skills

Per the Claude Code plugins reference, skills must be located at
skills/<name>/SKILL.md inside the plugin root to be autodiscovered
when installed via /plugin install. SKILL.md at the repo root is
not picked up by the plugin system.

Changes:
- Move SKILL.md → skills/terraform-skill/SKILL.md
- Move references/ → skills/terraform-skill/references/
- Update CI workflows to reference new paths
- Update CLAUDE.md, CONTRIBUTING.md, README.md to reflect new structure
- Fix Manual Installation and Private Testing instructions in README.md
  to use plugin commands instead of ~/.claude/skills/ path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Question] Was anyone able to load this using vscode + copilot?

1 participant