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".
npx claudepluginhub nampq11/agent-scripts --plugin harness-engineeringThis skill uses the workspace's default tool permissions.
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.mdGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
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.md