/harness-engineering:harness-engineeringfrom harness-engineering
Use when the user wants to set up new Node/TypeScript projects or add enforcement tooling to an existing project. Also use when the user says "set up my project", "add quality enforcement", or "initialize typescript project".
Ships in harness-engineering. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Before any other step, resolve the skill's install directory:
SKILL_DIR=$(find ~/.claude/plugins -path "*/harness-engineering/SKILL.md" -print -quit | xargs dirname)
SCRIPTS_DIR=$SKILL_DIR/scripts
TEMPLATES_DIR=$SKILL_DIR/templates
REFERENCES_DIR=$SKILL_DIR/references
If SKILL_DIR is empty, halt and tell the user: "Could not locate the setup plugin directory under ~/.claude/plugins. Verify the plugin is installed."
Check the working directory for these manifest files: package.json, pyproject.toml, Makefile.
Also check for: .git/, src/, existing CLAUDE.md.
Determine:
.git/, effectively an empty directoryFor existing projects, record the detected stack so Phase 2 question can be skipped where answers are already known.
Use the AskUserQuestion tool for each question, one at a time. Adapt or skip questions based on what was detected in Phase 1.
Q1 — Purpose (always ask): "What are you building?" — understand whether this is a web app, REST API, CLI tool, data pipeline, library, etc.
Q2 — Language/stack (skip if inferred from manifest): "What language/stack would you like to use?"
Recommend based on the answer to Q1:
Q3 — Framework (skip if inferred; options depend on stack chosen):
Q4 — Project name (new projects only): "What should the project be called?" — suggest the current directory name as the default.
Do not ask about things you can infer.
Skip this phase entirely for existing projects.
Node/TypeScript path (fast path - script does the work):
node $SCRIPTS_DIR/init-project.js --name=<name> --framework=<framework>
The script creates:
package.json with TypeScript, oxlint, oxfmt, Vitest depstsconfig.base.json and tsconfig.build.jsonvitest.config.ts with coverage thresholds (75%).oxlintrc.json and .oxfmtrc.jsonc for linting/formatting.gitignore, pnpm-workspace.yamlsrc/, tests/, scripts/, docs/ directoriessrc/index.ts entry pointtests/setup.ts test setup fileAll other stacks (adaptive path - Claude does the work):
git initsrc/, tests/, scripts/, docs/READ $REFERENCES_DIR/enforcement-scripts.md first to understand the enforcement principles and the secret-scanning regex patterns before writing any scripts.
Node/TypeScript path (fast path):
node $SCRIPTS_DIR/install-enforcement.js --target=<project-root>
This installs:
.git/hooks/pre-commit and .git/hooks/pre-pushscripts/lib/:
check-secrets.js - Scan for API keys, tokenscheck-file-sizes.js - Enforce 300-line file limitvalidate-docs.js - CLAUDE.md drift detectiongenerate-docs.js - Auto-generate doc sectionsgenerate-docs-helpers.js - Helper functionsPre-commit hook runs:
Pre-push hook runs:
All other stacks (adaptive path - Claude creates equivalent enforcement):
Use the equivalents table to choose the right tools:
| Enforcement | Node/TS | Python |
|---|---|---|
| Linter | oxlint | ruff |
| Formatter | oxfmt | ruff format |
| Test runner | Vitest | pytest |
| Pre-commit mgr | git hooks | pre-commit framework |
Read $REFERENCES_DIR/claude-md-guide.md first for quality guidelines - the goal is a dense, high-signal file where every line saves a future session from re-discovery.
Read $TEMPLATES_DIR/project-claude.md as the base pattern to follow.
Node/TypeScript:
node $SCRIPTS_DIR/generate-claude-md.js --target=<project-root> --framework=<framework>
All stacks (or if the script doesn't exist yet) - Claude generates CLAUDE.md directly:
Adapt the template to include:
src/, tests/, scripts/ layout and what goes whereIf no global CLAUDE.md exists in the project's parent directory, read $TEMPLATES_DIR/global-claude.md and generate an adapted version.
After all phases complete, output a summary that includes:
pnpm test - Run testspnpm lint - Run oxlintpnpm lint:fix - Fix linting issuespnpm format - Format with oxfmtpnpm typecheck - TypeScript type checkingpnpm check - Run all checks (format + lint + test)[bracketed placeholders] in CLAUDE.mdreferences/claude-md-guide.md (opens in a new tab)references/enforcement-scripts.md (opens in a new tab)scripts/generate-claude-md.js (opens in a new tab)scripts/hooks/pre-commit (opens in a new tab)scripts/hooks/pre-push (opens in a new tab)scripts/init-project.js (opens in a new tab)scripts/install-enforcement.js (opens in a new tab)scripts/lib/check-file-sizes.js (opens in a new tab)scripts/lib/check-secrets.js (opens in a new tab)scripts/lib/generate-docs-helpers.js (opens in a new tab)scripts/lib/generate-docs.js (opens in a new tab)scripts/lib/validate-docs.js (opens in a new tab)templates/gitignore-template (opens in a new tab)templates/global-claude.md (opens in a new tab)templates/project-claude.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub nampq11/agent-scripts --plugin harness-engineeringOther plugins' skills for the same job