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
8 changes: 4 additions & 4 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@
{
"name": "clownware-code-tools",
"source": "./plugins/code-tools",
"description": "Universal dev workflow skills \u2014 architecture/deployment-readiness auditing (/arch-audit), security auditing (/security-audit), test-suite auditing (/test-audit), Claude Code skill auditing (/skill-audit), design-system auditing (/design-audit), accessibility auditing (/a11y-audit), dependency auditing (/deps-audit), performance auditing (/perf-audit), devops/CI-CD auditing (/devops-audit), audit-fix application (/audit-fix), plugin releasing (/plugin-release), skill validation (/skill-validate), ADR authoring, PR descriptions, root-cause debugging, test scaffolding, and GitHits OSS research conventions (githits-research) \u2014 that probe the repo they run in and degrade gracefully. Plus a git guard hook: blocks --no-verify and secret-scans staged changes before every commit."
"description": "Universal dev workflow skills \u2014 architecture/deployment-readiness auditing (/arch-audit), security auditing (/security-audit), test-suite auditing (/test-audit), Claude Code skill auditing (/skill-audit), design-system auditing (/design-audit), accessibility auditing (/a11y-audit), dependency auditing (/deps-audit), performance auditing (/perf-audit), devops/CI-CD auditing (/devops-audit), audit-fix application (/audit-fix), plugin releasing (/plugin-release), skill validation (/skill-validate), ADR authoring, PR descriptions, root-cause debugging, test scaffolding, and GitHits OSS research conventions (githits-research) \u2014 that probe the repo they run in and degrade gracefully. Plus a git guard hook: blocks --no-verify and secret-scans staged changes before every commit. And a format-on-edit dispatcher hook: Biome (biome.json-gated), goimports/gofmt, templ fmt or rustfmt, routed by extension."
},
{
"name": "clownware-astro-tools",
"source": "./plugins/astro-tools",
"description": "Astro + Preact stack skills \u2014 component scaffolding, template-aware PR descriptions, and performance-budget gate checks (/perf-budget-check) \u2014 following astro-performance-starter conventions with fallbacks for other Astro projects. Plus a format-on-edit hook that runs Biome on every file Claude edits in Biome-configured projects."
"description": "Astro + Preact stack skills \u2014 component scaffolding, template-aware PR descriptions, and performance-budget gate checks (/perf-budget-check) \u2014 following astro-performance-starter conventions with fallbacks for other Astro projects. Formatting on edit moved to the clownware-code-tools dispatcher hook."
},
{
"name": "clownware-go-tools",
"source": "./plugins/go-tools",
"description": "Go + templ + sqlc stack skills \u2014 templ component scaffolding, table-driven test scaffolding, sqlc query scaffolding (/sqlc-query-scaffold), performance-budget gate checks (/perf-budget-check), and task-ci-aware PR descriptions \u2014 following go-performance-starter conventions with fallbacks for other Go projects. Plus a format-on-edit hook that runs goimports/gofmt and templ fmt on files Claude edits."
"description": "Go + templ + sqlc stack skills \u2014 templ component scaffolding, table-driven test scaffolding, sqlc query scaffolding (/sqlc-query-scaffold), performance-budget gate checks (/perf-budget-check), and task-ci-aware PR descriptions \u2014 following go-performance-starter conventions with fallbacks for other Go projects. Formatting on edit moved to the clownware-code-tools dispatcher hook."
},
{
"name": "clownware-rust-tools",
"source": "./plugins/rust-tools",
"description": "Rust stack skills — table-driven test scaffolding and CI-aware quality-gate checks (/gate-check: cargo fmt/clippy/test/deny and special CI legs) — following the tunes_protocol and gittunes workspace conventions with fallbacks for other Rust projects. Plus a format-on-edit hook that runs rustfmt (edition-detected) on files Claude edits."
"description": "Rust stack skills — table-driven test scaffolding and CI-aware quality-gate checks (/gate-check: cargo fmt/clippy/test/deny and special CI legs) — following the tunes_protocol and gittunes workspace conventions with fallbacks for other Rust projects. Formatting on edit moved to the clownware-code-tools dispatcher hook."
},
{
"name": "pezza-design-system",
Expand Down
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ A [Claude Code plugin marketplace](https://code.claude.com/docs/en/plugin-market
| Plugin | What it is | Source |
|--------|------------|--------|
| `product-dev` | AI-assisted product development framework: idea → technical spec via UX research, hypothesis, and prototype planning. | [`product-dev/plugin`](https://github.com/clownware/product-dev/tree/main/plugin) |
| `clownware-code-tools` | Universal dev workflow skills — an audit suite plus authoring and debugging tools. Probes the repo it runs in; degrades gracefully. Ships a git guard hook (blocks `--no-verify`, secret-scans commits). | [`plugins/code-tools`](plugins/code-tools) |
| `clownware-astro-tools` | Astro + Preact stack skills following astro-performance-starter conventions. Ships a Biome format-on-edit hook. | [`plugins/astro-tools`](plugins/astro-tools) |
| `clownware-go-tools` | Go + templ + sqlc stack skills following go-performance-starter conventions. Ships a goimports/templ format-on-edit hook. | [`plugins/go-tools`](plugins/go-tools) |
| `clownware-rust-tools` | Rust stack skills following the tunes_protocol/gittunes workspace conventions. Ships a rustfmt format-on-edit hook. | [`plugins/rust-tools`](plugins/rust-tools) |
| `clownware-code-tools` | Universal dev workflow skills — an audit suite plus authoring and debugging tools. Probes the repo it runs in; degrades gracefully. Ships a git guard hook (blocks `--no-verify`, secret-scans commits) and the format-on-edit dispatcher for every stack. | [`plugins/code-tools`](plugins/code-tools) |
| `clownware-astro-tools` | Astro + Preact stack skills following astro-performance-starter conventions. Format-on-edit lives in `clownware-code-tools`. | [`plugins/astro-tools`](plugins/astro-tools) |
| `clownware-go-tools` | Go + templ + sqlc stack skills following go-performance-starter conventions. Format-on-edit lives in `clownware-code-tools`. | [`plugins/go-tools`](plugins/go-tools) |
| `clownware-rust-tools` | Rust stack skills following the tunes_protocol/gittunes workspace conventions. Format-on-edit lives in `clownware-code-tools`. | [`plugins/rust-tools`](plugins/rust-tools) |
| `pezza-design-system` | The Pezza brand design system as a skill: guidelines, HSL-channel tokens, animatable brand SVGs, prose layer, motion system, React primitives, two UI kits. | [`plugins/pezza-design-system`](plugins/pezza-design-system) |

## Skills at a glance
Expand Down Expand Up @@ -42,6 +42,12 @@ Hook: a `PreToolUse` git guard on every Bash call — denies `git commit`/`git p
--no-verify` (the repo's hooks are the quality gate), and secret-scans staged changes
before any commit (gitleaks when installed, high-confidence token patterns otherwise).

Hook: a `PostToolUse` format dispatcher — after Claude edits or writes a file, one
process routes by extension: Biome for JS/TS/JSON/CSS/Astro (gated on a `biome.json`
at or above the file), goimports/gofmt for `.go`, `templ fmt` for `.templ`, rustfmt
for `.rs` (edition-detected from the nearest Cargo.toml). Replaces the three per-stack
hooks; silent no-op everywhere else.

**clownware-astro-tools**

| Skill | What it does |
Expand All @@ -50,9 +56,7 @@ before any commit (gitleaks when installed, high-confidence token patterns other
| `/astro-pr-description` | PR descriptions for astro-performance-starter template repos |
| `/perf-budget-check` | Runs the starter's own budget gates (sizes, overrides, images) and interprets the verdicts |

Hook: a `PostToolUse` formatter — after Claude edits or writes a file, runs Biome on
just that file (gated on a `biome.json` at or above it), so diffs never fail the
project's format gate.
Hook: none. Formatting on edit is handled by the `clownware-code-tools` dispatcher hook; install that plugin alongside this one.

**clownware-go-tools**

Expand All @@ -64,8 +68,7 @@ project's format gate.
| `/perf-budget-check` | Runs the starter's `task test:performance` gates and interprets the verdicts |
| `/go-pr-description` | PR descriptions aware of the `task ci` quality gate and the ADR constitution |

Hook: a `PostToolUse` formatter — after Claude edits or writes a `.go` or `.templ`
file, runs goimports/gofmt or `templ fmt` on just that file.
Hook: none. Formatting on edit is handled by the `clownware-code-tools` dispatcher hook; install that plugin alongside this one.

**clownware-rust-tools**

Expand All @@ -74,9 +77,7 @@ file, runs goimports/gofmt or `templ fmt` on just that file.
| `/test-scaffold` | Table-driven `#[cfg(test)]` stubs (`#[ignore]`d so the suite stays green), vector-aware for protocol crates |
| `/gate-check` | Runs the repo's own gates exactly as CI defines them (fmt/clippy/test/deny + special legs) and interprets each verdict |

Hook: a `PostToolUse` formatter — after Claude edits or writes a `.rs` file, runs
rustfmt on just that file, edition-detected from the nearest Cargo.toml (including
`[workspace.package]`).
Hook: none. Formatting on edit is handled by the `clownware-code-tools` dispatcher hook; install that plugin alongside this one.

**pezza-design-system**

Expand Down
4 changes: 2 additions & 2 deletions plugins/astro-tools/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "clownware-astro-tools",
"description": "Astro + Preact stack skills: component scaffolding, template-aware PR descriptions, and performance-budget gate checks, following astro-performance-starter conventions with fallbacks for other Astro projects. Also ships a format-on-edit hook that runs Biome on every file Claude edits in Biome-configured projects.",
"version": "0.5.2",
"description": "Astro + Preact stack skills: component scaffolding, template-aware PR descriptions, and performance-budget gate checks, following astro-performance-starter conventions with fallbacks for other Astro projects. Formatting on edit moved to the clownware-code-tools dispatcher hook.",
"version": "0.6.0",
"license": "Apache-2.0",
"author": {
"name": "clownware"
Expand Down
44 changes: 0 additions & 44 deletions plugins/astro-tools/hooks/format-file.sh

This file was deleted.

15 changes: 0 additions & 15 deletions plugins/astro-tools/hooks/hooks.json

This file was deleted.

4 changes: 2 additions & 2 deletions plugins/code-tools/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "clownware-code-tools",
"description": "Universal dev workflow skills: architecture/deployment-readiness auditing, security auditing, test-suite auditing, skill auditing, design-system auditing, accessibility auditing, dependency auditing, performance auditing, devops/CI-CD auditing, audit-fix application, plugin releasing, skill validation, ADR authoring, PR descriptions, root-cause debugging, test scaffolding, and GitHits OSS research conventions. Each skill probes the repo it runs in and degrades gracefully. Also ships a git guard hook: blocks --no-verify commits/pushes and secret-scans staged changes (gitleaks, with a pattern fallback) before every commit.",
"version": "0.15.4",
"description": "Universal dev workflow skills: architecture/deployment-readiness auditing, security auditing, test-suite auditing, skill auditing, design-system auditing, accessibility auditing, dependency auditing, performance auditing, devops/CI-CD auditing, audit-fix application, plugin releasing, skill validation, ADR authoring, PR descriptions, root-cause debugging, test scaffolding, and GitHits OSS research conventions. Each skill probes the repo it runs in and degrades gracefully. Also ships a git guard hook: blocks --no-verify commits/pushes and secret-scans staged changes (gitleaks, with a pattern fallback) before every commit. And a format-on-edit dispatcher hook: one process per edit, routed by extension to Biome (biome.json-gated), goimports/gofmt, templ fmt or rustfmt.",
"version": "0.16.0",
"license": "Apache-2.0",
"author": {
"name": "clownware"
Expand Down
91 changes: 91 additions & 0 deletions plugins/code-tools/hooks/format-file.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
#!/usr/bin/env bash
# PostToolUse formatter dispatcher: after Claude edits or writes a file, format
# just that file with the stack's own formatter so the diff never fails the
# project's format gate. One process per edit, routed by extension:
# ts/tsx/js/jsx/mjs/cjs/json/jsonc/css/astro -> Biome, gated on a biome.json
# at or above the file (stopping at the repo root)
# go -> goimports, else gofmt; templ -> templ fmt
# rs -> rustfmt, edition from the nearest Cargo.toml (default 2021)
# Replaces the per-stack format-file.sh hooks that astro-tools, go-tools and
# rust-tools each shipped. Silent no-op for any other extension or when the
# formatter is not installed. Never fails the turn.
set -uo pipefail

payload=$(cat)

if command -v jq >/dev/null 2>&1; then
file=$(printf '%s' "$payload" | jq -r '.tool_input.file_path // empty' 2>/dev/null)
elif command -v python3 >/dev/null 2>&1; then
file=$(printf '%s' "$payload" | python3 -c 'import json,sys
print(json.load(sys.stdin).get("tool_input",{}).get("file_path","") or "")' 2>/dev/null)
else
exit 0
fi
[ -n "$file" ] && [ -f "$file" ] || exit 0

format_biome() {
# Walk up to the nearest biome config, stopping at the repo root.
local dir root=""
dir=$(cd "$(dirname "$file")" && pwd)
while [ -n "$dir" ] && [ "$dir" != "/" ]; do
if [ -f "$dir/biome.json" ] || [ -f "$dir/biome.jsonc" ]; then
root="$dir"
break
fi
[ -d "$dir/.git" ] && break
dir=$(dirname "$dir")
done
[ -n "$root" ] || return 0

cd "$root" || return 0
if [ -x node_modules/.bin/biome ]; then
node_modules/.bin/biome format --write "$file" >/dev/null 2>&1 || true
elif command -v biome >/dev/null 2>&1; then
biome format --write "$file" >/dev/null 2>&1 || true
fi
}

format_rust() {
command -v rustfmt >/dev/null 2>&1 || return 0
# Nearest edition: a crate's own `edition = "20xx"`, else the workspace's
# [workspace.package] edition further up. Stop at the repo root.
local dir edition="" e
dir=$(cd "$(dirname "$file")" && pwd)
while [ -n "$dir" ] && [ "$dir" != "/" ]; do
if [ -f "$dir/Cargo.toml" ]; then
e=$(grep -m1 -oE '^edition *= *"[0-9]{4}"' "$dir/Cargo.toml" 2>/dev/null | grep -oE '[0-9]{4}')
if [ -z "$e" ]; then
e=$(awk '/^\[workspace\.package\]/{f=1;next} /^\[/{f=0} f && /^edition *=/' "$dir/Cargo.toml" 2>/dev/null | grep -m1 -oE '[0-9]{4}')
fi
if [ -n "$e" ]; then
edition="$e"
break
fi
fi
[ -d "$dir/.git" ] && break
dir=$(dirname "$dir")
done
rustfmt --edition "${edition:-2021}" "$file" >/dev/null 2>&1 || true
}

case "$file" in
*.ts|*.tsx|*.js|*.jsx|*.mjs|*.cjs|*.json|*.jsonc|*.css|*.astro)
format_biome
;;
*.go)
if command -v goimports >/dev/null 2>&1; then
goimports -w "$file" >/dev/null 2>&1 || true
elif command -v gofmt >/dev/null 2>&1; then
gofmt -w "$file" >/dev/null 2>&1 || true
fi
;;
*.templ)
if command -v templ >/dev/null 2>&1; then
templ fmt "$file" >/dev/null 2>&1 || true
fi
;;
*.rs)
format_rust
;;
esac
exit 0
11 changes: 11 additions & 0 deletions plugins/code-tools/hooks/hooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@
}
]
}
],
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "\"${CLAUDE_PLUGIN_ROOT}\"/hooks/format-file.sh"
}
]
}
]
}
}
4 changes: 2 additions & 2 deletions plugins/go-tools/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "clownware-go-tools",
"description": "Go + templ + sqlc stack skills: templ component scaffolding, table-driven test scaffolding, sqlc query scaffolding, performance-budget gate checks, and task-ci-aware PR descriptions, following go-performance-starter conventions with fallbacks for other Go projects. Also ships a format-on-edit hook that runs goimports/gofmt and templ fmt on files Claude edits.",
"version": "0.3.3",
"description": "Go + templ + sqlc stack skills: templ component scaffolding, table-driven test scaffolding, sqlc query scaffolding, performance-budget gate checks, and task-ci-aware PR descriptions, following go-performance-starter conventions with fallbacks for other Go projects. Formatting on edit moved to the clownware-code-tools dispatcher hook.",
"version": "0.4.0",
"license": "Apache-2.0",
"author": {
"name": "clownware"
Expand Down
34 changes: 0 additions & 34 deletions plugins/go-tools/hooks/format-file.sh

This file was deleted.

15 changes: 0 additions & 15 deletions plugins/go-tools/hooks/hooks.json

This file was deleted.

4 changes: 2 additions & 2 deletions plugins/rust-tools/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "clownware-rust-tools",
"description": "Rust stack skills: table-driven test scaffolding and CI-aware quality-gate checks (cargo fmt/clippy/test/deny, fuzz targets), following the tunes_protocol and gittunes workspace conventions with fallbacks for other Rust projects. Also ships a format-on-edit hook that runs rustfmt (edition-detected from the nearest Cargo.toml) on files Claude edits.",
"version": "0.1.2",
"description": "Rust stack skills: table-driven test scaffolding and CI-aware quality-gate checks (cargo fmt/clippy/test/deny, fuzz targets), following the tunes_protocol and gittunes workspace conventions with fallbacks for other Rust projects. Formatting on edit moved to the clownware-code-tools dispatcher hook.",
"version": "0.2.0",
"license": "Apache-2.0",
"author": {
"name": "clownware"
Expand Down
Loading
Loading