Repository files navigation

dat-devkit

A personal Claude Code engineering harness — rules, hooks, agents, and skills that enforce engineering discipline on every project. GitHub-native, ticket-optional, plug-and-play extras.

Drop it into any repo with one command and every Claude Code session in that project starts with clean-code rules loaded, security and git-safety hooks armed, specialized agents available, and a set of workflow skills (/feature, /review, /audit, …) one slash away. Built for a personal multi-stack workflow but generic enough for any project.


What you get

LayerCountWhat it does
Rules13 common + TypeScript + PythonCoding style, naming, paradigms, design principles, testing, security, git workflow, code review, agent behavior, context hygiene, worktrees, dangerous-action guardrails. Language layers override common where they conflict.
Hooks13Guards and automations fired on tool events — block dangerous bash, block credential writes, block pushes to protected branches, run tests before push, scan for secrets before commit, validate branch/commit format, lint on write, monitor context, remind about PR review, resume/track workflow, auth check.
Agents5planner, coder, tester, reviewer, security — each with model routing (deep-reasoning models for planning/review, faster models for mechanical work).
Skills7 core/feature, /bugfix, /review, /audit, /pr, /tdd, /diagnose.
Plugins2 optionalgitlab (MR creation via glab), notion-prd (write PRDs in Notion). Opt-in with --with.

Everything is plain files — Markdown rules, Bash hooks, JSON settings. No runtime, no daemon, no lock-in. Read any of it.


Quick start

# 1. Clone
git clone https://github.com/datj9/dat-devkit.git
cd dat-devkit
# 2. Install into a project (pick your language)
./install.sh typescript ~/path/to/project
# or
./install.sh python ~/path/to/project
# 3. Open Claude Code in that project — hooks fire automatically, skills are available

That writes a .claude/ directory into your project containing the rules, hooks, agents, skills, bin scripts, and settings. Re-run any time to update — the managed directories (rules, hooks, agents, bin) are replaced cleanly while your devkit-plan.json and any local skills are preserved.


Install matrix

./install.sh <language...> [/path/to/project] [--target claude|codex|gemini|hermes] [--with <plugin>]... [--dry-run]

Languages (multiple allowed for polyglot repos)

LanguageAdds
typescriptTS coding-style, type-safety, testing, security, GraphQL workflow rules + a GraphQL post-write hook
pythonPython coding-style, type-safety, testing, security rules
./install.sh typescript python ~/path/to/project # both, into rules/typescript/ and rules/python/

Language rules install into per-language subdirectories so they never overwrite each other.

Targets

TargetOutputNotes
claude (default).claude/ with full harnessRules, hooks, agents, skills, bin, settings
codex.codex/AGENTS.mdAll rules concatenated into one instruction file (hooks/skills/agents are Claude-only and skipped)
gemini.gemini/GEMINI.mdSame concatenated-rules bundle for the Gemini CLI
hermes.hermes/ + AGENTS.md at repo root + git hooks symlinked into .git/hooks/Hermes Agent harness — same rules + agents + workflows, plus real git hooks (branch validation, staged-secret scan, conventional commits, protected-branch enforcement, force-push block, fast-test gate on push). See harness/hermes/README.md for the full mapping from the Claude-Code target to Hermes.
./install.sh typescript --target codex ~/path/to/project
./install.sh typescript --target hermes ~/path/to/project

Plugins (--with, repeatable)

./install.sh typescript --with gitlab ~/path/to/project
./install.sh python --with notion-prd ~/path/to/project
./install.sh typescript python --with gitlab --with notion-prd ~/path/to/project

Each plugin's requires field is printed as a post-install note so you know what external tool to set up. See Plugin system below.

Dry run

./install.sh typescript ~/path/to/project --dry-run

Previews every action without writing a byte. Good for sanity-checking before a first install.


Configuration

Project configuration lives in .claude/devkit-plan.json. It is created on first install and kept on subsequent installs so your edits survive updates. Two things live here: git-workflow conventions (read by the branch/commit validators and the /pr skill) and statusline token budgets.

{
"session_tokens": 44000000,
"weekly_tokens": 880000000,
"git_workflow": {
"ticket_required": false,
"branch_types": [
"feat", "fix", "docs", "style", "refactor", "perf",
"test", "build", "ci", "chore", "revert", "hotfix"
],
"commit_types": [
"feat", "fix", "docs", "style", "refactor", "perf",
"test", "build", "ci", "chore", "revert"
],
"ticket_pattern": "[A-Z]+-[0-9]+",
"ticket_examples": ["GH-42", "ABC-123"],
"branch_examples": ["feat/add-oauth", "fix/null-crash", "feat/GH-42"],
"commit_examples": [
"feat(auth): add JWT refresh token endpoint",
"fix: handle null pointer in parser",
"chore: bump deps"
]
}
}
  • ticket_requiredfalse by default. Branches and commits do not need a ticket id (feat/add-oauth is valid). Flip to true to require one matching ticket_pattern (e.g. feat/GH-42).
  • ticket_pattern — ERE regex for the ticket-id portion, used only when ticket_required is true.
  • branch_types / commit_types — the conventional-commit prefixes the validators accept.
  • session_tokens / weekly_tokens — budgets the statusline uses to show usage. Presets for common Claude plans (max_5x, max_20x, team) are listed under _plans in the file — copy the pair you want into the top-level fields.

Skills

Type the slash command in Claude Code, or just describe the task and the skill auto-triggers.

SkillUse it for
/featureFull feature flow: plan → code → test → review. Orchestrates the agents end to end.
/bugfixReproduce → fix → test → review for a single defect.
/reviewStructured code review of the current diff; auto-escalates to a security pass when auth/PII is touched.
/auditSecurity audit of the codebase + dependency vulnerability scan.
/prGuided branch → commit → PR creation following your devkit-plan.json conventions (GitHub gh by default).
/tddTest-first workflow: red → green → refactor, enforcing coverage.
/diagnoseSystematic root-cause investigation for a failing test, flaky behavior, or confusing error.
/feature add a rate limiter to the login endpoint
/bugfix login returns 500 when email is missing
/review
/audit
/pr
/tdd parse ISO-8601 durations
/diagnose why does the cache test fail only in CI

Hooks

Hooks are Bash scripts under .claude/hooks/ fired by Claude Code on tool events. They run automatically — no opt-in. Most are guards that block an unsafe action; a few are automations.

