Marketplace alignment, living-config loop, 2 agents + 3 daily skills#5
Merged
Merged
Conversation
…tion
Two macOS (BSD grep) gaps in scan-secrets.sh let real secrets through:
1. \x27 is not interpreted as a single-quote by BSD grep, so the char
classes ["\x27] degraded to a literal set {" \ x 2 7}. Single-quoted
credentials (password = 'value') slipped past, and double-quoted values
containing 2/7 were truncated below the length threshold. Replaced with
the portable '\'' form yielding the class ["'].
2. sk-[a-zA-Z0-9]{20,} broke at the first hyphen, so modern Anthropic keys
(sk-ant-api03-...) were never matched. Allowed hyphens in the class.
Adds 10 scan-secrets fixtures (hook previously had no test coverage).
Full suite: 46 passed, 0 failed.
- marketplace.json: adopt anthropics/skills pattern (source "./" + strict:false component arrays), add $schema, category, keywords, owner email; delete plugins/ mirrors and scripts/sync-plugins.sh - New safety-hooks plugin (hooks/hooks.json) packaging the four PreToolUse guards for one-command install - Split CLAUDE.md: real repo instructions at root, shipped template moved to CLAUDE.template.md; setupdotclaude copies from plugin root - settings.json: fix hook timeouts (seconds, not ms), wire notify.sh and auto-test.sh, scope SessionStart matcher - Remove context-recovery.sh (Claude Code re-injects CLAUDE.md/rules after compaction natively) - Rules: drop non-standard alwaysApply frontmatter (no paths: = always loaded per official .claude/rules spec) - Tests: +19 fixtures covering warn-large-files, format-on-save, session-start, auto-test, notify (65 total, all passing) - CI: ci.yml replaces hook-tests.yml, adds claude plugin validate --strict job; docs updated (README tree, CONTRIBUTING, rules/hooks READMEs, format-on-save auto-detection) Verified: claude plugin validate . --strict passes; end-to-end marketplace add + install of safety-hooks/code-reviewer/explain in isolated HOME succeeds.
The skill previously copied the entire kit into .claude/ and trimmed a few files afterward. Now it works additively: - Phase 1 deep scan goes beyond manifests: reads real source and test files (naming, error handling, assertion style), detects monorepos, existing AI configs (.cursorrules, AGENTS.md, copilot-instructions) to migrate, git workflow, and domain language from docs - Phase 2 structured interview (batched AskUserQuestion, multiSelect): confirm detection, monorepo focus, setup size (Minimal / Standard / Full / pick), justified-only skill and hook choices with plain cost/impact warnings (e.g. auto-test runs on every edit) - Phase 3 install-plan manifest: every component needs evidence (hard mapping table) and approval; settings.json is generated to wire only installed hooks and only real project commands - Phase 4 applies exactly the plan: per-file copy in fresh mode, gap analysis (add missing / propose removing unjustified) on existing .claude/; never clobbers user edits without showing the diff - Phase 5 verify: CLAUDE.md line budget, always-loaded token estimate, mechanical checks, installed/skipped/customized summary 282 -> 145 lines. README, skills/README, and marketplace description updated to match. claude plugin validate --strict passes.
…e "./" claude plugin details exposed that source "./" made default component discovery load ALL skills/agents (even agents/README.md) into every plugin (~604 always-on tokens each). Restore plugins/<name>/ dirs, but as relative symlinks into the top-level dirs — Claude Code dereferences marketplace-internal symlinks at install, so single source of truth is kept with no sync script. - plugins/<name>/: generated plugin.json ($schema, semver 2.0.0, metadata matching marketplace entry) + component symlinks - hooks/hooks.json moved into plugins/safety-hooks/hooks/ with script symlinks; setupdotclaude regains template/ (all symlinks, incl. template/CLAUDE.md -> CLAUDE.template.md) - marketplace entries back to source "./plugins/<name>", strict mode, no component arrays; versions live only in plugin.json - CI also strict-validates each plugin dir; docs updated (CLAUDE.md, CONTRIBUTING, README, hooks/README, setupdotclaude SKILL paths)
Drift loop (keeps the setup tuned across daily iteration):
- session-start.sh gains a manifest fingerprint: DOTCLAUDE_FINGERPRINT=1
prints {setup_date, manifest_hash} (package.json scripts via jq -S,
other manifests wholesale, POSIX cksum)
- /setupdotclaude Phase 5 writes .claude/.dotclaude.json at the end of
setup; session-start then emits a one-line "config drift" nudge only
when the manifests change — zero tokens otherwise
- skill closes with an explicit re-run cadence; re-runs are gap
analyses, not reinstalls
- 3 new fixtures (fingerprint mode, drift detected, no-drift silent)
with data/ meta files; 68 tests total
Token efficiency (enforced, not aspirational):
- new CI token-budget job: fails PRs pushing always-loaded content
(CLAUDE.template.md + rules without paths:) past ~1200 est. tokens
(currently ~950)
- trimmed the two heaviest skill descriptions (context-budget 302->190,
setupdotclaude 204->140 chars) — descriptions load in every session's
skill listing
- README "Keep it tuned" section; hooks/README + CONTRIBUTING updated
…tions
Agents:
- All 5 descriptions rewritten as delegation triggers ("Use after/when
...") — the description is the surface the main agent delegates on
- New silent-failure-hunter: swallowed errors, failures masked as
success, fallback values hiding breakage, floating promises, retries
that never surface (archetype from official pr-review-toolkit)
- New pr-test-analyzer: test critique, not generation — assertion-free
tests, mock theater, tests that cannot fail, weakened assertions
- frontend-designer: states plan before writing, smallest
interpretation, mixed-CSS tiebreaker
pr-review: six-specialist dispatch table, concrete Agent() call syntax,
per-finding confidence scores with 90+/80-89 buckets, deconfliction
rules for overlapping fixes, allowed-tools for gh/git
Skills:
- New /catchup: rebuild context after /clear (handoff note + branch
state); `handoff` mode writes .claude/HANDOFF.md at session end
- New /claude-md: capture session learnings into CLAUDE.md (confirmed,
one line each) or `audit` for stale commands and bloat; enforces the
25/50 budget
- New /fix-issue: gh issue thread -> reproduce -> fix + regression test
-> acceptance criteria -> PR with Fixes #N
- /refactor --diff: pre-commit simplify pass scoped to the working diff
- /ship Step 5: prune local branches whose remotes are gone (-d only)
- test-writer: sharper auto-trigger criteria + allowed-tools
Distribution: 5 new plugins (1.0.0) with symlinked dirs; 10 changed
plugins bumped to 2.1.0; CI gains a reviewer-contract drift guard
(confidence threshold + required sections in all 6 reviewers); READMEs,
structure tree, and setupdotclaude evidence table updated. 20 plugins
total, all strict-validated; 68 hook tests pass; budget ~950/1200.
claude plugin details showed Agents (0) for every agent plugin: the
component scanner skips symlinked .md FILES (while following symlinked
skill DIRECTORIES; install cache dereferenced both correctly). Verified
with a minimal two-plugin experiment: real file -> Agents (1), file
symlink -> Agents (0), dir symlink containing a real file -> Agents (1).
Fix: agents/<name>/<name>.md (real files, still single source of truth)
and plugins/<name>/agents -> ../../agents/<name> directory symlinks.
Official docs confirm .claude/agents/ and plugin agents/ are scanned
recursively with identity from the name frontmatter field, so the
nested layout is safe for clone users and the template.
Updated: CI contract-guard paths, setupdotclaude mapping table + copy
example, agents/README, root README tree, CONTRIBUTING symlink rule
("always symlink directories, never .md files").
Unquoted ': ' inside YAML scalars broke frontmatter parsing for security-reviewer, doc-reviewer, and silent-failure-hunter — at runtime the agent would load with empty metadata (no description = never delegated to). Hidden until now because the old file symlinks were skipped by the component scanner entirely; the dir-symlink restructure made per-plugin validation actually parse agent frontmatter.
- skills/README: test-writer trigger criteria match its frontmatter - CONTRIBUTING: agents file-requirements row reflects dir-per-agent layout and delegation-trigger description requirement - marketplace + plugin.json for ship (branch cleanup) and refactor (--diff mode) mention their new capabilities
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 33922463 | Triggered | GitHub Personal Access Token | 7e52a9c | hooks/tests/fixtures/scan-secrets/07-block-github-token.json | View secret |
| 33922464 | Triggered | PostgreSQL Credentials | 7e52a9c | hooks/tests/fixtures/scan-secrets/09-block-conn-string-creds.json | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
poshan0126
added a commit
that referenced
this pull request
Jun 12, 2026
GitGuardian flagged the scan-secrets test fixtures on PR #5. They are the deliberate attack samples that prove the hook blocks secrets — nothing real. Make that machine- and human-obvious: - .gitguardian.yaml ignores hooks/tests/fixtures/** - conn-string fixture now uses fake_user:fake_password_for_tests@localhost (the GitHub-token fixture already uses an alphabet token) - CONTRIBUTING: fixture fakes must be unambiguous; never a real credential, even revoked
1 task
pull Bot
pushed a commit
to minhazul-ashim/dotclaude
that referenced
this pull request
Jun 12, 2026
GitGuardian flagged the scan-secrets test fixtures on PR poshan0126#5. They are the deliberate attack samples that prove the hook blocks secrets — nothing real. Make that machine- and human-obvious: - .gitguardian.yaml ignores hooks/tests/fixtures/** - conn-string fixture now uses fake_user:fake_password_for_tests@localhost (the GitHub-token fixture already uses an alphabet token) - CONTRIBUTING: fixture fakes must be unambiguous; never a real credential, even revoked
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
Ten commits taking dotclaude from "good reference kit" to the most rigorously engineered minimal Claude Code kit, aligned with Anthropic's official marketplace standard end to end.
Marketplace & architecture
agents/<name>/<name>.mdwith directory symlinks after discovering the component scanner silently skips symlinked.mdfiles (proven by minimal experiment; cache was fine, inventory wasn't).$schema,category,keywords, owner email on all 20 entries; semver in every plugin.json (validator requires it under--strict).CLAUDE.mdsplit: real repo instructions at root; the shipped user template is nowCLAUDE.template.md.Fixes
timeoutunits corrected (schema reads seconds; 5000 was an 83-minute timeout).notify.shandauto-test.shwired; broken inline Notification one-liner replaced;SessionStartscoped tostartup|resume|clear.context-recovery.shremoved (Claude Code re-injects CLAUDE.md/rules after compaction natively).alwaysApplyrule frontmatter dropped (nopaths:= always loaded, per official spec).:in YAML — frontmatter failed to parse, agent would load with empty metadata. Quoted.New capabilities
/setupdotclauderebuilt: deep scan (reads real source/test files, monorepos, existing AI configs) → interview → evidence-based install plan; installs nothing without evidence and consent. Gap-analysis mode on existing setups. 282→145 lines.session-start.shemits a one-line drift nudge only when the stack changes.silent-failure-hunter(swallowed errors, failures masked as success) andpr-test-analyzer(assertion-free tests, mock theater, tests that can't fail)./catchup(+ handoff notes),/claude-md(capture learnings / audit staleness),/fix-issue(gh issue → tested fix → PR withFixes #N)./refactor --diff(pre-commit simplify pass),/shipbranch cleanup, six-specialist/pr-reviewwith confidence buckets and deconfliction; all 7 agent descriptions rewritten as delegation triggers.safety-hooksplugin: the four PreToolUse guards installable with one command.CI & tests
ci.yml: hook fixtures (Linux+macOS),claude plugin validate --strictfor marketplace + each plugin dir, a 1200-token always-loaded budget gate (currently ~950), and a reviewer-contract drift guard.Test plan
bash hooks/tests/run-all.sh— 68/68 on macOS (CI repeats on Linux)claude plugin validate . --strict+ all 20 plugin dirsAgents (1), every skill pluginSkills (1), safety-hooks its PreToolUse group; setupdotclaude cache contains every path the skill references--plugin-dir:/setupdotclauderuns its scan and interviews before installing;node_modules/Write blocked live with the hook's exact deny reason