Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions .claude-plugin/marketplace.json

This file was deleted.

36 changes: 3 additions & 33 deletions .github/workflows/automated-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@ jobs:
preset: 'angular'
tag-prefix: 'v'
output-file: 'CHANGELOG.md'
version-file: './.claude-plugin/marketplace.json'
version-path: 'version'
skip-on-empty: 'false'
skip-version-file: 'false'
skip-version-file: 'true'
skip-commit: 'false'

# 2b. Sync plugin version, SKILL.md version, and git ref
Expand Down Expand Up @@ -93,38 +91,10 @@ jobs:
try:
version = os.environ['VERSION']

# 1. Update marketplace.json
with open('.claude-plugin/marketplace.json', 'r') as f:
data = json.load(f)

# Validate structure
if 'plugins' not in data or len(data['plugins']) == 0:
raise ValueError("No plugins found in marketplace.json")

# Sync marketplace.json versions
data['plugins'][0]['version'] = version

# Validate marketplace.json synced state
if data['version'] != version:
raise ValueError(f"Marketplace version {data['version']} != {version}")

with open('.claude-plugin/marketplace.json', 'w') as f:
json.dump(data, f, indent=2)
f.write('\n')

print(f"✅ Synced marketplace.json plugin version to {version}")

# 2. Update SKILL.md
# SKILL.md frontmatter is the single version source.
skill_path = update_skill_version(version)
print(f"✅ Synced {skill_path} metadata.version to {version}")

# 3. Final validation - all three versions match
print(f"\n📋 Version Sync Summary:")
print(f" - marketplace.json root: {data['version']}")
print(f" - marketplace.json plugins[0]: {data['plugins'][0]['version']}")
print(f" - SKILL.md metadata: {version}")
print(f" ✅ All versions synchronized to {version}")

except Exception as e:
print(f"❌ ERROR: Failed to sync versions: {e}")
sys.exit(1)
Expand All @@ -133,7 +103,7 @@ jobs:
# Commit the sync
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .claude-plugin/marketplace.json skills/terraform-skill/SKILL.md
git add skills/terraform-skill/SKILL.md
git commit --amend --no-edit
git push --force-with-lease

Expand Down
48 changes: 0 additions & 48 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,54 +100,6 @@ jobs:
echo "✅ Size OK"
fi

- name: Validate marketplace.json
run: |
python3 << 'EOF'
import json
import sys
import re

print("🔍 Validating marketplace.json...")

with open('.claude-plugin/marketplace.json', 'r') as f:
marketplace = json.load(f)

# Validate marketplace-level fields
required_marketplace = ['name', 'owner', 'version', 'plugins']
missing = [f for f in required_marketplace if f not in marketplace]

if missing:
print(f"❌ ERROR: Missing marketplace fields: {missing}")
sys.exit(1)

# Validate owner structure
if 'name' not in marketplace['owner']:
print("❌ ERROR: owner must have 'name'")
sys.exit(1)

# Validate version format
version = marketplace['version']
if not re.match(r'^\d+\.\d+\.\d+$', version):
print(f"❌ ERROR: Invalid marketplace version: {version}")
sys.exit(1)

# Validate plugins array
if not isinstance(marketplace['plugins'], list) or len(marketplace['plugins']) == 0:
print("❌ ERROR: 'plugins' must be a non-empty array")
sys.exit(1)

# Validate each plugin
for idx, plugin in enumerate(marketplace['plugins']):
required_plugin = ['name', 'description', 'source']
missing = [f for f in required_plugin if f not in plugin]

if missing:
print(f"❌ ERROR: Plugin {idx} missing fields: {missing}")
sys.exit(1)

print(f"✅ marketplace.json valid (v{version}, {len(marketplace['plugins'])} plugin(s))")
EOF

- name: Check for Broken Links
run: |
echo "🔍 Checking internal links..."
Expand Down
8 changes: 3 additions & 5 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ A **Claude Code skill** - executable documentation that Claude loads to provide

```
terraform-skill/
├── .claude-plugin/marketplace.json # Plugin metadata (version synced automatically)
├── skills/
│ └── terraform-skill/ # Skill autodiscovered by Claude Code plugin system
│ ├── SKILL.md # Core skill file (~299 lines)
Expand Down Expand Up @@ -88,10 +87,9 @@ Releases are **fully automated** from conventional commits on `master`:

The release workflow automatically:
- Bumps the version in `CHANGELOG.md`
- Syncs versions across **three places** (must stay in sync):
1. `.claude-plugin/marketplace.json` → `version` (root)
2. `.claude-plugin/marketplace.json` → `plugins[0].version`
3. `skills/terraform-skill/SKILL.md` YAML frontmatter → `metadata.version`
- Syncs `skills/terraform-skill/SKILL.md` YAML frontmatter
`metadata.version` (the single version source; the canonical version is the
git tag managed by the release pipeline)

**Never manually edit version numbers** - the CI handles this.

Expand Down
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

### Frontmatter Requirements

SKILL.md frontmatter must include two required fields. Other fields are optional and allowed.

Check failure on line 35 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / Validate Skill Files

Line length

CONTRIBUTING.md:35:81 MD013/line-length Line length [Expected: 80; Actual: 93] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md013.md

**Required:**

Expand Down Expand Up @@ -63,7 +63,7 @@
---
```

