harness-init

harness-init is a skill for Claude Code from waqas1412/claude-harness. It costs 0 tokens per session (3,633 once invoked), scanned A, original, MIT.

A repository setup process that scans a codebase and creates project-specific navigation notes, conventions, memory files, and a profile of its tools and verification commands.

In plain words
What is it for?
Use it when starting work in a repository to document its structure, technology stack, key areas, test and build commands, and project assumptions.
Why use it?
It gives coding agents a map of the repository so they can find relevant areas and follow the project's practices more consistently.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Part of the harness plugin — 9 skills, 16 agents, 2 hooks shipped together

Good fit Use it when starting work in a repository to document its structure, technology stack, key areas, test and build commands, and project assumptions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/waqas1412/claude-harness/harness-init
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add waqas1412/claude-harness --skill harness-init
Clone the repo
git clone --depth 1 https://github.com/waqas1412/claude-harness

Made for: Claude Code.

Or install harness, the plugin that ships this one along with the rest of its 9 skills, 16 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for harness-init

README.md
[![agentmods](https://agentmods.dev/badge/skills/waqas1412/claude-harness/harness-init/github.svg)](https://agentmods.dev/skills/waqas1412/claude-harness/harness-init)
Your own site
<a href="https://agentmods.dev/skills/waqas1412/claude-harness/harness-init"><img src="https://agentmods.dev/badge/skills/waqas1412/claude-harness/harness-init/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for harness-init

Your own site · 80×15
<a href="https://agentmods.dev/skills/waqas1412/claude-harness/harness-init"><img src="https://agentmods.dev/badge/skills/waqas1412/claude-harness/harness-init.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,633 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.03633
Opus 5 $0.00000 $0.01817
Sonnet 5 $0.00000 $0.00727
Haiku 4.5 $0.00000 $0.00363

Measured 4d ago against content hash acd529331930, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

harness-init scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (assets/verify-generated.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/harness/skills/harness-init/SKILL.md · 249 lines

How it starts

The opening of the file, as written. The whole thing — 249 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/harness-init: self-adapting project bootstrap

Generate this repository's navigation harness by scanning it and emitting four artifacts that follow a documented pattern. Run autonomously: infer everything you can, write the files, and record any assumption you had to make in the profile so the user can correct it. Ask the user only if a decision is genuinely blocking and cannot be inferred (rare).

For a large or multi-package repo, fan out: use Explore or parallel agents to map areas in parallel, then synthesize. The main loop owns the file writes.

What you produce

  1. CLAUDE.md (repo root) plus the root router index.
  2. .claude/repo-index/<area>.md one deep index per area (read on demand, not auto-loaded).
  3. .claude/meta/navigation.md the on-demand reference layer (includes an orchestration map).
  4. .claude/harness/profile.md the project profile (repo slug, tracker, verify commands, stack flags).
  5. .claude/memory/ a project memory scaffold (one starter fact plus a MEMORY.md index).

Optional with --emit codex: a root AGENTS.md mirroring the same model for Codex and Cursor.

Wrap generated content between <!-- harness:start --> and <!-- harness:end --> markers so a later --refresh replaces only the managed block and leaves any hand-written prose intact. If a target file already exists without markers, back it up to <name>.bak.<timestamp> before writing.

Phase 1: Detect (do not write yet)

Run a fast, read-only scan. Prefer Bash one-liners and Glob over reading whole files.

  • Repo identity: git remote get-url origin (derive owner/repo), git rev-parse --show-toplevel.
  • Default branch: git symbolic-ref --quiet refs/remotes/origin/HEAD (strip origin/); fall back to main then master if unresolved.
  • Monorepo vs single: look for multiple sub-projects each with their own manifest (package.json, go.mod, pyproject.toml, Cargo.toml, pom.xml, build.gradle, *.csproj, Gemfile). One area per manifest dir; otherwise treat the root as a single area.
  • Stack per area: infer from the manifest plus lockfile:
    • Node: package.json (+ yarn.lock -> yarn, pnpm-lock.yaml -> pnpm, package-lock.json -> npm, bun.lockb -> bun). Read the scripts block for lint/test/build.
    • Go: go.mod (+ a Makefile: read targets for lint, test, build, sqlc).
    • Python: pyproject.toml (+ uv.lock -> uv, poetry.lock -> poetry); detect ruff/pytest/mypy.
    • Rust Cargo.toml; Ruby Gemfile; Java/Kotlin pom.xml/build.gradle; .NET *.csproj.
  • Verify commands (the most important output): resolve concrete LINT_CMD, UNIT_TEST_CMD, BUILD_CMD, and E2E_TEST_CMD per area from the scripts/targets above. Quote them exactly as a user would type them (e.g. yarn lint, make test, uv run pytest, go build ./...).
  • Docs and rules: find AGENTS.md, CLAUDE.md, README*, CONTRIBUTING*, docs/**, and any spec/KB dirs. Note per-area AGENTS.md as authoritative.
  • Setup and environment quirks: check for .env.example/.env.sample, .envrc, .tool-versions/.nvmrc, docker-compose*.yml, a .devcontainer, and a README Setup/Prerequisites/Getting-started section. Route real signals to the profile (Phase 2) and the Phase 6 memory fact; do not add a new root CLAUDE.md section for these.
  • Deny zones: standard ignores plus anything large/generated you actually see (node_modules, .next, dist, build, out, target, cdk.out, .git, .venv, __pycache__, *.egg-info, vendor, generated sqlc/codegen dirs, test-report/snapshot dirs).
  • Tracker prefix: infer from branch and commit history (git log --oneline -50, git branch -a): a recurring [A-Z]{2,}-\d+ token is the prefix (e.g. PROJ-, JIRA-, OPS-). If none is found, leave TICKET_PREFIX empty and note that /pr and /ticket should fall back to GitHub issue refs.
  • Routing triggers: for each area, identify the dirs that own the common intents (entrypoints, HTTP handlers/routes, data layer, shared libs, UI components, config, tests). These become Section 2.

Read the full file on GitHub · 249 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago Changed acd529331930
  2. 12d ago First seen · 249 lines · 0 tokens per session scan A b7a661f185a2

Subscribe to this mod's changes

harness-init is a skill published in the GitHub repository waqas1412/claude-harness (1 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,633 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories