Publish as marketplace; token-discipline pass#3
Merged
Conversation
NEW - Plugin marketplace catalog (.claude-plugin/marketplace.json) with 14 plugins: 5 reviewer agents + 9 workflow skills. - Self-contained plugin folders (plugins/<name>/) mirroring each source agent or skill, with per-plugin .claude-plugin/plugin.json. - /context-budget skill estimates per-turn token cost of .claude/ + CLAUDE.md, classifying always-loaded vs path-scoped vs invoked- only and ranking top contributors. Default uses Anthropic's documented chars/4 heuristic; --api flag uses count_tokens API. - LICENSE (MIT). - scripts/sync-plugins.sh mirrors agents/ and skills/ into plugin folders and bundles the full template inside setupdotclaude so the plugin install path can bootstrap .claude/ end-to-end. CHANGED - /setupdotclaude bootstraps .claude/ from the bundled template if missing (Phase Init), then customizes per project. Phase 4 enforces a hard CLAUDE.md size budget (target <25 non-blank lines, hard cap 50). Phase 0 cleanup expanded to remove marketplace cruft (.claude-plugin/, plugins/, scripts/). - /pr-review fans out to specialist reviewers in parallel via Task tool calls in a single message instead of sequential. - All four reviewer agents default to terse output (file:line: issue (fix: hint)). Add `verbose`, `full report`, or `detailed` to the prompt for the full multi-field block. - /debug-fix absorbs /hotfix as a `--fast` mode. /hotfix removed. - /explain defaults to tldr (summary + mental model). Add `verbose` for ASCII diagram, key details, modification guide. - alwaysApply rules audited and trimmed: code-quality.md -38% tokens, testing.md -15% tokens. Always-loaded total drops from ~592 to ~400 tokens per turn. - Reviewer agent prompts trimmed: -1258 tokens cumulative across the five, with all categories preserved. - session-start.sh slimmed to branch + dirty/clean by default. Last commit, file count, stash count, and PR info gated behind DOTCLAUDE_SESSION_VERBOSE=1. - format-on-save.sh and auto-test.sh now silent on success (formatter stdout suppressed; test output captured and emitted only on failure with default reporters). - README rewritten with marketplace-first install flow; clone path moved to Option 2. CLEANUP - Global em-dash sweep: 0 em-dashes anywhere in the repo. - All README files (root, agents/, skills/, hooks/, rules/, CONTRIBUTING.md) refreshed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Resolves 12 conflicts from main's PR #2 (hook hardening + tests + agent tightening) against this branch's marketplace + token-discipline work. Resolution rules: - agents/ (5 files), skills/setupdotclaude/SKILL.md, README.md, agents/README.md, hooks/README.md: kept ours. This branch's rewrites (operating principles, terse-by-default with verbose mode, Phase Init bootstrap, Phase 4 budget enforcement, marketplace-first README) are supersets of main's wording polishes. - hooks/protect-files.sh, hooks/block-dangerous-commands.sh: kept theirs (main's hardened logic) and re-applied em-dash strip to comments. - .gitignore: merged both additions (.devswarm-temp/ + the new hooks/*.html web-page-save patterns). - Auto-merged files (CONTRIBUTING.md, rules/README.md) had em-dashes reintroduced from main; re-stripped. New from main, untouched: - .github/workflows/hook-tests.yml (CI for hook tests) - hooks/tests/ (test fixtures + run-all.sh runner) Bundled template (plugins/setupdotclaude/template/) re-synced so the plugin install path picks up main's hardened hooks. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two big shifts:
dotclaude is now publishable as a Claude Code plugin marketplace. Adds
.claude-plugin/marketplace.jsonlisting 14 plugins (5 reviewer agents + 9 workflow skills, including a new/context-budgetskill). Each plugin lives self-contained underplugins/<name>/. The newsetupdotclaudeplugin bundles the full template inside it so/plugin install setupdotclaude@dotclaudethen/setupdotclaudebootstraps.claude/end-to-end without a clone.Token-discipline pass aligned with the daily-iterative-work mission. Always-loaded content drops from ~592 to ~400 tokens per turn. Reviewer agents trim ~1,258 tokens cumulative.
/pr-reviewnow fans out to specialist reviewers in parallel via the Task tool. Reviewers default to terse output (file:line: issue (fix: hint)) with averboseopt-in./explaindefaults to tldr (summary + analogy).format-on-save.shandauto-test.share silent on success.session-start.shslimmed to branch + dirty/clean by default withDOTCLAUDE_SESSION_VERBOSE=1for the full payload. CLAUDE.md size budget enforced insetupdotclaudePhase 4 (target <25 non-blank lines, hard cap 50)./debug-fixabsorbs/hotfixas a--fastflag (one skill instead of two).What changed
New
.claude-plugin/marketplace.json(14 plugins)plugins/<name>/self-contained folders for each agent/skillplugins/setupdotclaude/template/bundled full dotclaude templateskills/context-budget/SKILL.md(new skill, factual token estimates viachars/4heuristic or Anthropiccount_tokensAPI with--api)scripts/sync-plugins.sh(mirrors agents/skills into plugin folders + bundles template)LICENSE(MIT)Changed
setupdotclaude: Phase Init bootstraps.claude/from bundled template if missing; Phase 0 cleans up marketplace cruft on top of repo cruft; Phase 4 enforces hard CLAUDE.md size budgetpr-review: parallel Task dispatch instead of sequential delegationverboseopt-indebug-fix: now handles both careful flow (default) and emergency hotfix flow (--fast);/hotfixremovedexplain: tldr default (summary + analogy);verboseadds ASCII diagram, key details, modification guidecode-quality.md,testing.md: alwaysApply rules tightened to anti-Claude-tendency content onlyformat-on-save.sh: redirects formatter stdout/stderr (silent on success)auto-test.sh: captures test output, only emits on failure (silent on success)session-start.sh: minimal branch+dirty default; verbose payload behind env varCleanup
Test plan
/plugin marketplace add poshan0126/dotclaudesucceeds in a fresh Claude Code session/plugin install code-reviewer@dotclaudeinstalls cleanly/plugin install setupdotclaude@dotclaudethen/setupdotclaudein an empty test project bootstraps.claude/from the bundled template (verifies\$CLAUDE_PLUGIN_ROOTresolution in skill bodies)/setupdotclaudePhase 4 hard-cap CLAUDE.md check fires correctly whenCLAUDE.mdexceeds 50 non-blank linesprotect-files.shblocks an attempt to edit.env/pr-reviewon a small diff dispatches multiple reviewer Task calls in a single message (parallel, not sequential)/pr-reviewoutput is terse one-liners;/pr-review verbosereturns the full multi-field block/context-budgetreports the current.claude/budget;/context-budget --apireturns Anthropic-tokenizer counts when\$ANTHROPIC_API_KEYis set/debug-fix --fast <issue>creates ahotfix/*branch and a[HOTFIX]PRformat-on-save.shandauto-test.shproduce zero stdout when their success conditions are met (already verified locally with synthetic JSON)🤖 Generated with Claude Code