diff --git a/claude-marketplace/plugins/code-quality/commands/size.md b/claude-marketplace/plugins/code-quality/commands/size.md index cfb8ea9..5f63bb2 100644 --- a/claude-marketplace/plugins/code-quality/commands/size.md +++ b/claude-marketplace/plugins/code-quality/commands/size.md @@ -11,6 +11,8 @@ Run the `size-review` skill against the specified target. - `/code-quality:size` -- review the current branch against its base - `/code-quality:size PR` or `/code-quality:size #123` -- review a pull request - `/code-quality:size ` -- review a specific local branch +- `/code-quality:size --exclude ` -- review the scope while + treating the pattern as a CLI-supplied exclusion for size calculations ## Instructions @@ -18,3 +20,9 @@ Invoke the `size-review` skill with the user's specified scope. If no scope is given, default to the current branch against its merge-base with the trunk (`origin/main` or whatever the project's trunk is). Pass any arguments the user provided as the scope for the review. + +If the invocation includes `--exclude `, pass the pattern to the +`size-review` skill as a CLI-supplied exclusion. CLI-supplied exclusions augment +the bundled defaults, repo-local `.code-quality/size-review-exclude`, and +`.gitattributes` generated-file exclusions. Quote patterns containing spaces in +the invocation so the pattern boundary is unambiguous. diff --git a/claude-marketplace/plugins/code-quality/skills/size-review/SKILL.md b/claude-marketplace/plugins/code-quality/skills/size-review/SKILL.md index 758f33c..87d6ef9 100644 --- a/claude-marketplace/plugins/code-quality/skills/size-review/SKILL.md +++ b/claude-marketplace/plugins/code-quality/skills/size-review/SKILL.md @@ -147,7 +147,7 @@ dependencies. Exclude them from the threshold check, the seam analysis, and the file counts. **Report them separately** so reviewers know they were considered (transparency, not silent dropping). -Build the exclusion glob list from up to three sources, in this order: +Build the exclusion glob list from these sources, in this order: 1. **Bundled universal defaults** — read `${CLAUDE_PLUGIN_ROOT}/skills/size-review/references/default-exclusions.md`. @@ -162,6 +162,10 @@ Build the exclusion glob list from up to three sources, in this order: 3. **`.gitattributes` `linguist-generated=true`** — if the repo marks files as generated via the GitHub linguist attribute, honor that. Optional convenience layer. +4. **invocation-supplied `--exclude` patterns** — include every `--exclude ` + passed to the size-review command invocation. These augment the bundled + defaults, repo-local `.code-quality/size-review-exclude`, and `.gitattributes` + generated-file exclusions. After resolving the union of globs, partition the diff file list: