From 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".
How this skill is triggered — by the user, by Claude, or both
Slash command
/harness-engineering:harness-engineeringThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Before any other step, resolve the skill's install directory:
references/claude-md-guide.mdreferences/enforcement-scripts.mdscripts/generate-claude-md.jsscripts/hooks/pre-commitscripts/hooks/pre-pushscripts/init-project.jsscripts/install-enforcement.jsscripts/lib/check-file-sizes.jsscripts/lib/check-secrets.jsscripts/lib/generate-docs-helpers.jsscripts/lib/generate-docs.jsscripts/lib/validate-docs.jstemplates/gitignore-templatetemplates/global-claude.mdtemplates/project-claude.mdBefore 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.mdnpx claudepluginhub nampq11/agent-scripts --plugin harness-engineeringBootstraps new projects interactively (Node/TS scripted, others manual) or adds enforcement tooling (TDD, secret scanning, file limits, git hooks, CLAUDE.md) to existing projects.
Use when launching a new project, initializing a repository, or building a codebase from the ground up - addresses directory structure, tooling configuration, linting, testing infrastructure, CI/CD pipelines, and version control setup
Bootstraps new projects or improves existing ones with best practices for structure, git, documentation, testing, code quality, dependencies, dev workflow, and CI/CD.