Skip to content

docs(assets): tell the scaffolded CLAUDE.md how to run scc without installing it - #5

Merged
protonspy merged 1 commit into
mainfrom
docs/scaffolded-claude-md-npx
Aug 1, 2026
Merged

protonspy merged 1 commit into
mainfrom
docs/scaffolded-claude-md-npx

Conversation

@protonspy

@protonspy protonspy commented Aug 1, 2026 •

Copy link
Copy Markdown
Owner

What

The CLAUDE.md that scc init writes into a workspace documented checking your
work as a bare scc validate. In any project where the binary was never
installed that instruction dead-ends: the agent reads it, the command is not on
PATH, and the check quietly stops happening.

Adds the npx fallback right under the command it replaces — same binary, same
exit codes — plus the pinned form for CI:

npx @protonspy/scc validate       # always the latest
npx @protonspy/scc@<version> ...  # pin a version (CI)

Kept to four lines and placed inline rather than as a new section: the file
carries an explicit brevity requirement, and this belongs next to the command,
not in a section of its own.

Template version

assets.Version goes 2 → 3. A workspace template changed, so the manifest
has to be able to distinguish a pristine copy of the new text from an edited
copy of the old one.

Checks

go test ./..., gofmt -l, and go vet ./... are clean.
TestFreshArtifactsPassTheirOwnValidators still passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RirmHfmNmKTatfRVFhvm7o

Summary by CodeRabbit

  • Documentation
    • Added guidance for running validation through npx when the standard command is unavailable.
    • Documented options to use either the latest release or a specific version.

…stalling it

The scaffolded CLAUDE.md pointed at a bare `scc validate`, which is a dead end
in any workspace where the binary was never installed — the agent reads the
instruction, the command is not on PATH, and the check silently stops happening.
Document the npx fallback next to the command it replaces, including the pinned
form for CI.

Bumps the template-set version to 3: a workspace template changed, so the
manifest must be able to tell a pristine copy of the new text from an edited
copy of the old one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RirmHfmNmKTatfRVFhvm7o
@coderabbitai

coderabbitai Bot commented Aug 1, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The template documents npx fallback commands for scc validate. The template-set version changes from 2 to 3.

Changes

Template documentation

Layer / File(s) Summary
Document npx fallback and version update
internal/assets/templates/CLAUDE.md, internal/assets/assets.go
CLAUDE.md adds latest and pinned npx commands for scc validate. assets.go increments the template-set version to 3.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: documenting an npx fallback for running scc in the scaffolded CLAUDE.md.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/scaffolded-claude-md-npx

Comment @coderabbitai help to get the list of available commands.

@protonspy
protonspy merged commit 1bb7602 into main Aug 1, 2026
4 of 5 checks passed
@protonspy
protonspy deleted the docs/scaffolded-claude-md-npx branch August 1, 2026 04:28

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@internal/assets/templates/CLAUDE.md`:
- Line 45: Add a language identifier to the fenced code block in CLAUDE.md,
using console or sh as appropriate, while preserving the existing command
examples unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c0b15efd-b8f5-4026-971f-77a05b1cebfb

📥 Commits

Reviewing files that changed from the base of the PR and between 5f38516 and 30dc1c0.

📒 Files selected for processing (2)
  • internal/assets/assets.go
  • internal/assets/templates/CLAUDE.md

If `scc` is not installed on this machine, run it with no install — same binary,
same exit codes:

```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add a language identifier to the fenced block.

Line 45 triggers markdownlint MD040. Use console or sh.

Proposed fix
-```
+```console
 npx `@protonspy/scc` validate       # always the latest
 npx `@protonspy/scc`@<version> ...  # pin a version (CI)
🧰 Tools
🪛 markdownlint-cli2 (0.23.1)

[warning] 45-45: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/assets/templates/CLAUDE.md` at line 45, Add a language identifier to
the fenced code block in CLAUDE.md, using console or sh as appropriate, while
preserving the existing command examples unchanged.

Source: Linters/SAST tools

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.

1 participant