HookEventWhat it does
block-dangerous-bashPreToolUse (Bash)Blocks sudo, rm -rf outside an allowlist, git reset --hard, git clean -fd, curl … | sh, and similar destructive commands.
block-credential-writesPreToolUse (Write/Edit)Refuses writes to .env, *.pem, *.key, credentials.json, ~/.ssh/*, and other secret files (templates like .env.example are allowed).
block-protected-pushPreToolUse (Bash)Blocks direct pushes and force-pushes to protected branches (master, main, plus any you add). Use a PR instead.
pre-push-testsPreToolUse (Bash)Runs the project's tests before a git push. Escape hatch: DEVKIT_PREPUSH_SKIP=1 git push ….
pre-commit-securityPreToolUse (Bash)Scans staged changes for hardcoded secrets before a commit.
validate-branch-namePreToolUse (Bash)Enforces the branch_types / ticket format from devkit-plan.json.
validate-commit-msgPreToolUse (Bash)Enforces conventional-commit format and optional ticket id.
post-write-lintPostToolUse (Write/Edit)Runs the language linter (ESLint / Ruff) on the file just written.
context-monitorPostToolUseTracks context-window usage and warns before you run out of headroom.
pr-review-reminderStopReminds you to run /review before opening a PR.
workflow-resume / workflow-statusSessionStart / PostToolUsePersists and restores in-flight workflow state across sessions.
auth-checkSessionStartVerifies the GitHub CLI (and any plugin CLIs) are authenticated.

Shared helpers live in _lib.sh. The TypeScript layer adds post-write-graphql.sh (GraphQL codegen on schema change).


Plugin system

Plugins are optional, self-contained integrations with a specific tool, kept outside the core harness so the default install stays lean. Each is a directory under plugins/:

plugins/<name>/
├── plugin.json # manifest
├── skills/<skill>/SKILL.md # (optional) skills it adds
├── rules/*.md # (optional) rules it adds
└── hooks/*.sh # (optional) hooks it adds

plugin.json schema

{
"name": "gitlab",
"description": "GitLab merge request creation via the glab CLI or a GitLab MCP server.",
"requires": ["glab CLI"],
"adds": {
"skills": ["gitlab-pr"],
"rules": [],
"hooks": []
}
}
  • name — matches the directory name.
  • description — one sentence on what it integrates.
  • requires — external prerequisites (a CLI, an MCP server, a token). Printed at install time; the plugin is inert without them.
  • adds — which skills / rules / hooks get copied into the project's .claude/.

Available plugins

PluginAddsRequires
gitlab/gitlab-pr skill (GitLab MR creation)glab CLI or a GitLab MCP server
notion-prd/prd-authoring skill (write PRDs in Notion)Notion MCP server + integration token

Writing your own

  1. Create plugins/<name>/plugin.json with the schema above.
  2. Add the skill / rule / hook files it references.
  3. List them under adds, prerequisites under requires.
  4. Install with ./install.sh <lang> --with <name> /scratch/project and confirm the files land in .claude/.

See plugins/README.md for the full guide.


Adapting to your projects

This harness was built for Dat's stack — Vite/React frontends, NestJS services, Next.js/Strapi sites, serverless TypeScript, and Python tooling — but nothing in the core is specific to those. The rules are general engineering discipline, the hooks are stack-agnostic guards, and the language layers (typescript, python) carry the only framework-flavored content. To adapt it:

  • Edit .claude/devkit-plan.json to match your branch/commit conventions and token budgets.
  • Add or remove language layers under harness/<language>/.
  • Keep company- or tool-specific behavior in a plugin, not the core, so the default install stays portable.

GitLab, Notion, and any other vendor integration is a plugin — never a default. The base install assumes only Git and (optionally) the GitHub gh CLI.


Repository structure

dat-devkit/
├── install.sh # installer: languages × targets × plugins
├── README.md
├── LICENSE # MIT
├── package.json
├── .claude-plugin/
│ └── plugin.json # Claude Code plugin manifest
├── harness/
│ ├── common/ # language-agnostic core
│ │ ├── CLAUDE.md # project instructions loaded every session
│ │ ├── settings.json # hook wiring
│ │ ├── settings.local.json # statusline (engineer-local override)
│ │ ├── devkit-plan.json # git workflow + token budgets (kept on update)
│ │ ├── rules/*.md # 13 common rules
│ │ ├── hooks/*.sh # 13 hooks + _lib.sh
│ │ ├── agents/*.md # planner, coder, tester, reviewer, security
│ │ ├── skills/ # feature, bugfix, review, audit, pr, tdd, diagnose
│ │ └── bin/ # statusline, doctor, state, usage scripts
│ ├── typescript/
│ │ ├── rules/*.md # TS coding-style, type-safety, testing, security, graphql
│ │ └── hooks/ # post-write-graphql.sh + hooks-extend.json
│ ├── python/
│ │ └── rules/*.md # Python coding-style, type-safety, testing, security
│ └── hermes/ # Hermes Agent target
│ ├── AGENTS.md # repo-root entry installed by --target hermes
│ ├── agents/*.md # role briefs for delegate_task
│ ├── workflows/*.md # feature, bugfix, review, audit, pr, tdd, diagnose
│ ├── git-hooks/ # pre-commit, commit-msg, pre-push (real git hooks)
│ └── README.md # Claude→Hermes mapping
└── plugins/
├── README.md
├── gitlab/ # /gitlab-pr skill (opt-in)
└── notion-prd/ # /prd-authoring skill (opt-in)

License

MIT © 2026 Dat Nguyen. See LICENSE.

About

Personal Claude Code engineering harness: clean-code rules, security guards, git discipline, GitHub PR workflow, and engineering skills. GitHub-native, ticket-optional, plug-and-play.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Repository files navigation

dat-devkit

A personal Claude Code engineering harness — rules, hooks, agents, and skills that enforce engineering discipline on every project. GitHub-native, ticket-optional, plug-and-play extras.

Drop it into any repo with one command and every Claude Code session in that project starts with clean-code rules loaded, security and git-safety hooks armed, specialized agents available, and a set of workflow skills (/feature, /review, /audit, …) one slash away. Built for a personal multi-stack workflow but generic enough for any project.


What you get

LayerCountWhat it does
Rules13 common + TypeScript + PythonCoding style, naming, paradigms, design principles, testing, security, git workflow, code review, agent behavior, context hygiene, worktrees, dangerous-action guardrails. Language layers override common where they conflict.
Hooks13Guards and automations fired on tool events — block dangerous bash, block credential writes, block pushes to protected branches, run tests before push, scan for secrets before commit, validate branch/commit format, lint on write, monitor context, remind about PR review, resume/track workflow, auth check.
Agents5planner, coder, tester, reviewer, security — each with model routing (deep-reasoning models for planning/review, faster models for mechanical work).
Skills7 core/feature, /bugfix, /review, /audit, /pr, /tdd, /diagnose.
Plugins2 optionalgitlab (MR creation via glab), notion-prd (write PRDs in Notion). Opt-in with --with.

Everything is plain files — Markdown rules, Bash hooks, JSON settings. No runtime, no daemon, no lock-in. Read any of it.


Quick start

# 1. Clone
git clone https://github.com/datj9/dat-devkit.git
cd dat-devkit
# 2. Install into a project (pick your language)
./install.sh typescript ~/path/to/project
# or
./install.sh python ~/path/to/project
# 3. Open Claude Code in that project — hooks fire automatically, skills are available

That writes a .claude/ directory into your project containing the rules, hooks, agents, skills, bin scripts, and settings. Re-run any time to update — the managed directories (rules, hooks, agents, bin) are replaced cleanly while your devkit-plan.json and any local skills are preserved.


Install matrix

./install.sh <language...> [/path/to/project] [--target claude|codex|gemini|hermes] [--with <plugin>]... [--dry-run]

Languages (multiple allowed for polyglot repos)

LanguageAdds
typescriptTS coding-style, type-safety, testing, security, GraphQL workflow rules + a GraphQL post-write hook
pythonPython coding-style, type-safety, testing, security rules
./install.sh typescript python ~/path/to/project # both, into rules/typescript/ and rules/python/

Language rules install into per-language subdirectories so they never overwrite each other.

Targets

TargetOutputNotes
claude (default).claude/ with full harnessRules, hooks, agents, skills, bin, settings
codex.codex/AGENTS.mdAll rules concatenated into one instruction file (hooks/skills/agents are Claude-only and skipped)
gemini.gemini/GEMINI.mdSame concatenated-rules bundle for the Gemini CLI
hermes.hermes/ + AGENTS.md at repo root + git hooks symlinked into .git/hooks/Hermes Agent harness — same rules + agents + workflows, plus real git hooks (branch validation, staged-secret scan, conventional commits, protected-branch enforcement, force-push block, fast-test gate on push). See harness/hermes/README.md for the full mapping from the Claude-Code target to Hermes.
./install.sh typescript --target codex ~/path/to/project
./install.sh typescript --target hermes ~/path/to/project

Plugins (--with, repeatable)

./install.sh typescript --with gitlab ~/path/to/project
./install.sh python --with notion-prd ~/path/to/project
./install.sh typescript python --with gitlab --with notion-prd ~/path/to/project

Each plugin's requires field is printed as a post-install note so you know what external tool to set up. See Plugin system below.

Dry run

./install.sh typescript ~/path/to/project --dry-run

Previews every action without writing a byte. Good for sanity-checking before a first install.


Configuration

Project configuration lives in .claude/devkit-plan.json. It is created on first install and kept on subsequent installs so your edits survive updates. Two things live here: git-workflow conventions (read by the branch/commit validators and the /pr skill) and statusline token budgets.

{
"session_tokens": 44000000,
"weekly_tokens": 880000000,
"git_workflow": {
"ticket_required": false,
"branch_types": [
"feat", "fix", "docs", "style", "refactor", "perf",
"test", "build", "ci", "chore", "revert", "hotfix"
],
"commit_types": [
"feat", "fix", "docs", "style", "refactor", "perf",
"test", "build", "ci", "chore", "revert"
],
"ticket_pattern": "[A-Z]+-[0-9]+",
"ticket_examples": ["GH-42", "ABC-123"],
"branch_examples": ["feat/add-oauth", "fix/null-crash", "feat/GH-42"],
"commit_examples": [
"feat(auth): add JWT refresh token endpoint",
"fix: handle null pointer in parser",
"chore: bump deps"
]
}
}
  • ticket_requiredfalse by default. Branches and commits do not need a ticket id (feat/add-oauth is valid). Flip to true to require one matching ticket_pattern (e.g. feat/GH-42).
  • ticket_pattern — ERE regex for the ticket-id portion, used only when ticket_required is true.
  • branch_types / commit_types — the conventional-commit prefixes the validators accept.
  • session_tokens / weekly_tokens — budgets the statusline uses to show usage. Presets for common Claude plans (max_5x, max_20x, team) are listed under _plans in the file — copy the pair you want into the top-level fields.

Skills

Type the slash command in Claude Code, or just describe the task and the skill auto-triggers.

SkillUse it for
/featureFull feature flow: plan → code → test → review. Orchestrates the agents end to end.
/bugfixReproduce → fix → test → review for a single defect.
/reviewStructured code review of the current diff; auto-escalates to a security pass when auth/PII is touched.
/auditSecurity audit of the codebase + dependency vulnerability scan.
/prGuided branch → commit → PR creation following your devkit-plan.json conventions (GitHub gh by default).
/tddTest-first workflow: red → green → refactor, enforcing coverage.
/diagnoseSystematic root-cause investigation for a failing test, flaky behavior, or confusing error.
/feature add a rate limiter to the login endpoint
/bugfix login returns 500 when email is missing
/review
/audit
/pr
/tdd parse ISO-8601 durations
/diagnose why does the cache test fail only in CI

Hooks

Hooks are Bash scripts under .claude/hooks/ fired by Claude Code on tool events. They run automatically — no opt-in. Most are guards that block an unsafe action; a few are automations.

HookEventWhat it does
block-dangerous-bashPreToolUse (Bash)Blocks sudo, rm -rf outside an allowlist, git reset --hard, git clean -fd, curl … | sh, and similar destructive commands.
block-credential-writesPreToolUse (Write/Edit)Refuses writes to .env, *.pem, *.key, credentials.json, ~/.ssh/*, and other secret files (templates like .env.example are allowed).
block-protected-pushPreToolUse (Bash)Blocks direct pushes and force-pushes to protected branches (master, main, plus any you add). Use a PR instead.
pre-push-testsPreToolUse (Bash)Runs the project's tests before a git push. Escape hatch: DEVKIT_PREPUSH_SKIP=1 git push ….
pre-commit-securityPreToolUse (Bash)Scans staged changes for hardcoded secrets before a commit.
validate-branch-namePreToolUse (Bash)Enforces the branch_types / ticket format from devkit-plan.json.
validate-commit-msgPreToolUse (Bash)Enforces conventional-commit format and optional ticket id.
post-write-lintPostToolUse (Write/Edit)Runs the language linter (ESLint / Ruff) on the file just written.
context-monitorPostToolUseTracks context-window usage and warns before you run out of headroom.
pr-review-reminderStopReminds you to run /review before opening a PR.
workflow-resume / workflow-statusSessionStart / PostToolUsePersists and restores in-flight workflow state across sessions.
auth-checkSessionStartVerifies the GitHub CLI (and any plugin CLIs) are authenticated.

Shared helpers live in _lib.sh. The TypeScript layer adds post-write-graphql.sh (GraphQL codegen on schema change).


Plugin system

Plugins are optional, self-contained integrations with a specific tool, kept outside the core harness so the default install stays lean. Each is a directory under plugins/:

plugins/<name>/
├── plugin.json # manifest
├── skills/<skill>/SKILL.md # (optional) skills it adds
├── rules/*.md # (optional) rules it adds
└── hooks/*.sh # (optional) hooks it adds

plugin.json schema

{
"name": "gitlab",
"description": "GitLab merge request creation via the glab CLI or a GitLab MCP server.",
"requires": ["glab CLI"],
"adds": {
"skills": ["gitlab-pr"],
"rules": [],
"hooks": []
}
}
  • name — matches the directory name.
  • description — one sentence on what it integrates.
  • requires — external prerequisites (a CLI, an MCP server, a token). Printed at install time; the plugin is inert without them.
  • adds — which skills / rules / hooks get copied into the project's .claude/.

Available plugins

PluginAddsRequires
gitlab/gitlab-pr skill (GitLab MR creation)glab CLI or a GitLab MCP server
notion-prd/prd-authoring skill (write PRDs in Notion)Notion MCP server + integration token

Writing your own

  1. Create plugins/<name>/plugin.json with the schema above.
  2. Add the skill / rule / hook files it references.
  3. List them under adds, prerequisites under requires.
  4. Install with ./install.sh <lang> --with <name> /scratch/project and confirm the files land in .claude/.

See plugins/README.md for the full guide.


Adapting to your projects

This harness was built for Dat's stack — Vite/React frontends, NestJS services, Next.js/Strapi sites, serverless TypeScript, and Python tooling — but nothing in the core is specific to those. The rules are general engineering discipline, the hooks are stack-agnostic guards, and the language layers (typescript, python) carry the only framework-flavored content. To adapt it:

  • Edit .claude/devkit-plan.json to match your branch/commit conventions and token budgets.
  • Add or remove language layers under harness/<language>/.
  • Keep company- or tool-specific behavior in a plugin, not the core, so the default install stays portable.

GitLab, Notion, and any other vendor integration is a plugin — never a default. The base install assumes only Git and (optionally) the GitHub gh CLI.


Repository structure

dat-devkit/
├── install.sh # installer: languages × targets × plugins
├── README.md
├── LICENSE # MIT
├── package.json
├── .claude-plugin/
│ └── plugin.json # Claude Code plugin manifest
├── harness/
│ ├── common/ # language-agnostic core
│ │ ├── CLAUDE.md # project instructions loaded every session
│ │ ├── settings.json # hook wiring
│ │ ├── settings.local.json # statusline (engineer-local override)
│ │ ├── devkit-plan.json # git workflow + token budgets (kept on update)
│ │ ├── rules/*.md # 13 common rules
│ │ ├── hooks/*.sh # 13 hooks + _lib.sh
│ │ ├── agents/*.md # planner, coder, tester, reviewer, security
│ │ ├── skills/ # feature, bugfix, review, audit, pr, tdd, diagnose
│ │ └── bin/ # statusline, doctor, state, usage scripts
│ ├── typescript/
│ │ ├── rules/*.md # TS coding-style, type-safety, testing, security, graphql
│ │ └── hooks/ # post-write-graphql.sh + hooks-extend.json
│ ├── python/
│ │ └── rules/*.md # Python coding-style, type-safety, testing, security
│ └── hermes/ # Hermes Agent target
│ ├── AGENTS.md # repo-root entry installed by --target hermes
│ ├── agents/*.md # role briefs for delegate_task
│ ├── workflows/*.md # feature, bugfix, review, audit, pr, tdd, diagnose
│ ├── git-hooks/ # pre-commit, commit-msg, pre-push (real git hooks)
│ └── README.md # Claude→Hermes mapping
└── plugins/
├── README.md
├── gitlab/ # /gitlab-pr skill (opt-in)
└── notion-prd/ # /prd-authoring skill (opt-in)

License

MIT © 2026 Dat Nguyen. See LICENSE.

About

Personal Claude Code engineering harness: clean-code rules, security guards, git discipline, GitHub PR workflow, and engineering skills. GitHub-native, ticket-optional, plug-and-play.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

dat-devkit

A personal Claude Code engineering harness — rules, hooks, agents, and skills that enforce engineering discipline on every project. GitHub-native, ticket-optional, plug-and-play extras.

Drop it into any repo with one command and every Claude Code session in that project starts with clean-code rules loaded, security and git-safety hooks armed, specialized agents available, and a set of workflow skills (/feature, /review, /audit, …) one slash away. Built for a personal multi-stack workflow but generic enough for any project.


What you get

LayerCountWhat it does
Rules13 common + TypeScript + PythonCoding style, naming, paradigms, design principles, testing, security, git workflow, code review, agent behavior, context hygiene, worktrees, dangerous-action guardrails. Language layers override common where they conflict.
Hooks13Guards and automations fired on tool events — block dangerous bash, block credential writes, block pushes to protected branches, run tests before push, scan for secrets before commit, validate branch/commit format, lint on write, monitor context, remind about PR review, resume/track workflow, auth check.
Agents5planner, coder, tester, reviewer, security — each with model routing (deep-reasoning models for planning/review, faster models for mechanical work).
Skills7 core/feature, /bugfix, /review, /audit, /pr, /tdd, /diagnose.
Plugins2 optionalgitlab (MR creation via glab), notion-prd (write PRDs in Notion). Opt-in with --with.

Everything is plain files — Markdown rules, Bash hooks, JSON settings. No runtime, no daemon, no lock-in. Read any of it.


Quick start

# 1. Clone
git clone https://github.com/datj9/dat-devkit.git
cd dat-devkit
# 2. Install into a project (pick your language)
./install.sh typescript ~/path/to/project
# or
./install.sh python ~/path/to/project
# 3. Open Claude Code in that project — hooks fire automatically, skills are available

That writes a .claude/ directory into your project containing the rules, hooks, agents, skills, bin scripts, and settings. Re-run any time to update — the managed directories (rules, hooks, agents, bin) are replaced cleanly while your devkit-plan.json and any local skills are preserved.


Install matrix

./install.sh <language...> [/path/to/project] [--target claude|codex|gemini|hermes] [--with <plugin>]... [--dry-run]

Languages (multiple allowed for polyglot repos)

LanguageAdds
typescriptTS coding-style, type-safety, testing, security, GraphQL workflow rules + a GraphQL post-write hook
pythonPython coding-style, type-safety, testing, security rules
./install.sh typescript python ~/path/to/project # both, into rules/typescript/ and rules/python/

Language rules install into per-language subdirectories so they never overwrite each other.

Targets

TargetOutputNotes
claude (default).claude/ with full harnessRules, hooks, agents, skills, bin, settings
codex.codex/AGENTS.mdAll rules concatenated into one instruction file (hooks/skills/agents are Claude-only and skipped)
gemini.gemini/GEMINI.mdSame concatenated-rules bundle for the Gemini CLI
hermes.hermes/ + AGENTS.md at repo root + git hooks symlinked into .git/hooks/Hermes Agent harness — same rules + agents + workflows, plus real git hooks (branch validation, staged-secret scan, conventional commits, protected-branch enforcement, force-push block, fast-test gate on push). See harness/hermes/README.md for the full mapping from the Claude-Code target to Hermes.
./install.sh typescript --target codex ~/path/to/project
./install.sh typescript --target hermes ~/path/to/project

Plugins (--with, repeatable)

./install.sh typescript --with gitlab ~/path/to/project
./install.sh python --with notion-prd ~/path/to/project
./install.sh typescript python --with gitlab --with notion-prd ~/path/to/project

Each plugin's requires field is printed as a post-install note so you know what external tool to set up. See Plugin system below.

Dry run

./install.sh typescript ~/path/to/project --dry-run

Previews every action without writing a byte. Good for sanity-checking before a first install.


Configuration

Project configuration lives in .claude/devkit-plan.json. It is created on first install and kept on subsequent installs so your edits survive updates. Two things live here: git-workflow conventions (read by the branch/commit validators and the /pr skill) and statusline token budgets.

{
"session_tokens": 44000000,
"weekly_tokens": 880000000,
"git_workflow": {
"ticket_required": false,
"branch_types": [
"feat", "fix", "docs", "style", "refactor", "perf",
"test", "build", "ci", "chore", "revert", "hotfix"
],
"commit_types": [
"feat", "fix", "docs", "style", "refactor", "perf",
"test", "build", "ci", "chore", "revert"
],
"ticket_pattern": "[A-Z]+-[0-9]+",
"ticket_examples": ["GH-42", "ABC-123"],
"branch_examples": ["feat/add-oauth", "fix/null-crash", "feat/GH-42"],
"commit_examples": [
"feat(auth): add JWT refresh token endpoint",
"fix: handle null pointer in parser",
"chore: bump deps"
]
}
}
  • ticket_requiredfalse by default. Branches and commits do not need a ticket id (feat/add-oauth is valid). Flip to true to require one matching ticket_pattern (e.g. feat/GH-42).
  • ticket_pattern — ERE regex for the ticket-id portion, used only when ticket_required is true.
  • branch_types / commit_types — the conventional-commit prefixes the validators accept.
  • session_tokens / weekly_tokens — budgets the statusline uses to show usage. Presets for common Claude plans (max_5x, max_20x, team) are listed under _plans in the file — copy the pair you want into the top-level fields.

Skills

Type the slash command in Claude Code, or just describe the task and the skill auto-triggers.

SkillUse it for
/featureFull feature flow: plan → code → test → review. Orchestrates the agents end to end.
/bugfixReproduce → fix → test → review for a single defect.
/reviewStructured code review of the current diff; auto-escalates to a security pass when auth/PII is touched.
/auditSecurity audit of the codebase + dependency vulnerability scan.
/prGuided branch → commit → PR creation following your devkit-plan.json conventions (GitHub gh by default).
/tddTest-first workflow: red → green → refactor, enforcing coverage.
/diagnoseSystematic root-cause investigation for a failing test, flaky behavior, or confusing error.
/feature add a rate limiter to the login endpoint
/bugfix login returns 500 when email is missing
/review
/audit
/pr
/tdd parse ISO-8601 durations
/diagnose why does the cache test fail only in CI

Hooks

Hooks are Bash scripts under .claude/hooks/ fired by Claude Code on tool events. They run automatically — no opt-in. Most are guards that block an unsafe action; a few are automations.

HookEventWhat it does
block-dangerous-bashPreToolUse (Bash)Blocks sudo, rm -rf outside an allowlist, git reset --hard, git clean -fd, curl … | sh, and similar destructive commands.
block-credential-writesPreToolUse (Write/Edit)Refuses writes to .env, *.pem, *.key, credentials.json, ~/.ssh/*, and other secret files (templates like .env.example are allowed).
block-protected-pushPreToolUse (Bash)Blocks direct pushes and force-pushes to protected branches (master, main, plus any you add). Use a PR instead.
pre-push-testsPreToolUse (Bash)Runs the project's tests before a git push. Escape hatch: DEVKIT_PREPUSH_SKIP=1 git push ….
pre-commit-securityPreToolUse (Bash)Scans staged changes for hardcoded secrets before a commit.
validate-branch-namePreToolUse (Bash)Enforces the branch_types / ticket format from devkit-plan.json.
validate-commit-msgPreToolUse (Bash)Enforces conventional-commit format and optional ticket id.
post-write-lintPostToolUse (Write/Edit)Runs the language linter (ESLint / Ruff) on the file just written.
context-monitorPostToolUseTracks context-window usage and warns before you run out of headroom.
pr-review-reminderStopReminds you to run /review before opening a PR.
workflow-resume / workflow-statusSessionStart / PostToolUsePersists and restores in-flight workflow state across sessions.
auth-checkSessionStartVerifies the GitHub CLI (and any plugin CLIs) are authenticated.

Shared helpers live in _lib.sh. The TypeScript layer adds post-write-graphql.sh (GraphQL codegen on schema change).


Plugin system

Plugins are optional, self-contained integrations with a specific tool, kept outside the core harness so the default install stays lean. Each is a directory under plugins/:

plugins/<name>/
├── plugin.json # manifest
├── skills/<skill>/SKILL.md # (optional) skills it adds
├── rules/*.md # (optional) rules it adds
└── hooks/*.sh # (optional) hooks it adds

plugin.json schema

{
"name": "gitlab",
"description": "GitLab merge request creation via the glab CLI or a GitLab MCP server.",
"requires": ["glab CLI"],
"adds": {
"skills": ["gitlab-pr"],
"rules": [],
"hooks": []
}
}
  • name — matches the directory name.
  • description — one sentence on what it integrates.
  • requires — external prerequisites (a CLI, an MCP server, a token). Printed at install time; the plugin is inert without them.
  • adds — which skills / rules / hooks get copied into the project's .claude/.

Available plugins

PluginAddsRequires
gitlab/gitlab-pr skill (GitLab MR creation)glab CLI or a GitLab MCP server
notion-prd/prd-authoring skill (write PRDs in Notion)Notion MCP server + integration token

Writing your own

  1. Create plugins/<name>/plugin.json with the schema above.
  2. Add the skill / rule / hook files it references.
  3. List them under adds, prerequisites under requires.
  4. Install with ./install.sh <lang> --with <name> /scratch/project and confirm the files land in .claude/.

See plugins/README.md for the full guide.


Adapting to your projects

This harness was built for Dat's stack — Vite/React frontends, NestJS services, Next.js/Strapi sites, serverless TypeScript, and Python tooling — but nothing in the core is specific to those. The rules are general engineering discipline, the hooks are stack-agnostic guards, and the language layers (typescript, python) carry the only framework-flavored content. To adapt it:

  • Edit .claude/devkit-plan.json to match your branch/commit conventions and token budgets.
  • Add or remove language layers under harness/<language>/.
  • Keep company- or tool-specific behavior in a plugin, not the core, so the default install stays portable.

GitLab, Notion, and any other vendor integration is a plugin — never a default. The base install assumes only Git and (optionally) the GitHub gh CLI.


Repository structure

dat-devkit/
├── install.sh # installer: languages × targets × plugins
├── README.md
├── LICENSE # MIT
├── package.json
├── .claude-plugin/
│ └── plugin.json # Claude Code plugin manifest
├── harness/
│ ├── common/ # language-agnostic core
│ │ ├── CLAUDE.md # project instructions loaded every session
│ │ ├── settings.json # hook wiring
│ │ ├── settings.local.json # statusline (engineer-local override)
│ │ ├── devkit-plan.json # git workflow + token budgets (kept on update)
│ │ ├── rules/*.md # 13 common rules
│ │ ├── hooks/*.sh # 13 hooks + _lib.sh
│ │ ├── agents/*.md # planner, coder, tester, reviewer, security
│ │ ├── skills/ # feature, bugfix, review, audit, pr, tdd, diagnose
│ │ └── bin/ # statusline, doctor, state, usage scripts
│ ├── typescript/
│ │ ├── rules/*.md # TS coding-style, type-safety, testing, security, graphql
│ │ └── hooks/ # post-write-graphql.sh + hooks-extend.json
│ ├── python/
│ │ └── rules/*.md # Python coding-style, type-safety, testing, security
│ └── hermes/ # Hermes Agent target
│ ├── AGENTS.md # repo-root entry installed by --target hermes
│ ├── agents/*.md # role briefs for delegate_task
│ ├── workflows/*.md # feature, bugfix, review, audit, pr, tdd, diagnose
│ ├── git-hooks/ # pre-commit, commit-msg, pre-push (real git hooks)
│ └── README.md # Claude→Hermes mapping
└── plugins/
├── README.md
├── gitlab/ # /gitlab-pr skill (opt-in)
└── notion-prd/ # /prd-authoring skill (opt-in)

License

MIT © 2026 Dat Nguyen. See LICENSE.

About

Personal Claude Code engineering harness: clean-code rules, security guards, git discipline, GitHub PR workflow, and engineering skills. GitHub-native, ticket-optional, plug-and-play.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

dat-devkit

A personal Claude Code engineering harness — rules, hooks, agents, and skills that enforce engineering discipline on every project. GitHub-native, ticket-optional, plug-and-play extras.

Drop it into any repo with one command and every Claude Code session in that project starts with clean-code rules loaded, security and git-safety hooks armed, specialized agents available, and a set of workflow skills (/feature, /review, /audit, …) one slash away. Built for a personal multi-stack workflow but generic enough for any project.


What you get

LayerCountWhat it does
Rules13 common + TypeScript + PythonCoding style, naming, paradigms, design principles, testing, security, git workflow, code review, agent behavior, context hygiene, worktrees, dangerous-action guardrails. Language layers override common where they conflict.
Hooks13Guards and automations fired on tool events — block dangerous bash, block credential writes, block pushes to protected branches, run tests before push, scan for secrets before commit, validate branch/commit format, lint on write, monitor context, remind about PR review, resume/track workflow, auth check.
Agents5planner, coder, tester, reviewer, security — each with model routing (deep-reasoning models for planning/review, faster models for mechanical work).
Skills7 core/feature, /bugfix, /review, /audit, /pr, /tdd, /diagnose.
Plugins2 optionalgitlab (MR creation via glab), notion-prd (write PRDs in Notion). Opt-in with --with.

Everything is plain files — Markdown rules, Bash hooks, JSON settings. No runtime, no daemon, no lock-in. Read any of it.


Quick start

# 1. Clone
git clone https://github.com/datj9/dat-devkit.git
cd dat-devkit
# 2. Install into a project (pick your language)
./install.sh typescript ~/path/to/project
# or
./install.sh python ~/path/to/project
# 3. Open Claude Code in that project — hooks fire automatically, skills are available

That writes a .claude/ directory into your project containing the rules, hooks, agents, skills, bin scripts, and settings. Re-run any time to update — the managed directories (rules, hooks, agents, bin) are replaced cleanly while your devkit-plan.json and any local skills are preserved.


Install matrix

./install.sh <language...> [/path/to/project] [--target claude|codex|gemini|hermes] [--with <plugin>]... [--dry-run]

Languages (multiple allowed for polyglot repos)

LanguageAdds
typescriptTS coding-style, type-safety, testing, security, GraphQL workflow rules + a GraphQL post-write hook
pythonPython coding-style, type-safety, testing, security rules
./install.sh typescript python ~/path/to/project # both, into rules/typescript/ and rules/python/

Language rules install into per-language subdirectories so they never overwrite each other.

Targets

TargetOutputNotes
claude (default).claude/ with full harnessRules, hooks, agents, skills, bin, settings
codex.codex/AGENTS.mdAll rules concatenated into one instruction file (hooks/skills/agents are Claude-only and skipped)
gemini.gemini/GEMINI.mdSame concatenated-rules bundle for the Gemini CLI
hermes.hermes/ + AGENTS.md at repo root + git hooks symlinked into .git/hooks/Hermes Agent harness — same rules + agents + workflows, plus real git hooks (branch validation, staged-secret scan, conventional commits, protected-branch enforcement, force-push block, fast-test gate on push). See harness/hermes/README.md for the full mapping from the Claude-Code target to Hermes.
./install.sh typescript --target codex ~/path/to/project
./install.sh typescript --target hermes ~/path/to/project

Plugins (--with, repeatable)

./install.sh typescript --with gitlab ~/path/to/project
./install.sh python --with notion-prd ~/path/to/project
./install.sh typescript python --with gitlab --with notion-prd ~/path/to/project

Each plugin's requires field is printed as a post-install note so you know what external tool to set up. See Plugin system below.

Dry run

./install.sh typescript ~/path/to/project --dry-run

Previews every action without writing a byte. Good for sanity-checking before a first install.


Configuration

Project configuration lives in .claude/devkit-plan.json. It is created on first install and kept on subsequent installs so your edits survive updates. Two things live here: git-workflow conventions (read by the branch/commit validators and the /pr skill) and statusline token budgets.

{
"session_tokens": 44000000,
"weekly_tokens": 880000000,
"git_workflow": {
"ticket_required": false,
"branch_types": [
"feat", "fix", "docs", "style", "refactor", "perf",
"test", "build", "ci", "chore", "revert", "hotfix"
],
"commit_types": [
"feat", "fix", "docs", "style", "refactor", "perf",
"test", "build", "ci", "chore", "revert"
],
"ticket_pattern": "[A-Z]+-[0-9]+",
"ticket_examples": ["GH-42", "ABC-123"],
"branch_examples": ["feat/add-oauth", "fix/null-crash", "feat/GH-42"],
"commit_examples": [
"feat(auth): add JWT refresh token endpoint",
"fix: handle null pointer in parser",
"chore: bump deps"
]
}
}
  • ticket_requiredfalse by default. Branches and commits do not need a ticket id (feat/add-oauth is valid). Flip to true to require one matching ticket_pattern (e.g. feat/GH-42).
  • ticket_pattern — ERE regex for the ticket-id portion, used only when ticket_required is true.
  • branch_types / commit_types — the conventional-commit prefixes the validators accept.
  • session_tokens / weekly_tokens — budgets the statusline uses to show usage. Presets for common Claude plans (max_5x, max_20x, team) are listed under _plans in the file — copy the pair you want into the top-level fields.

Skills

Type the slash command in Claude Code, or just describe the task and the skill auto-triggers.

SkillUse it for
/featureFull feature flow: plan → code → test → review. Orchestrates the agents end to end.
/bugfixReproduce → fix → test → review for a single defect.
/reviewStructured code review of the current diff; auto-escalates to a security pass when auth/PII is touched.
/auditSecurity audit of the codebase + dependency vulnerability scan.
/prGuided branch → commit → PR creation following your devkit-plan.json conventions (GitHub gh by default).
/tddTest-first workflow: red → green → refactor, enforcing coverage.
/diagnoseSystematic root-cause investigation for a failing test, flaky behavior, or confusing error.
/feature add a rate limiter to the login endpoint
/bugfix login returns 500 when email is missing
/review
/audit
/pr
/tdd parse ISO-8601 durations
/diagnose why does the cache test fail only in CI

Hooks

Hooks are Bash scripts under .claude/hooks/ fired by Claude Code on tool events. They run automatically — no opt-in. Most are guards that block an unsafe action; a few are automations.

HookEventWhat it does
block-dangerous-bashPreToolUse (Bash)Blocks sudo, rm -rf outside an allowlist, git reset --hard, git clean -fd, curl … | sh, and similar destructive commands.
block-credential-writesPreToolUse (Write/Edit)Refuses writes to .env, *.pem, *.key, credentials.json, ~/.ssh/*, and other secret files (templates like .env.example are allowed).
block-protected-pushPreToolUse (Bash)Blocks direct pushes and force-pushes to protected branches (master, main, plus any you add). Use a PR instead.
pre-push-testsPreToolUse (Bash)Runs the project's tests before a git push. Escape hatch: DEVKIT_PREPUSH_SKIP=1 git push ….
pre-commit-securityPreToolUse (Bash)Scans staged changes for hardcoded secrets before a commit.
validate-branch-namePreToolUse (Bash)Enforces the branch_types / ticket format from devkit-plan.json.
validate-commit-msgPreToolUse (Bash)Enforces conventional-commit format and optional ticket id.
post-write-lintPostToolUse (Write/Edit)Runs the language linter (ESLint / Ruff) on the file just written.
context-monitorPostToolUseTracks context-window usage and warns before you run out of headroom.
pr-review-reminderStopReminds you to run /review before opening a PR.
workflow-resume / workflow-statusSessionStart / PostToolUsePersists and restores in-flight workflow state across sessions.
auth-checkSessionStartVerifies the GitHub CLI (and any plugin CLIs) are authenticated.

Shared helpers live in _lib.sh. The TypeScript layer adds post-write-graphql.sh (GraphQL codegen on schema change).


Plugin system

Plugins are optional, self-contained integrations with a specific tool, kept outside the core harness so the default install stays lean. Each is a directory under plugins/:

plugins/<name>/
├── plugin.json # manifest
├── skills/<skill>/SKILL.md # (optional) skills it adds
├── rules/*.md # (optional) rules it adds
└── hooks/*.sh # (optional) hooks it adds

plugin.json schema

{
"name": "gitlab",
"description": "GitLab merge request creation via the glab CLI or a GitLab MCP server.",
"requires": ["glab CLI"],
"adds": {
"skills": ["gitlab-pr"],
"rules": [],
"hooks": []
}
}
  • name — matches the directory name.
  • description — one sentence on what it integrates.
  • requires — external prerequisites (a CLI, an MCP server, a token). Printed at install time; the plugin is inert without them.
  • adds — which skills / rules / hooks get copied into the project's .claude/.

Available plugins

PluginAddsRequires
gitlab/gitlab-pr skill (GitLab MR creation)glab CLI or a GitLab MCP server
notion-prd/prd-authoring skill (write PRDs in Notion)Notion MCP server + integration token

Writing your own

  1. Create plugins/<name>/plugin.json with the schema above.
  2. Add the skill / rule / hook files it references.
  3. List them under adds, prerequisites under requires.
  4. Install with ./install.sh <lang> --with <name> /scratch/project and confirm the files land in .claude/.

See plugins/README.md for the full guide.


Adapting to your projects

This harness was built for Dat's stack — Vite/React frontends, NestJS services, Next.js/Strapi sites, serverless TypeScript, and Python tooling — but nothing in the core is specific to those. The rules are general engineering discipline, the hooks are stack-agnostic guards, and the language layers (typescript, python) carry the only framework-flavored content. To adapt it:

  • Edit .claude/devkit-plan.json to match your branch/commit conventions and token budgets.
  • Add or remove language layers under harness/<language>/.
  • Keep company- or tool-specific behavior in a plugin, not the core, so the default install stays portable.

GitLab, Notion, and any other vendor integration is a plugin — never a default. The base install assumes only Git and (optionally) the GitHub gh CLI.


Repository structure

dat-devkit/
├── install.sh # installer: languages × targets × plugins
├── README.md
├── LICENSE # MIT
├── package.json
├── .claude-plugin/
│ └── plugin.json # Claude Code plugin manifest
├── harness/
│ ├── common/ # language-agnostic core
│ │ ├── CLAUDE.md # project instructions loaded every session
│ │ ├── settings.json # hook wiring
│ │ ├── settings.local.json # statusline (engineer-local override)
│ │ ├── devkit-plan.json # git workflow + token budgets (kept on update)
│ │ ├── rules/*.md # 13 common rules
│ │ ├── hooks/*.sh # 13 hooks + _lib.sh
│ │ ├── agents/*.md # planner, coder, tester, reviewer, security
│ │ ├── skills/ # feature, bugfix, review, audit, pr, tdd, diagnose
│ │ └── bin/ # statusline, doctor, state, usage scripts
│ ├── typescript/
│ │ ├── rules/*.md # TS coding-style, type-safety, testing, security, graphql
│ │ └── hooks/ # post-write-graphql.sh + hooks-extend.json
│ ├── python/
│ │ └── rules/*.md # Python coding-style, type-safety, testing, security
│ └── hermes/ # Hermes Agent target
│ ├── AGENTS.md # repo-root entry installed by --target hermes
│ ├── agents/*.md # role briefs for delegate_task
│ ├── workflows/*.md # feature, bugfix, review, audit, pr, tdd, diagnose
│ ├── git-hooks/ # pre-commit, commit-msg, pre-push (real git hooks)
│ └── README.md # Claude→Hermes mapping
└── plugins/
├── README.md
├── gitlab/ # /gitlab-pr skill (opt-in)
└── notion-prd/ # /prd-authoring skill (opt-in)

License

MIT © 2026 Dat Nguyen. See LICENSE.

About

Personal Claude Code engineering harness: clean-code rules, security guards, git discipline, GitHub PR workflow, and engineering skills. GitHub-native, ticket-optional, plug-and-play.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Repository files navigation

dat-devkit

A personal Claude Code engineering harness — rules, hooks, agents, and skills that enforce engineering discipline on every project. GitHub-native, ticket-optional, plug-and-play extras.

Drop it into any repo with one command and every Claude Code session in that project starts with clean-code rules loaded, security and git-safety hooks armed, specialized agents available, and a set of workflow skills (/feature, /review, /audit, …) one slash away. Built for a personal multi-stack workflow but generic enough for any project.


What you get

LayerCountWhat it does
Rules13 common + TypeScript + PythonCoding style, naming, paradigms, design principles, testing, security, git workflow, code review, agent behavior, context hygiene, worktrees, dangerous-action guardrails. Language layers override common where they conflict.
Hooks13Guards and automations fired on tool events — block dangerous bash, block credential writes, block pushes to protected branches, run tests before push, scan for secrets before commit, validate branch/commit format, lint on write, monitor context, remind about PR review, resume/track workflow, auth check.
Agents5planner, coder, tester, reviewer, security — each with model routing (deep-reasoning models for planning/review, faster models for mechanical work).
Skills7 core/feature, /bugfix, /review, /audit, /pr, /tdd, /diagnose.
Plugins2 optionalgitlab (MR creation via glab), notion-prd (write PRDs in Notion). Opt-in with --with.

Everything is plain files — Markdown rules, Bash hooks, JSON settings. No runtime, no daemon, no lock-in. Read any of it.


Quick start

# 1. Clone
git clone https://github.com/datj9/dat-devkit.git
cd dat-devkit
# 2. Install into a project (pick your language)
./install.sh typescript ~/path/to/project
# or
./install.sh python ~/path/to/project
# 3. Open Claude Code in that project — hooks fire automatically, skills are available

That writes a .claude/ directory into your project containing the rules, hooks, agents, skills, bin scripts, and settings. Re-run any time to update — the managed directories (rules, hooks, agents, bin) are replaced cleanly while your devkit-plan.json and any local skills are preserved.


Install matrix

./install.sh <language...> [/path/to/project] [--target claude|codex|gemini|hermes] [--with <plugin>]... [--dry-run]

Languages (multiple allowed for polyglot repos)

LanguageAdds
typescriptTS coding-style, type-safety, testing, security, GraphQL workflow rules + a GraphQL post-write hook
pythonPython coding-style, type-safety, testing, security rules
./install.sh typescript python ~/path/to/project # both, into rules/typescript/ and rules/python/

Language rules install into per-language subdirectories so they never overwrite each other.

Targets

TargetOutputNotes
claude (default).claude/ with full harnessRules, hooks, agents, skills, bin, settings
codex.codex/AGENTS.mdAll rules concatenated into one instruction file (hooks/skills/agents are Claude-only and skipped)
gemini.gemini/GEMINI.mdSame concatenated-rules bundle for the Gemini CLI
hermes.hermes/ + AGENTS.md at repo root + git hooks symlinked into .git/hooks/Hermes Agent harness — same rules + agents + workflows, plus real git hooks (branch validation, staged-secret scan, conventional commits, protected-branch enforcement, force-push block, fast-test gate on push). See harness/hermes/README.md for the full mapping from the Claude-Code target to Hermes.
./install.sh typescript --target codex ~/path/to/project
./install.sh typescript --target hermes ~/path/to/project

Plugins (--with, repeatable)

./install.sh typescript --with gitlab ~/path/to/project
./install.sh python --with notion-prd ~/path/to/project
./install.sh typescript python --with gitlab --with notion-prd ~/path/to/project

Each plugin's requires field is printed as a post-install note so you know what external tool to set up. See Plugin system below.

Dry run

./install.sh typescript ~/path/to/project --dry-run

Previews every action without writing a byte. Good for sanity-checking before a first install.


Configuration

Project configuration lives in .claude/devkit-plan.json. It is created on first install and kept on subsequent installs so your edits survive updates. Two things live here: git-workflow conventions (read by the branch/commit validators and the /pr skill) and statusline token budgets.

{
"session_tokens": 44000000,
"weekly_tokens": 880000000,
"git_workflow": {
"ticket_required": false,
"branch_types": [
"feat", "fix", "docs", "style", "refactor", "perf",
"test", "build", "ci", "chore", "revert", "hotfix"
],
"commit_types": [
"feat", "fix", "docs", "style", "refactor", "perf",
"test", "build", "ci", "chore", "revert"
],
"ticket_pattern": "[A-Z]+-[0-9]+",
"ticket_examples": ["GH-42", "ABC-123"],
"branch_examples": ["feat/add-oauth", "fix/null-crash", "feat/GH-42"],
"commit_examples": [
"feat(auth): add JWT refresh token endpoint",
"fix: handle null pointer in parser",
"chore: bump deps"
]
}
}
  • ticket_requiredfalse by default. Branches and commits do not need a ticket id (feat/add-oauth is valid). Flip to true to require one matching ticket_pattern (e.g. feat/GH-42).
  • ticket_pattern — ERE regex for the ticket-id portion, used only when ticket_required is true.
  • branch_types / commit_types — the conventional-commit prefixes the validators accept.
  • session_tokens / weekly_tokens — budgets the statusline uses to show usage. Presets for common Claude plans (max_5x, max_20x, team) are listed under _plans in the file — copy the pair you want into the top-level fields.

Skills

Type the slash command in Claude Code, or just describe the task and the skill auto-triggers.

SkillUse it for
/featureFull feature flow: plan → code → test → review. Orchestrates the agents end to end.
/bugfixReproduce → fix → test → review for a single defect.
/reviewStructured code review of the current diff; auto-escalates to a security pass when auth/PII is touched.
/auditSecurity audit of the codebase + dependency vulnerability scan.
/prGuided branch → commit → PR creation following your devkit-plan.json conventions (GitHub gh by default).
/tddTest-first workflow: red → green → refactor, enforcing coverage.
/diagnoseSystematic root-cause investigation for a failing test, flaky behavior, or confusing error.
/feature add a rate limiter to the login endpoint
/bugfix login returns 500 when email is missing
/review
/audit
/pr
/tdd parse ISO-8601 durations
/diagnose why does the cache test fail only in CI

Hooks

Hooks are Bash scripts under .claude/hooks/ fired by Claude Code on tool events. They run automatically — no opt-in. Most are guards that block an unsafe action; a few are automations.

HookEventWhat it does
block-dangerous-bashPreToolUse (Bash)Blocks sudo, rm -rf outside an allowlist, git reset --hard, git clean -fd, curl … | sh, and similar destructive commands.
block-credential-writesPreToolUse (Write/Edit)Refuses writes to .env, *.pem, *.key, credentials.json, ~/.ssh/*, and other secret files (templates like .env.example are allowed).
block-protected-pushPreToolUse (Bash)Blocks direct pushes and force-pushes to protected branches (master, main, plus any you add). Use a PR instead.
pre-push-testsPreToolUse (Bash)Runs the project's tests before a git push. Escape hatch: DEVKIT_PREPUSH_SKIP=1 git push ….
pre-commit-securityPreToolUse (Bash)Scans staged changes for hardcoded secrets before a commit.
validate-branch-namePreToolUse (Bash)Enforces the branch_types / ticket format from devkit-plan.json.
validate-commit-msgPreToolUse (Bash)Enforces conventional-commit format and optional ticket id.
post-write-lintPostToolUse (Write/Edit)Runs the language linter (ESLint / Ruff) on the file just written.
context-monitorPostToolUseTracks context-window usage and warns before you run out of headroom.
pr-review-reminderStopReminds you to run /review before opening a PR.
workflow-resume / workflow-statusSessionStart / PostToolUsePersists and restores in-flight workflow state across sessions.
auth-checkSessionStartVerifies the GitHub CLI (and any plugin CLIs) are authenticated.

Shared helpers live in _lib.sh. The TypeScript layer adds post-write-graphql.sh (GraphQL codegen on schema change).


Plugin system

Plugins are optional, self-contained integrations with a specific tool, kept outside the core harness so the default install stays lean. Each is a directory under plugins/:

plugins/<name>/
├── plugin.json # manifest
├── skills/<skill>/SKILL.md # (optional) skills it adds
├── rules/*.md # (optional) rules it adds
└── hooks/*.sh # (optional) hooks it adds

plugin.json schema

{
"name": "gitlab",
"description": "GitLab merge request creation via the glab CLI or a GitLab MCP server.",
"requires": ["glab CLI"],
"adds": {
"skills": ["gitlab-pr"],
"rules": [],
"hooks": []
}
}
  • name — matches the directory name.
  • description — one sentence on what it integrates.
  • requires — external prerequisites (a CLI, an MCP server, a token). Printed at install time; the plugin is inert without them.
  • adds — which skills / rules / hooks get copied into the project's .claude/.

Available plugins

PluginAddsRequires
gitlab/gitlab-pr skill (GitLab MR creation)glab CLI or a GitLab MCP server
notion-prd/prd-authoring skill (write PRDs in Notion)Notion MCP server + integration token

Writing your own

  1. Create plugins/<name>/plugin.json with the schema above.
  2. Add the skill / rule / hook files it references.
  3. List them under adds, prerequisites under requires.
  4. Install with ./install.sh <lang> --with <name> /scratch/project and confirm the files land in .claude/.

See plugins/README.md for the full guide.


Adapting to your projects

This harness was built for Dat's stack — Vite/React frontends, NestJS services, Next.js/Strapi sites, serverless TypeScript, and Python tooling — but nothing in the core is specific to those. The rules are general engineering discipline, the hooks are stack-agnostic guards, and the language layers (typescript, python) carry the only framework-flavored content. To adapt it:

  • Edit .claude/devkit-plan.json to match your branch/commit conventions and token budgets.
  • Add or remove language layers under harness/<language>/.
  • Keep company- or tool-specific behavior in a plugin, not the core, so the default install stays portable.

GitLab, Notion, and any other vendor integration is a plugin — never a default. The base install assumes only Git and (optionally) the GitHub gh CLI.


Repository structure

dat-devkit/
├── install.sh # installer: languages × targets × plugins
├── README.md
├── LICENSE # MIT
├── package.json
├── .claude-plugin/
│ └── plugin.json # Claude Code plugin manifest
├── harness/
│ ├── common/ # language-agnostic core
│ │ ├── CLAUDE.md # project instructions loaded every session
│ │ ├── settings.json # hook wiring
│ │ ├── settings.local.json # statusline (engineer-local override)
│ │ ├── devkit-plan.json # git workflow + token budgets (kept on update)
│ │ ├── rules/*.md # 13 common rules
│ │ ├── hooks/*.sh # 13 hooks + _lib.sh
│ │ ├── agents/*.md # planner, coder, tester, reviewer, security
│ │ ├── skills/ # feature, bugfix, review, audit, pr, tdd, diagnose
│ │ └── bin/ # statusline, doctor, state, usage scripts
│ ├── typescript/
│ │ ├── rules/*.md # TS coding-style, type-safety, testing, security, graphql
│ │ └── hooks/ # post-write-graphql.sh + hooks-extend.json
│ ├── python/
│ │ └── rules/*.md # Python coding-style, type-safety, testing, security
│ └── hermes/ # Hermes Agent target
│ ├── AGENTS.md # repo-root entry installed by --target hermes
│ ├── agents/*.md # role briefs for delegate_task
│ ├── workflows/*.md # feature, bugfix, review, audit, pr, tdd, diagnose
│ ├── git-hooks/ # pre-commit, commit-msg, pre-push (real git hooks)
│ └── README.md # Claude→Hermes mapping
└── plugins/
├── README.md
├── gitlab/ # /gitlab-pr skill (opt-in)
└── notion-prd/ # /prd-authoring skill (opt-in)

License

MIT © 2026 Dat Nguyen. See LICENSE.

About

Personal Claude Code engineering harness: clean-code rules, security guards, git discipline, GitHub PR workflow, and engineering skills. GitHub-native, ticket-optional, plug-and-play.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

dat-devkit

A personal Claude Code engineering harness — rules, hooks, agents, and skills that enforce engineering discipline on every project. GitHub-native, ticket-optional, plug-and-play extras.

Drop it into any repo with one command and every Claude Code session in that project starts with clean-code rules loaded, security and git-safety hooks armed, specialized agents available, and a set of workflow skills (/feature, /review, /audit, …) one slash away. Built for a personal multi-stack workflow but generic enough for any project.


What you get

LayerCountWhat it does
Rules13 common + TypeScript + PythonCoding style, naming, paradigms, design principles, testing, security, git workflow, code review, agent behavior, context hygiene, worktrees, dangerous-action guardrails. Language layers override common where they conflict.
Hooks13Guards and automations fired on tool events — block dangerous bash, block credential writes, block pushes to protected branches, run tests before push, scan for secrets before commit, validate branch/commit format, lint on write, monitor context, remind about PR review, resume/track workflow, auth check.
Agents5planner, coder, tester, reviewer, security — each with model routing (deep-reasoning models for planning/review, faster models for mechanical work).
Skills7 core/feature, /bugfix, /review, /audit, /pr, /tdd, /diagnose.
Plugins2 optionalgitlab (MR creation via glab), notion-prd (write PRDs in Notion). Opt-in with --with.

Everything is plain files — Markdown rules, Bash hooks, JSON settings. No runtime, no daemon, no lock-in. Read any of it.


Quick start

# 1. Clone
git clone https://github.com/datj9/dat-devkit.git
cd dat-devkit
# 2. Install into a project (pick your language)
./install.sh typescript ~/path/to/project
# or
./install.sh python ~/path/to/project
# 3. Open Claude Code in that project — hooks fire automatically, skills are available

That writes a .claude/ directory into your project containing the rules, hooks, agents, skills, bin scripts, and settings. Re-run any time to update — the managed directories (rules, hooks, agents, bin) are replaced cleanly while your devkit-plan.json and any local skills are preserved.


Install matrix

./install.sh <language...> [/path/to/project] [--target claude|codex|gemini|hermes] [--with <plugin>]... [--dry-run]

Languages (multiple allowed for polyglot repos)

LanguageAdds
typescriptTS coding-style, type-safety, testing, security, GraphQL workflow rules + a GraphQL post-write hook
pythonPython coding-style, type-safety, testing, security rules
./install.sh typescript python ~/path/to/project # both, into rules/typescript/ and rules/python/

Language rules install into per-language subdirectories so they never overwrite each other.

Targets

TargetOutputNotes
claude (default).claude/ with full harnessRules, hooks, agents, skills, bin, settings
codex.codex/AGENTS.mdAll rules concatenated into one instruction file (hooks/skills/agents are Claude-only and skipped)
gemini.gemini/GEMINI.mdSame concatenated-rules bundle for the Gemini CLI
hermes.hermes/ + AGENTS.md at repo root + git hooks symlinked into .git/hooks/Hermes Agent harness — same rules + agents + workflows, plus real git hooks (branch validation, staged-secret scan, conventional commits, protected-branch enforcement, force-push block, fast-test gate on push). See harness/hermes/README.md for the full mapping from the Claude-Code target to Hermes.
./install.sh typescript --target codex ~/path/to/project
./install.sh typescript --target hermes ~/path/to/project

Plugins (--with, repeatable)

./install.sh typescript --with gitlab ~/path/to/project
./install.sh python --with notion-prd ~/path/to/project
./install.sh typescript python --with gitlab --with notion-prd ~/path/to/project

Each plugin's requires field is printed as a post-install note so you know what external tool to set up. See Plugin system below.

Dry run

./install.sh typescript ~/path/to/project --dry-run

Previews every action without writing a byte. Good for sanity-checking before a first install.


Configuration

Project configuration lives in .claude/devkit-plan.json. It is created on first install and kept on subsequent installs so your edits survive updates. Two things live here: git-workflow conventions (read by the branch/commit validators and the /pr skill) and statusline token budgets.

{
"session_tokens": 44000000,
"weekly_tokens": 880000000,
"git_workflow": {
"ticket_required": false,
"branch_types": [
"feat", "fix", "docs", "style", "refactor", "perf",
"test", "build", "ci", "chore", "revert", "hotfix"
],
"commit_types": [
"feat", "fix", "docs", "style", "refactor", "perf",
"test", "build", "ci", "chore", "revert"
],
"ticket_pattern": "[A-Z]+-[0-9]+",
"ticket_examples": ["GH-42", "ABC-123"],
"branch_examples": ["feat/add-oauth", "fix/null-crash", "feat/GH-42"],
"commit_examples": [
"feat(auth): add JWT refresh token endpoint",
"fix: handle null pointer in parser",
"chore: bump deps"
]
}
}
  • ticket_requiredfalse by default. Branches and commits do not need a ticket id (feat/add-oauth is valid). Flip to true to require one matching ticket_pattern (e.g. feat/GH-42).
  • ticket_pattern — ERE regex for the ticket-id portion, used only when ticket_required is true.
  • branch_types / commit_types — the conventional-commit prefixes the validators accept.
  • session_tokens / weekly_tokens — budgets the statusline uses to show usage. Presets for common Claude plans (max_5x, max_20x, team) are listed under _plans in the file — copy the pair you want into the top-level fields.

Skills

Type the slash command in Claude Code, or just describe the task and the skill auto-triggers.

SkillUse it for
/featureFull feature flow: plan → code → test → review. Orchestrates the agents end to end.
/bugfixReproduce → fix → test → review for a single defect.
/reviewStructured code review of the current diff; auto-escalates to a security pass when auth/PII is touched.
/auditSecurity audit of the codebase + dependency vulnerability scan.
/prGuided branch → commit → PR creation following your devkit-plan.json conventions (GitHub gh by default).
/tddTest-first workflow: red → green → refactor, enforcing coverage.
/diagnoseSystematic root-cause investigation for a failing test, flaky behavior, or confusing error.
/feature add a rate limiter to the login endpoint
/bugfix login returns 500 when email is missing
/review
/audit
/pr
/tdd parse ISO-8601 durations
/diagnose why does the cache test fail only in CI

Hooks

Hooks are Bash scripts under .claude/hooks/ fired by Claude Code on tool events. They run automatically — no opt-in. Most are guards that block an unsafe action; a few are automations.

HookEventWhat it does
block-dangerous-bashPreToolUse (Bash)Blocks sudo, rm -rf outside an allowlist, git reset --hard, git clean -fd, curl … | sh, and similar destructive commands.
block-credential-writesPreToolUse (Write/Edit)Refuses writes to .env, *.pem, *.key, credentials.json, ~/.ssh/*, and other secret files (templates like .env.example are allowed).
block-protected-pushPreToolUse (Bash)Blocks direct pushes and force-pushes to protected branches (master, main, plus any you add). Use a PR instead.
pre-push-testsPreToolUse (Bash)Runs the project's tests before a git push. Escape hatch: DEVKIT_PREPUSH_SKIP=1 git push ….
pre-commit-securityPreToolUse (Bash)Scans staged changes for hardcoded secrets before a commit.
validate-branch-namePreToolUse (Bash)Enforces the branch_types / ticket format from devkit-plan.json.
validate-commit-msgPreToolUse (Bash)Enforces conventional-commit format and optional ticket id.
post-write-lintPostToolUse (Write/Edit)Runs the language linter (ESLint / Ruff) on the file just written.
context-monitorPostToolUseTracks context-window usage and warns before you run out of headroom.
pr-review-reminderStopReminds you to run /review before opening a PR.
workflow-resume / workflow-statusSessionStart / PostToolUsePersists and restores in-flight workflow state across sessions.
auth-checkSessionStartVerifies the GitHub CLI (and any plugin CLIs) are authenticated.

Shared helpers live in _lib.sh. The TypeScript layer adds post-write-graphql.sh (GraphQL codegen on schema change).


Plugin system

Plugins are optional, self-contained integrations with a specific tool, kept outside the core harness so the default install stays lean. Each is a directory under plugins/:

plugins/<name>/
├── plugin.json # manifest
├── skills/<skill>/SKILL.md # (optional) skills it adds
├── rules/*.md # (optional) rules it adds
└── hooks/*.sh # (optional) hooks it adds

plugin.json schema

{
"name": "gitlab",
"description": "GitLab merge request creation via the glab CLI or a GitLab MCP server.",
"requires": ["glab CLI"],
"adds": {
"skills": ["gitlab-pr"],
"rules": [],
"hooks": []
}
}
  • name — matches the directory name.
  • description — one sentence on what it integrates.
  • requires — external prerequisites (a CLI, an MCP server, a token). Printed at install time; the plugin is inert without them.
  • adds — which skills / rules / hooks get copied into the project's .claude/.

Available plugins

PluginAddsRequires
gitlab/gitlab-pr skill (GitLab MR creation)glab CLI or a GitLab MCP server
notion-prd/prd-authoring skill (write PRDs in Notion)Notion MCP server + integration token

Writing your own

  1. Create plugins/<name>/plugin.json with the schema above.
  2. Add the skill / rule / hook files it references.
  3. List them under adds, prerequisites under requires.
  4. Install with ./install.sh <lang> --with <name> /scratch/project and confirm the files land in .claude/.

See plugins/README.md for the full guide.


Adapting to your projects

This harness was built for Dat's stack — Vite/React frontends, NestJS services, Next.js/Strapi sites, serverless TypeScript, and Python tooling — but nothing in the core is specific to those. The rules are general engineering discipline, the hooks are stack-agnostic guards, and the language layers (typescript, python) carry the only framework-flavored content. To adapt it:

  • Edit .claude/devkit-plan.json to match your branch/commit conventions and token budgets.
  • Add or remove language layers under harness/<language>/.
  • Keep company- or tool-specific behavior in a plugin, not the core, so the default install stays portable.

GitLab, Notion, and any other vendor integration is a plugin — never a default. The base install assumes only Git and (optionally) the GitHub gh CLI.


Repository structure

dat-devkit/
├── install.sh # installer: languages × targets × plugins
├── README.md
├── LICENSE # MIT
├── package.json
├── .claude-plugin/
│ └── plugin.json # Claude Code plugin manifest
├── harness/
│ ├── common/ # language-agnostic core
│ │ ├── CLAUDE.md # project instructions loaded every session
│ │ ├── settings.json # hook wiring
│ │ ├── settings.local.json # statusline (engineer-local override)
│ │ ├── devkit-plan.json # git workflow + token budgets (kept on update)
│ │ ├── rules/*.md # 13 common rules
│ │ ├── hooks/*.sh # 13 hooks + _lib.sh
│ │ ├── agents/*.md # planner, coder, tester, reviewer, security
│ │ ├── skills/ # feature, bugfix, review, audit, pr, tdd, diagnose
│ │ └── bin/ # statusline, doctor, state, usage scripts
│ ├── typescript/
│ │ ├── rules/*.md # TS coding-style, type-safety, testing, security, graphql
│ │ └── hooks/ # post-write-graphql.sh + hooks-extend.json
│ ├── python/
│ │ └── rules/*.md # Python coding-style, type-safety, testing, security
│ └── hermes/ # Hermes Agent target
│ ├── AGENTS.md # repo-root entry installed by --target hermes
│ ├── agents/*.md # role briefs for delegate_task
│ ├── workflows/*.md # feature, bugfix, review, audit, pr, tdd, diagnose
│ ├── git-hooks/ # pre-commit, commit-msg, pre-push (real git hooks)
│ └── README.md # Claude→Hermes mapping
└── plugins/
├── README.md
├── gitlab/ # /gitlab-pr skill (opt-in)
└── notion-prd/ # /prd-authoring skill (opt-in)

License

MIT © 2026 Dat Nguyen. See LICENSE.

About

Personal Claude Code engineering harness: clean-code rules, security guards, git discipline, GitHub PR workflow, and engineering skills. GitHub-native, ticket-optional, plug-and-play.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

dat-devkit

A personal Claude Code engineering harness — rules, hooks, agents, and skills that enforce engineering discipline on every project. GitHub-native, ticket-optional, plug-and-play extras.

Drop it into any repo with one command and every Claude Code session in that project starts with clean-code rules loaded, security and git-safety hooks armed, specialized agents available, and a set of workflow skills (/feature, /review, /audit, …) one slash away. Built for a personal multi-stack workflow but generic enough for any project.


What you get

LayerCountWhat it does
Rules13 common + TypeScript + PythonCoding style, naming, paradigms, design principles, testing, security, git workflow, code review, agent behavior, context hygiene, worktrees, dangerous-action guardrails. Language layers override common where they conflict.
Hooks13Guards and automations fired on tool events — block dangerous bash, block credential writes, block pushes to protected branches, run tests before push, scan for secrets before commit, validate branch/commit format, lint on write, monitor context, remind about PR review, resume/track workflow, auth check.
Agents5planner, coder, tester, reviewer, security — each with model routing (deep-reasoning models for planning/review, faster models for mechanical work).
Skills7 core/feature, /bugfix, /review, /audit, /pr, /tdd, /diagnose.
Plugins2 optionalgitlab (MR creation via glab), notion-prd (write PRDs in Notion). Opt-in with --with.

Everything is plain files — Markdown rules, Bash hooks, JSON settings. No runtime, no daemon, no lock-in. Read any of it.


Quick start

# 1. Clone
git clone https://github.com/datj9/dat-devkit.git
cd dat-devkit
# 2. Install into a project (pick your language)
./install.sh typescript ~/path/to/project
# or
./install.sh python ~/path/to/project
# 3. Open Claude Code in that project — hooks fire automatically, skills are available

That writes a .claude/ directory into your project containing the rules, hooks, agents, skills, bin scripts, and settings. Re-run any time to update — the managed directories (rules, hooks, agents, bin) are replaced cleanly while your devkit-plan.json and any local skills are preserved.


Install matrix

./install.sh <language...> [/path/to/project] [--target claude|codex|gemini|hermes] [--with <plugin>]... [--dry-run]

Languages (multiple allowed for polyglot repos)

LanguageAdds
typescriptTS coding-style, type-safety, testing, security, GraphQL workflow rules + a GraphQL post-write hook
pythonPython coding-style, type-safety, testing, security rules
./install.sh typescript python ~/path/to/project # both, into rules/typescript/ and rules/python/

Language rules install into per-language subdirectories so they never overwrite each other.

Targets

TargetOutputNotes
claude (default).claude/ with full harnessRules, hooks, agents, skills, bin, settings
codex.codex/AGENTS.mdAll rules concatenated into one instruction file (hooks/skills/agents are Claude-only and skipped)
gemini.gemini/GEMINI.mdSame concatenated-rules bundle for the Gemini CLI
hermes.hermes/ + AGENTS.md at repo root + git hooks symlinked into .git/hooks/Hermes Agent harness — same rules + agents + workflows, plus real git hooks (branch validation, staged-secret scan, conventional commits, protected-branch enforcement, force-push block, fast-test gate on push). See harness/hermes/README.md for the full mapping from the Claude-Code target to Hermes.
./install.sh typescript --target codex ~/path/to/project
./install.sh typescript --target hermes ~/path/to/project

Plugins (--with, repeatable)

./install.sh typescript --with gitlab ~/path/to/project
./install.sh python --with notion-prd ~/path/to/project
./install.sh typescript python --with gitlab --with notion-prd ~/path/to/project

Each plugin's requires field is printed as a post-install note so you know what external tool to set up. See Plugin system below.

Dry run

./install.sh typescript ~/path/to/project --dry-run

Previews every action without writing a byte. Good for sanity-checking before a first install.


Configuration

Project configuration lives in .claude/devkit-plan.json. It is created on first install and kept on subsequent installs so your edits survive updates. Two things live here: git-workflow conventions (read by the branch/commit validators and the /pr skill) and statusline token budgets.

{
"session_tokens": 44000000,
"weekly_tokens": 880000000,
"git_workflow": {
"ticket_required": false,
"branch_types": [
"feat", "fix", "docs", "style", "refactor", "perf",
"test", "build", "ci", "chore", "revert", "hotfix"
],
"commit_types": [
"feat", "fix", "docs", "style", "refactor", "perf",
"test", "build", "ci", "chore", "revert"
],
"ticket_pattern": "[A-Z]+-[0-9]+",
"ticket_examples": ["GH-42", "ABC-123"],
"branch_examples": ["feat/add-oauth", "fix/null-crash", "feat/GH-42"],
"commit_examples": [
"feat(auth): add JWT refresh token endpoint",
"fix: handle null pointer in parser",
"chore: bump deps"
]
}
}
  • ticket_requiredfalse by default. Branches and commits do not need a ticket id (feat/add-oauth is valid). Flip to true to require one matching ticket_pattern (e.g. feat/GH-42).
  • ticket_pattern — ERE regex for the ticket-id portion, used only when ticket_required is true.
  • branch_types / commit_types — the conventional-commit prefixes the validators accept.
  • session_tokens / weekly_tokens — budgets the statusline uses to show usage. Presets for common Claude plans (max_5x, max_20x, team) are listed under _plans in the file — copy the pair you want into the top-level fields.

Skills

Type the slash command in Claude Code, or just describe the task and the skill auto-triggers.

SkillUse it for
/featureFull feature flow: plan → code → test → review. Orchestrates the agents end to end.
/bugfixReproduce → fix → test → review for a single defect.
/reviewStructured code review of the current diff; auto-escalates to a security pass when auth/PII is touched.
/auditSecurity audit of the codebase + dependency vulnerability scan.
/prGuided branch → commit → PR creation following your devkit-plan.json conventions (GitHub gh by default).
/tddTest-first workflow: red → green → refactor, enforcing coverage.
/diagnoseSystematic root-cause investigation for a failing test, flaky behavior, or confusing error.
/feature add a rate limiter to the login endpoint
/bugfix login returns 500 when email is missing
/review
/audit
/pr
/tdd parse ISO-8601 durations
/diagnose why does the cache test fail only in CI

Hooks

Hooks are Bash scripts under .claude/hooks/ fired by Claude Code on tool events. They run automatically — no opt-in. Most are guards that block an unsafe action; a few are automations.

HookEventWhat it does
block-dangerous-bashPreToolUse (Bash)Blocks sudo, rm -rf outside an allowlist, git reset --hard, git clean -fd, curl … | sh, and similar destructive commands.
block-credential-writesPreToolUse (Write/Edit)Refuses writes to .env, *.pem, *.key, credentials.json, ~/.ssh/*, and other secret files (templates like .env.example are allowed).
block-protected-pushPreToolUse (Bash)Blocks direct pushes and force-pushes to protected branches (master, main, plus any you add). Use a PR instead.
pre-push-testsPreToolUse (Bash)Runs the project's tests before a git push. Escape hatch: DEVKIT_PREPUSH_SKIP=1 git push ….
pre-commit-securityPreToolUse (Bash)Scans staged changes for hardcoded secrets before a commit.
validate-branch-namePreToolUse (Bash)Enforces the branch_types / ticket format from devkit-plan.json.
validate-commit-msgPreToolUse (Bash)Enforces conventional-commit format and optional ticket id.
post-write-lintPostToolUse (Write/Edit)Runs the language linter (ESLint / Ruff) on the file just written.
context-monitorPostToolUseTracks context-window usage and warns before you run out of headroom.
pr-review-reminderStopReminds you to run /review before opening a PR.
workflow-resume / workflow-statusSessionStart / PostToolUsePersists and restores in-flight workflow state across sessions.
auth-checkSessionStartVerifies the GitHub CLI (and any plugin CLIs) are authenticated.

Shared helpers live in _lib.sh. The TypeScript layer adds post-write-graphql.sh (GraphQL codegen on schema change).


Plugin system

Plugins are optional, self-contained integrations with a specific tool, kept outside the core harness so the default install stays lean. Each is a directory under plugins/:

plugins/<name>/
├── plugin.json # manifest
├── skills/<skill>/SKILL.md # (optional) skills it adds
├── rules/*.md # (optional) rules it adds
└── hooks/*.sh # (optional) hooks it adds

plugin.json schema

{
"name": "gitlab",
"description": "GitLab merge request creation via the glab CLI or a GitLab MCP server.",
"requires": ["glab CLI"],
"adds": {
"skills": ["gitlab-pr"],
"rules": [],
"hooks": []
}
}
  • name — matches the directory name.
  • description — one sentence on what it integrates.
  • requires — external prerequisites (a CLI, an MCP server, a token). Printed at install time; the plugin is inert without them.
  • adds — which skills / rules / hooks get copied into the project's .claude/.

Available plugins

PluginAddsRequires
gitlab/gitlab-pr skill (GitLab MR creation)glab CLI or a GitLab MCP server
notion-prd/prd-authoring skill (write PRDs in Notion)Notion MCP server + integration token

Writing your own

  1. Create plugins/<name>/plugin.json with the schema above.
  2. Add the skill / rule / hook files it references.
  3. List them under adds, prerequisites under requires.
  4. Install with ./install.sh <lang> --with <name> /scratch/project and confirm the files land in .claude/.

See plugins/README.md for the full guide.


Adapting to your projects

This harness was built for Dat's stack — Vite/React frontends, NestJS services, Next.js/Strapi sites, serverless TypeScript, and Python tooling — but nothing in the core is specific to those. The rules are general engineering discipline, the hooks are stack-agnostic guards, and the language layers (typescript, python) carry the only framework-flavored content. To adapt it:

  • Edit .claude/devkit-plan.json to match your branch/commit conventions and token budgets.
  • Add or remove language layers under harness/<language>/.
  • Keep company- or tool-specific behavior in a plugin, not the core, so the default install stays portable.

GitLab, Notion, and any other vendor integration is a plugin — never a default. The base install assumes only Git and (optionally) the GitHub gh CLI.


Repository structure

dat-devkit/
├── install.sh # installer: languages × targets × plugins
├── README.md
├── LICENSE # MIT
├── package.json
├── .claude-plugin/
│ └── plugin.json # Claude Code plugin manifest
├── harness/
│ ├── common/ # language-agnostic core
│ │ ├── CLAUDE.md # project instructions loaded every session
│ │ ├── settings.json # hook wiring
│ │ ├── settings.local.json # statusline (engineer-local override)
│ │ ├── devkit-plan.json # git workflow + token budgets (kept on update)
│ │ ├── rules/*.md # 13 common rules
│ │ ├── hooks/*.sh # 13 hooks + _lib.sh
│ │ ├── agents/*.md # planner, coder, tester, reviewer, security
│ │ ├── skills/ # feature, bugfix, review, audit, pr, tdd, diagnose
│ │ └── bin/ # statusline, doctor, state, usage scripts
│ ├── typescript/
│ │ ├── rules/*.md # TS coding-style, type-safety, testing, security, graphql
│ │ └── hooks/ # post-write-graphql.sh + hooks-extend.json
│ ├── python/
│ │ └── rules/*.md # Python coding-style, type-safety, testing, security
│ └── hermes/ # Hermes Agent target
│ ├── AGENTS.md # repo-root entry installed by --target hermes
│ ├── agents/*.md # role briefs for delegate_task
│ ├── workflows/*.md # feature, bugfix, review, audit, pr, tdd, diagnose
│ ├── git-hooks/ # pre-commit, commit-msg, pre-push (real git hooks)
│ └── README.md # Claude→Hermes mapping
└── plugins/
├── README.md
├── gitlab/ # /gitlab-pr skill (opt-in)
└── notion-prd/ # /prd-authoring skill (opt-in)

License

MIT © 2026 Dat Nguyen. See LICENSE.

About

Personal Claude Code engineering harness: clean-code rules, security guards, git discipline, GitHub PR workflow, and engineering skills. GitHub-native, ticket-optional, plug-and-play.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Repository files navigation

dat-devkit

A personal Claude Code engineering harness — rules, hooks, agents, and skills that enforce engineering discipline on every project. GitHub-native, ticket-optional, plug-and-play extras.

Drop it into any repo with one command and every Claude Code session in that project starts with clean-code rules loaded, security and git-safety hooks armed, specialized agents available, and a set of workflow skills (/feature, /review, /audit, …) one slash away. Built for a personal multi-stack workflow but generic enough for any project.


What you get

LayerCountWhat it does
Rules13 common + TypeScript + PythonCoding style, naming, paradigms, design principles, testing, security, git workflow, code review, agent behavior, context hygiene, worktrees, dangerous-action guardrails. Language layers override common where they conflict.
Hooks13Guards and automations fired on tool events — block dangerous bash, block credential writes, block pushes to protected branches, run tests before push, scan for secrets before commit, validate branch/commit format, lint on write, monitor context, remind about PR review, resume/track workflow, auth check.
Agents5planner, coder, tester, reviewer, security — each with model routing (deep-reasoning models for planning/review, faster models for mechanical work).
Skills7 core/feature, /bugfix, /review, /audit, /pr, /tdd, /diagnose.
Plugins2 optionalgitlab (MR creation via glab), notion-prd (write PRDs in Notion). Opt-in with --with.

Everything is plain files — Markdown rules, Bash hooks, JSON settings. No runtime, no daemon, no lock-in. Read any of it.


Quick start

# 1. Clone
git clone https://github.com/datj9/dat-devkit.git
cd dat-devkit
# 2. Install into a project (pick your language)
./install.sh typescript ~/path/to/project
# or
./install.sh python ~/path/to/project
# 3. Open Claude Code in that project — hooks fire automatically, skills are available

That writes a .claude/ directory into your project containing the rules, hooks, agents, skills, bin scripts, and settings. Re-run any time to update — the managed directories (rules, hooks, agents, bin) are replaced cleanly while your devkit-plan.json and any local skills are preserved.


Install matrix

./install.sh <language...> [/path/to/project] [--target claude|codex|gemini|hermes] [--with <plugin>]... [--dry-run]

Languages (multiple allowed for polyglot repos)

LanguageAdds
typescriptTS coding-style, type-safety, testing, security, GraphQL workflow rules + a GraphQL post-write hook
pythonPython coding-style, type-safety, testing, security rules
./install.sh typescript python ~/path/to/project # both, into rules/typescript/ and rules/python/

Language rules install into per-language subdirectories so they never overwrite each other.

Targets

TargetOutputNotes
claude (default).claude/ with full harnessRules, hooks, agents, skills, bin, settings
codex.codex/AGENTS.mdAll rules concatenated into one instruction file (hooks/skills/agents are Claude-only and skipped)
gemini.gemini/GEMINI.mdSame concatenated-rules bundle for the Gemini CLI
hermes.hermes/ + AGENTS.md at repo root + git hooks symlinked into .git/hooks/Hermes Agent harness — same rules + agents + workflows, plus real git hooks (branch validation, staged-secret scan, conventional commits, protected-branch enforcement, force-push block, fast-test gate on push). See harness/hermes/README.md for the full mapping from the Claude-Code target to Hermes.
./install.sh typescript --target codex ~/path/to/project
./install.sh typescript --target hermes ~/path/to/project

Plugins (--with, repeatable)

./install.sh typescript --with gitlab ~/path/to/project
./install.sh python --with notion-prd ~/path/to/project
./install.sh typescript python --with gitlab --with notion-prd ~/path/to/project

Each plugin's requires field is printed as a post-install note so you know what external tool to set up. See Plugin system below.

Dry run

./install.sh typescript ~/path/to/project --dry-run

Previews every action without writing a byte. Good for sanity-checking before a first install.


Configuration

Project configuration lives in .claude/devkit-plan.json. It is created on first install and kept on subsequent installs so your edits survive updates. Two things live here: git-workflow conventions (read by the branch/commit validators and the /pr skill) and statusline token budgets.

{
"session_tokens": 44000000,
"weekly_tokens": 880000000,
"git_workflow": {
"ticket_required": false,
"branch_types": [
"feat", "fix", "docs", "style", "refactor", "perf",
"test", "build", "ci", "chore", "revert", "hotfix"
],
"commit_types": [
"feat", "fix", "docs", "style", "refactor", "perf",
"test", "build", "ci", "chore", "revert"
],
"ticket_pattern": "[A-Z]+-[0-9]+",
"ticket_examples": ["GH-42", "ABC-123"],
"branch_examples": ["feat/add-oauth", "fix/null-crash", "feat/GH-42"],
"commit_examples": [
"feat(auth): add JWT refresh token endpoint",
"fix: handle null pointer in parser",
"chore: bump deps"
]
}
}
  • ticket_requiredfalse by default. Branches and commits do not need a ticket id (feat/add-oauth is valid). Flip to true to require one matching ticket_pattern (e.g. feat/GH-42).
  • ticket_pattern — ERE regex for the ticket-id portion, used only when ticket_required is true.
  • branch_types / commit_types — the conventional-commit prefixes the validators accept.
  • session_tokens / weekly_tokens — budgets the statusline uses to show usage. Presets for common Claude plans (max_5x, max_20x, team) are listed under _plans in the file — copy the pair you want into the top-level fields.

Skills

Type the slash command in Claude Code, or just describe the task and the skill auto-triggers.

SkillUse it for
/featureFull feature flow: plan → code → test → review. Orchestrates the agents end to end.
/bugfixReproduce → fix → test → review for a single defect.
/reviewStructured code review of the current diff; auto-escalates to a security pass when auth/PII is touched.
/auditSecurity audit of the codebase + dependency vulnerability scan.
/prGuided branch → commit → PR creation following your devkit-plan.json conventions (GitHub gh by default).
/tddTest-first workflow: red → green → refactor, enforcing coverage.
/diagnoseSystematic root-cause investigation for a failing test, flaky behavior, or confusing error.
/feature add a rate limiter to the login endpoint
/bugfix login returns 500 when email is missing
/review
/audit
/pr
/tdd parse ISO-8601 durations
/diagnose why does the cache test fail only in CI

Hooks

Hooks are Bash scripts under .claude/hooks/ fired by Claude Code on tool events. They run automatically — no opt-in. Most are guards that block an unsafe action; a few are automations.

HookEventWhat it does
block-dangerous-bashPreToolUse (Bash)Blocks sudo, rm -rf outside an allowlist, git reset --hard, git clean -fd, curl … | sh, and similar destructive commands.
block-credential-writesPreToolUse (Write/Edit)Refuses writes to .env, *.pem, *.key, credentials.json, ~/.ssh/*, and other secret files (templates like .env.example are allowed).
block-protected-pushPreToolUse (Bash)Blocks direct pushes and force-pushes to protected branches (master, main, plus any you add). Use a PR instead.
pre-push-testsPreToolUse (Bash)Runs the project's tests before a git push. Escape hatch: DEVKIT_PREPUSH_SKIP=1 git push ….
pre-commit-securityPreToolUse (Bash)Scans staged changes for hardcoded secrets before a commit.
validate-branch-namePreToolUse (Bash)Enforces the branch_types / ticket format from devkit-plan.json.
validate-commit-msgPreToolUse (Bash)Enforces conventional-commit format and optional ticket id.
post-write-lintPostToolUse (Write/Edit)Runs the language linter (ESLint / Ruff) on the file just written.
context-monitorPostToolUseTracks context-window usage and warns before you run out of headroom.
pr-review-reminderStopReminds you to run /review before opening a PR.
workflow-resume / workflow-statusSessionStart / PostToolUsePersists and restores in-flight workflow state across sessions.
auth-checkSessionStartVerifies the GitHub CLI (and any plugin CLIs) are authenticated.

Shared helpers live in _lib.sh. The TypeScript layer adds post-write-graphql.sh (GraphQL codegen on schema change).


Plugin system

Plugins are optional, self-contained integrations with a specific tool, kept outside the core harness so the default install stays lean. Each is a directory under plugins/:

plugins/<name>/
├── plugin.json # manifest
├── skills/<skill>/SKILL.md # (optional) skills it adds
├── rules/*.md # (optional) rules it adds
└── hooks/*.sh # (optional) hooks it adds

plugin.json schema

{
"name": "gitlab",
"description": "GitLab merge request creation via the glab CLI or a GitLab MCP server.",
"requires": ["glab CLI"],
"adds": {
"skills": ["gitlab-pr"],
"rules": [],
"hooks": []
}
}
  • name — matches the directory name.
  • description — one sentence on what it integrates.
  • requires — external prerequisites (a CLI, an MCP server, a token). Printed at install time; the plugin is inert without them.
  • adds — which skills / rules / hooks get copied into the project's .claude/.

Available plugins

PluginAddsRequires
gitlab/gitlab-pr skill (GitLab MR creation)glab CLI or a GitLab MCP server
notion-prd/prd-authoring skill (write PRDs in Notion)Notion MCP server + integration token

Writing your own

  1. Create plugins/<name>/plugin.json with the schema above.
  2. Add the skill / rule / hook files it references.
  3. List them under adds, prerequisites under requires.
  4. Install with ./install.sh <lang> --with <name> /scratch/project and confirm the files land in .claude/.

See plugins/README.md for the full guide.


Adapting to your projects

This harness was built for Dat's stack — Vite/React frontends, NestJS services, Next.js/Strapi sites, serverless TypeScript, and Python tooling — but nothing in the core is specific to those. The rules are general engineering discipline, the hooks are stack-agnostic guards, and the language layers (typescript, python) carry the only framework-flavored content. To adapt it:

  • Edit .claude/devkit-plan.json to match your branch/commit conventions and token budgets.
  • Add or remove language layers under harness/<language>/.
  • Keep company- or tool-specific behavior in a plugin, not the core, so the default install stays portable.

GitLab, Notion, and any other vendor integration is a plugin — never a default. The base install assumes only Git and (optionally) the GitHub gh CLI.


Repository structure

dat-devkit/
├── install.sh # installer: languages × targets × plugins
├── README.md
├── LICENSE # MIT
├── package.json
├── .claude-plugin/
│ └── plugin.json # Claude Code plugin manifest
├── harness/
│ ├── common/ # language-agnostic core
│ │ ├── CLAUDE.md # project instructions loaded every session
│ │ ├── settings.json # hook wiring
│ │ ├── settings.local.json # statusline (engineer-local override)
│ │ ├── devkit-plan.json # git workflow + token budgets (kept on update)
│ │ ├── rules/*.md # 13 common rules
│ │ ├── hooks/*.sh # 13 hooks + _lib.sh
│ │ ├── agents/*.md # planner, coder, tester, reviewer, security
│ │ ├── skills/ # feature, bugfix, review, audit, pr, tdd, diagnose
│ │ └── bin/ # statusline, doctor, state, usage scripts
│ ├── typescript/
│ │ ├── rules/*.md # TS coding-style, type-safety, testing, security, graphql
│ │ └── hooks/ # post-write-graphql.sh + hooks-extend.json
│ ├── python/
│ │ └── rules/*.md # Python coding-style, type-safety, testing, security
│ └── hermes/ # Hermes Agent target
│ ├── AGENTS.md # repo-root entry installed by --target hermes
│ ├── agents/*.md # role briefs for delegate_task
│ ├── workflows/*.md # feature, bugfix, review, audit, pr, tdd, diagnose
│ ├── git-hooks/ # pre-commit, commit-msg, pre-push (real git hooks)
│ └── README.md # Claude→Hermes mapping
└── plugins/
├── README.md
├── gitlab/ # /gitlab-pr skill (opt-in)
└── notion-prd/ # /prd-authoring skill (opt-in)

License

MIT © 2026 Dat Nguyen. See LICENSE.

About

Personal Claude Code engineering harness: clean-code rules, security guards, git discipline, GitHub PR workflow, and engineering skills. GitHub-native, ticket-optional, plug-and-play.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages