Skip to content
Merged
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
93 changes: 93 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"name": "dotclaude",
"owner": {
"name": "poshan0126"
},
"description": "Lean, token-efficient agents and skills for daily Claude Code development. Install the whole kit by cloning the repo, or pick individual plugins from this marketplace.",
"plugins": [
{
"name": "code-reviewer",
"source": "./plugins/code-reviewer",
"description": "Reviews code for real bugs: off-by-ones, null derefs, race conditions, swallowed errors. Skips style nitpicks.",
"license": "MIT"
},
{
"name": "security-reviewer",
"source": "./plugins/security-reviewer",
"description": "OWASP-style review: injection, auth, data exposure, weak crypto. Severity-ranked with file:line + fix.",
"license": "MIT"
},
{
"name": "performance-reviewer",
"source": "./plugins/performance-reviewer",
"description": "Finds real bottlenecks. DB N+1, memory leaks, blocking calls, re-renders.",
"license": "MIT"
},
{
"name": "doc-reviewer",
"source": "./plugins/doc-reviewer",
"description": "Cross-references docs against actual source. Flags drift, missing params, dead references.",
"license": "MIT"
},
{
"name": "frontend-designer",
"source": "./plugins/frontend-designer",
"description": "Builds production-grade UI. Tokens-first, anti-AI-slop aesthetics, design tokens enforced.",
"license": "MIT"
},
{
"name": "setupdotclaude",
"source": "./plugins/setupdotclaude",
"description": "Bootstrap and customize dotclaude in any project. Copies the full template into .claude/ if missing, then tunes every config file to match your stack.",
"license": "MIT"
},
{
"name": "debug-fix",
"source": "./plugins/debug-fix",
"description": "Find and fix a bug. Default is the careful path (reproduce, investigate, test). Add `--fast` for emergency hotfix mode.",
"license": "MIT"
},
{
"name": "ship",
"source": "./plugins/ship",
"description": "Commit, push, create PR with confirmation at every step. Blocks secrets and force-push.",
"license": "MIT"
},
{
"name": "pr-review",
"source": "./plugins/pr-review",
"description": "Review PR or staged changes via specialist agents. Synthesizes a unified severity-ranked report.",
"license": "MIT"
},
{
"name": "tdd",
"source": "./plugins/tdd",
"description": "Strict red-green-refactor TDD loop. Failing test, then minimum code, then refactor. Commits after each cycle.",
"license": "MIT"
},
{
"name": "explain",
"source": "./plugins/explain",
"description": "Explain code with one-sentence summary, mental model, ASCII diagram, and modification guide.",
"license": "MIT"
},
{
"name": "refactor",
"source": "./plugins/refactor",
"description": "Safely refactor with tests as a safety net. Writes tests first if none exist.",
"license": "MIT"
},
{
"name": "test-writer",
"source": "./plugins/test-writer",
"description": "Write comprehensive tests covering happy/edge/error/concurrency paths. Verifies tests actually catch bugs.",
"license": "MIT"
},
{
"name": "context-budget",
"source": "./plugins/context-budget",
"description": "Estimate per-turn token cost of your .claude/ configuration and CLAUDE.md. Always-loaded vs path-scoped vs invoked-only, with top contributors. Use --api for exact counts.",
"license": "MIT"
}
]
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Thumbs.db
# Editor artifacts
*.swp
*~
.devswarm-temp/