The validate workflow (`.github/workflows/validate.yml`) rejects the PR only if `name` or `description` is missing, if `name` contains invalid characters, or if `description` exceeds 1024 characters. Optional fields are logged but not blocked.

Check failure on line 66 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / Validate Skill Files

Line length

CONTRIBUTING.md:66:81 MD013/line-length Line length [Expected: 80; Actual: 243] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md013.md

### Description Best Practices

Expand All @@ -82,16 +82,16 @@
**Bad example:**

```yaml
description: Comprehensive skill for Terraform development covering testing, modules, CI/CD, and production patterns

Check failure on line 85 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / Validate Skill Files

Line length

CONTRIBUTING.md:85:81 MD013/line-length Line length [Expected: 80; Actual: 116] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md013.md
```

The description must focus on WHEN to use (triggers, symptoms), not WHAT the skill does. See writing-skills documentation for rationale.

Check failure on line 88 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / Validate Skill Files

Line length

CONTRIBUTING.md:88:81 MD013/line-length Line length [Expected: 80; Actual: 136] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md013.md

### Token Efficiency

**SKILL.md target:** <300 lines (currently 277).

**Reference subsection target:** <400 tokens (~1,600 chars). Split or compress anything larger.

Check failure on line 94 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / Validate Skill Files

Line length

CONTRIBUTING.md:94:81 MD013/line-length Line length [Expected: 80; Actual: 95] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md013.md

**Techniques:**

Expand All @@ -102,7 +102,7 @@

### LLM Consumption Rules

Every SKILL.md or `references/*.md` addition must follow the rules in [CLAUDE.md §LLM Consumption Rules](CLAUDE.md#llm-consumption-rules-enforce-in-every-pr-review):

Check failure on line 105 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / Validate Skill Files

Line length

CONTRIBUTING.md:105:81 MD013/line-length Line length [Expected: 80; Actual: 165] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md013.md

- Decision table before playbook
- No before/after diffs that restate the phase steps
Expand All @@ -115,7 +115,7 @@

### File Organization

```

Check failure on line 118 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / Validate Skill Files

Fenced code blocks should have a language specified

CONTRIBUTING.md:118 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md040.md
terraform-skill/
├── skills/
│ └── terraform-skill/ # Autodiscovered by Claude Code plugin system
Expand Down Expand Up @@ -150,7 +150,7 @@
- ✅ Reorganization or refactoring
- ✅ "Simple" documentation updates

No exceptions. Without a baseline, a change cannot prove it improves agent behavior. Per writing-skills, this is TDD for documentation:

Check failure on line 153 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / Validate Skill Files

Line length

CONTRIBUTING.md:153:81 MD013/line-length Line length [Expected: 80; Actual: 135] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md013.md

- **RED:** Run scenarios without your changes (baseline)
- **GREEN:** Add changes, verify behavior improves
Expand Down Expand Up @@ -276,11 +276,11 @@

## Commit Message Format

This project uses [Conventional Commits](https://www.conventionalcommits.org/) to automate releases and changelog generation.

Check failure on line 279 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / Validate Skill Files

Line length

CONTRIBUTING.md:279:81 MD013/line-length Line length [Expected: 80; Actual: 125] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md013.md

### Format

```

Check failure on line 283 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / Validate Skill Files

Fenced code blocks should have a language specified

CONTRIBUTING.md:283 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md040.md
<type>: <description>

[optional body]
Expand Down Expand Up @@ -326,7 +326,7 @@
git commit -m "chore: update workflow dependencies"
```

Commit type determines the version bump, the changelog group, and whether a release is cut on merge to master. The release workflow updates the version in marketplace.json (marketplace root and plugin entry) and in SKILL.md frontmatter.
Commit type determines the version bump, the changelog group, and whether a release is cut on merge to master. The release workflow updates the version in SKILL.md frontmatter (the single version source) and tags the release.

## Submitting Changes

Expand Down Expand Up @@ -379,7 +379,6 @@
2. Workflow analyzes commits since the last release
3. Workflow calculates the version bump (major/minor/patch)
4. Workflow updates:
- `.claude-plugin/marketplace.json` (marketplace version, plugin version, git ref)
- `skills/terraform-skill/SKILL.md` frontmatter (`metadata.version`)
- `CHANGELOG.md` (generated from commits)
5. Workflow creates the git tag and GitHub Release
Expand Down
Loading