Skip to content
Open
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: 8 additions & 0 deletions claude-marketplace/plugins/code-quality/commands/size.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,18 @@ 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 <branch-name>` -- review a specific local branch
- `/code-quality:size <scope> --exclude <pattern>` -- review the scope while
treating the pattern as a CLI-supplied exclusion for size calculations

## Instructions

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 <pattern>`, 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.
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand All @@ -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 <pattern>`
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:

Expand Down