# Accidental web-page saves
hooks/*.html
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.local.md.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Personal Overrides

> Rename this to CLAUDE.local.md — it's gitignored and won't be shared with the team.
> Rename this to CLAUDE.local.md. It's gitignored and won't be shared with the team.

## My Preferences

Expand Down
12 changes: 6 additions & 6 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Project Instructions

> REPLACE: Customize this file for your project. Delete sections that don't apply — every line costs tokens. Code style lives in .claude/rules/code-quality.mddon't duplicate here. Run `/setupdotclaude` to auto-customize, or edit manually and delete all `> REPLACE:` blocks when done.
> REPLACE: Customize this file for your project. Delete sections that don't apply. Every line costs tokens. Code style lives in `.claude/rules/code-quality.md`, don't duplicate here. Run `/setupdotclaude` to auto-customize, or edit manually and delete all `> REPLACE:` blocks when done. Target: under 25 non-blank lines after customization. Hard cap: 50.

## Commands

Expand All @@ -23,12 +23,12 @@ npm run dev # start dev server

## Architecture

> REPLACE: Describe non-obvious architectural decisions. Don't list files Claude can explore.
> REPLACE: Describe non-obvious architectural decisions. Don't list files; Claude can explore.

- `src/` — application source
- `src/api/`REST endpoints (versioned: `/v1/`)
- `src/services/` — business logic (no direct DB access from controllers)
- `src/models/` — data models and types
- `src/`. Application source.
- `src/api/`. REST endpoints (versioned: `/v1/`).
- `src/services/`. Business logic (no direct DB access from controllers).
- `src/models/`. Data models and types.

## Key Decisions

Expand Down
93 changes: 52 additions & 41 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
# Contributing to dotclaude

Thanks for wanting to make this better. This project aims to be the standard `.claude/` folder structure — contributions that help more developers ship faster are welcome.
Thanks for wanting to make this better. This project aims to be the standard `.claude/` folder structure. Contributions that help more developers ship faster are welcome.

## Before You Contribute
## Before you contribute

- Check existing issues and open PRs to avoid duplicate work
- For large changes (new skills, new agents, restructuring), open an issue first to discuss the approach
- Check existing issues and open PRs to avoid duplicate work.
- For large changes (new skills, new agents, restructuring), open an issue first to discuss the approach.

## What We're Looking For
## What we're looking for

**Yes, please:**
- Bug fixes in hook scripts
- Improvements to existing rules, skills, or agents that make them more effective
- New skills for common daily workflows (not project-creation workflows)
- New agents for common review/analysis tasks
- Better token efficiency — same quality, fewer tokens
- New agents for common review or analysis tasks
- Better token efficiency. Same quality, fewer tokens.
- Documentation improvements

**Probably not:**
- Language-specific rules — Claude already knows standard conventions
- Plugin integrations — this repo is deliberately plugin-free
- Project scaffolding skills — this is for daily work, not project creation
- Language-specific rules. Claude already knows standard conventions.
- Project scaffolding skills. This repo is for daily work, not project creation.
- Vendor-specific configurations (specific CI providers, cloud platforms, etc.)

## PR Rules
> Plugin packaging is welcome. Dotclaude itself ships as a marketplace (see the main README). Improvements to `marketplace.json`, the per-plugin `plugin.json` files, or `scripts/sync-plugins.sh` count as documentation improvements.

## PR rules

### One thing per PR

Each PR should do exactly one thing. Don't bundle a new skill with a rule fix with a README update. Split them.
Each PR should do exactly one thing. Don't bundle a new skill with a rule fix and a README update. Split them.

### File requirements

Expand All @@ -36,68 +37,78 @@ Each PR should do exactly one thing. Don't bundle a new skill with a rule fix wi
| **Rules** (`.md` in `rules/`) | `alwaysApply: true` or `paths:` frontmatter | Language-specific conventions Claude already knows |
| **Skills** (`SKILL.md`) | `name`, `description` in frontmatter | Hardcoded package names, model assignments |
| **Agents** (`.md` in `agents/`) | `name`, `description`, `tools` in frontmatter | `model` field (users choose their own model) |
| **Hooks** (`.sh` in `hooks/`) | `jq` availability check, proper exit codes (0=allow, 2=block) | Hardcoded paths, missing `#!/bin/bash` |
| **Hooks** (`.sh` in `hooks/`) | `jq` availability check, proper exit codes (0 = allow, 2 = block) | Hardcoded paths, missing `#!/bin/bash` |

### Naming

- Skill directories: `kebab-case``debug-fix/`, `test-writer/`
- Agent files: `kebab-case.md``code-reviewer.md`, `security-reviewer.md`
- Rule files: `kebab-case.md``code-quality.md`, `frontend.md`
- Hook scripts: `kebab-case.sh``protect-files.sh`, `block-dangerous-commands.sh`
- Skill directories: `kebab-case`. `debug-fix/`, `test-writer/`.
- Agent files: `kebab-case.md`. `code-reviewer.md`, `security-reviewer.md`.
- Rule files: `kebab-case.md`. `code-quality.md`, `frontend.md`.
- Hook scripts: `kebab-case.sh`. `protect-files.sh`, `block-dangerous-commands.sh`.

### No duplication

Before adding content, check that it's not already covered elsewhere:

- If a hook enforces it, don't also add a rule saying the same thing
- If a skill covers it, don't duplicate the guidance in a rule
- If `CLAUDE.md` says it, don't repeat it in a rule
- Agents run isolated and CAN repeat rule content (they don't see rules)
- If a hook enforces it, don't also add a rule saying the same thing.
- If a skill covers it, don't duplicate the guidance in a rule.
- If `CLAUDE.md` says it, don't repeat it in a rule.
- Agents run isolated and CAN repeat rule content. They don't see rules.

### No hardcoded opinions

This is a template — keep it framework-agnostic:
This is a template. Keep it framework-agnostic.

- Don't hardcode `npm`, `pnpm`, `yarn`, or any specific package manager
- Don't hardcode specific component libraries, CSS frameworks, or test runners
- Don't assign `model` to agents or skills — let users choose
- Present options as tables or lists, not mandates
- The `/setupdotclaude` skill handles project-specific customization at runtime
- Don't hardcode `npm`, `pnpm`, `yarn`, or any specific package manager.
- Don't hardcode specific component libraries, CSS frameworks, or test runners.
- Don't assign `model` to agents or skills. Let users choose.
- Present options as tables or lists, not mandates.
- The `/setupdotclaude` skill handles project-specific customization at runtime.

### Token consciousness

Every line in a rule costs tokens every session. Every line in a skill costs tokens when invoked. Before adding content, ask: "Would removing this cause Claude to make mistakes?" If no, don't add it.
Every line in a rule costs tokens every session. Every line in a skill costs tokens when invoked. Before adding content, ask: would removing this cause Claude to make mistakes? If no, don't add it.

### Hook scripts must be safe

- Always check for `jq` availability before using it
- Exit 0 (allow) if dependencies are missing — don't block the user
- PreToolUse hooks observe and block — they should never modify files. PostToolUse hooks may transform output (e.g., formatting).
- Test with sample JSON input before submitting
- Always check for `jq` availability before using it.
- Exit 0 (allow) if dependencies are missing. Don't block the user.
- PreToolUse hooks observe and block. They should never modify files. PostToolUse hooks may transform output (for example, formatting).
- Test with sample JSON input before submitting.

### Plugin marketplace consistency

If you add or rename a skill or agent, also:

- Add or update its entry in `.claude-plugin/marketplace.json`.
- Add or update its `plugins/<name>/.claude-plugin/plugin.json`.
- Run `scripts/sync-plugins.sh` to mirror the file into `plugins/<name>/` and (if it's a skill) into `plugins/setupdotclaude/template/`.

The sync script is the source of truth. Don't hand-edit files inside `plugins/` or `plugins/setupdotclaude/template/`. They will be overwritten on the next sync.

### Hooks require tests

Every new or modified hook script MUST ship with fixtures under `hooks/tests/fixtures/<hook-name>/`. Each fixture is a JSON file specifying the stdin payload Claude Code would deliver, the expected exit code (0 allow, 2 block), and any substrings that must or must not appear in stdout. Cover at minimum: (a) one allow case, (b) one block case, and (c) every adversarial input class the hook's regexes touch (quoted paths, shell expansions, multi-statement SQL, combined flags, case variants, redirection edge cases). PRs that add or change a hook without corresponding fixtures will be rejected. Run `bash hooks/tests/run-all.sh` locally and ensure it passes before opening a PR CI (`.github/workflows/hook-tests.yml`) runs the same suite on Linux and macOS for every PR touching `hooks/`.
Every new or modified hook script MUST ship with fixtures under `hooks/tests/fixtures/<hook-name>/`. Each fixture is a JSON file specifying the stdin payload Claude Code would deliver, the expected exit code (0 allow, 2 block), and any substrings that must or must not appear in stdout. Cover at minimum: (a) one allow case, (b) one block case, and (c) every adversarial input class the hook's regexes touch (quoted paths, shell expansions, multi-statement SQL, combined flags, case variants, redirection edge cases). PRs that add or change a hook without corresponding fixtures will be rejected. Run `bash hooks/tests/run-all.sh` locally and ensure it passes before opening a PR. CI (`.github/workflows/hook-tests.yml`) runs the same suite on Linux and macOS for every PR touching `hooks/`.

### Update READMEs

If you add a new file to `rules/`, `skills/`, `agents/`, or `hooks/`, add a description to the README in that folder. Keep it to 2-3 lines.
If you add a new file to `rules/`, `skills/`, `agents/`, or `hooks/`, add a description to the README in that folder. Keep it to two or three lines.

### Update the root README

If your change adds or removes a file, update the structure tree in `README.md` to match.

## How to Submit
## How to submit

1. Fork the repo
2. Create a branch: `feat/your-skill-name` or `fix/hook-bug-description`
3. Make your changes
4. Test: verify YAML frontmatter is valid, hook scripts work with sample input, no duplication with existing files
1. Fork the repo.
2. Create a branch: `feat/your-skill-name` or `fix/hook-bug-description`.
3. Make your changes.
4. Test: verify YAML frontmatter is valid, hook scripts work with sample input, no duplication with existing files. Run `scripts/sync-plugins.sh` if you touched anything in `agents/` or `skills/`.
5. Open a PR with:
- **Title**: what you added/changed (under 72 chars)
- **Title**: what you added or changed (under 72 chars)
- **Body**: why it's useful, what daily workflow it improves
- **Testing**: how you verified it works

## Code of Conduct
## Code of conduct

Be helpful, be kind, be constructive. We're all here to make Claude Code better for daily development work.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 poshan0126

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading