Skip to content

Publish as marketplace; token-discipline pass#3

Merged
poshan0126 merged 2 commits into
mainfrom
feat/marketplace-and-token-discipline
May 5, 2026
Merged

Publish as marketplace; token-discipline pass#3
poshan0126 merged 2 commits into
mainfrom
feat/marketplace-and-token-discipline

Conversation

@PoshanP

@PoshanP PoshanP commented May 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Two big shifts:

  1. dotclaude is now publishable as a Claude Code plugin marketplace. Adds .claude-plugin/marketplace.json listing 14 plugins (5 reviewer agents + 9 workflow skills, including a new /context-budget skill). Each plugin lives self-contained under plugins/<name>/. The new setupdotclaude plugin bundles the full template inside it so /plugin install setupdotclaude@dotclaude then /setupdotclaude bootstraps .claude/ end-to-end without a clone.

  2. 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-review now fans out to specialist reviewers in parallel via the Task tool. Reviewers default to terse output (file:line: issue (fix: hint)) with a verbose opt-in. /explain defaults to tldr (summary + analogy). format-on-save.sh and auto-test.sh are silent on success. session-start.sh slimmed to branch + dirty/clean by default with DOTCLAUDE_SESSION_VERBOSE=1 for the full payload. CLAUDE.md size budget enforced in setupdotclaude Phase 4 (target <25 non-blank lines, hard cap 50). /debug-fix absorbs /hotfix as a --fast flag (one skill instead of two).

What changed

New

  • .claude-plugin/marketplace.json (14 plugins)
  • plugins/<name>/ self-contained folders for each agent/skill
  • plugins/setupdotclaude/template/ bundled full dotclaude template
  • skills/context-budget/SKILL.md (new skill, factual token estimates via chars/4 heuristic or Anthropic count_tokens API 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 budget
  • pr-review: parallel Task dispatch instead of sequential delegation
  • 4 reviewer agents: terse-by-default output, verbose opt-in
  • debug-fix: now handles both careful flow (default) and emergency hotfix flow (--fast); /hotfix removed
  • explain: tldr default (summary + analogy); verbose adds ASCII diagram, key details, modification guide
  • code-quality.md, testing.md: alwaysApply rules tightened to anti-Claude-tendency content only
  • format-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 var
  • All 5 reviewer prompts trimmed (categories preserved)
  • README rewritten with marketplace-first install path; clone path moved to Option 2

Cleanup

  • Global em-dash sweep: 0 em-dashes anywhere in the repo (was ~150+ across the codebase)
  • All 4 README files refreshed (root, agents/, skills/, hooks/, rules/)
  • CONTRIBUTING.md updated to reflect marketplace-aware contribution flow

Test plan

  • /plugin marketplace add poshan0126/dotclaude succeeds in a fresh Claude Code session
  • /plugin install code-reviewer@dotclaude installs cleanly
  • /plugin install setupdotclaude@dotclaude then /setupdotclaude in an empty test project bootstraps .claude/ from the bundled template (verifies \$CLAUDE_PLUGIN_ROOT resolution in skill bodies)
  • /setupdotclaude Phase 4 hard-cap CLAUDE.md check fires correctly when CLAUDE.md exceeds 50 non-blank lines
  • protect-files.sh blocks an attempt to edit .env
  • /pr-review on a small diff dispatches multiple reviewer Task calls in a single message (parallel, not sequential)
  • Default /pr-review output is terse one-liners; /pr-review verbose returns the full multi-field block
  • /context-budget reports the current .claude/ budget; /context-budget --api returns Anthropic-tokenizer counts when \$ANTHROPIC_API_KEY is set
  • /debug-fix --fast <issue> creates a hotfix/* branch and a [HOTFIX] PR
  • format-on-save.sh and auto-test.sh produce zero stdout when their success conditions are met (already verified locally with synthetic JSON)

🤖 Generated with Claude Code

PoshanP and others added 2 commits May 5, 2026 15:07
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>
@poshan0126
poshan0126 merged commit c3e5cea into main May 5, 2026
3 checks passed
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.

2 participants