Skip to content
Agentmart
Submit a tool

harness-mode

Session-scoped local-hook mode picker — fast (all optional local hooks off), full (default, all on), or custom (interactive per-local-hook picker via…

Skill by sh-ai-x

IndexedMIT★ 1
Write a review

Chalk Labs

Need help deploying harness-mode?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/sh-ai-x-harness-mode

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Session-scoped local-hook mode picker — fast (all optional local hooks off), full (default, all on), or custom (interactive per-local-hook picker via AskUserQuestion).

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/harness-mode

Tools it pre-approves 3

From allowed-tools in SKILL.md: the agent may use these without asking you each time.

  • Read
  • Bash
  • AskUserQuestion

What's inside

Skill name
harness-mode
Description
Session-scoped local-hook mode picker — fast (all optional local hooks off), full (default, all on), or custom (interactive per-local-hook picker via AskUserQuestion).
License
MIT
Allowed tools
Read, Bash, AskUserQuestion
Instructions
208 lines in SKILL.md · view on GitHub

Before installing

  • Pre-approves any shell command

Files (1)

  • SKILL.md

SKILL.md (first lines)

> [← Skills index](../../README.md)

# /dev-kit:harness-mode — session-scoped local-hook mode

## What it does

Writes `.dev-kit/harness-mode.session.json` via `lib/harness_mode_state.py`,
which every gated skill and local hook (for example
`hooks/slop-detector.sh` and `lib/execute.py`'s intent-integrity gate) reads
on each invocation. Four **correctness local hooks** — `stop_verify`,
`secret_scan`, `intent_integrity` (high), `gh_ci_required` — are hardcoded
in `lib/harness_mode_state.resolved_gate()` to always resolve `"on"`; no
mode, and no hand-edited state file, can turn them off.

**Session-scoped, not project-level.** A SessionStart hook
(`hooks/session-start-harness-mode-reset.sh`) resets the state file to
`{"mode": "full"}` at the start of every session. A new window always starts
strict — `fast` or `custom` must be chosen explicitly every session.

**This skill controls *local hooks only*.** The GH-Actions workflow gates
(review / security / maintenance / severity gate / lint / test / validate /
merge-queue-ready-check / ...) are out of scope — see
[CI workflow gates (not affected by harness-mode)](#ci-workflow-gates-not-affected-by-harness-mode)
below.

## Sub-commands

```bash
/dev-kit:harness-mode fast     # instant: every optional local hook OFF, correctness local hooks stay ON
/dev-kit:harness-mode full     # instant: everything ON (this is also the SessionStart default)
/dev-kit:harness-mode custom   # interactive: pick each optional local hook individually
/dev-kit:harness-mode show     # print the resolved local-hook table for this session, no prompts
```

### `fast` / `full`

Run directly, no confirmation needed:

```bash
python3 -m lib.harness_mode_state write fast
python3 -m lib.harness_mode_state write full
```

Then print the resolved table (`python3 -m lib.harness_mode_state show`) so the
user sees exactly what changed.

### `custom`

Issue exactly two `AskUserQuestion` calls, with at most 3 questions per call.
**Call 1 must complete before Call 2 is issued** — keep the screens legible.

Each row's `Question` cell now explicitly names the local hook (so the user
knows they are toggling a *local* switch, not a CI workflow gate) and the
`Options` cell names the trade-off (e.g. "skipping defers to CI" for the
gates CI re-checks anyway).

**Call 1:**

| Question | Options |
|---|---|
| Run the **slop-detector** local hook on each write? | Keep it ON (Recommended) / Skip locally (CI slop-detector + review gate re-runs) |
| Run the **pre-commit codex:review** local hook before each commit? | Keep it ON (Recommended) / Skip locally (no CI equivalent) |

**Call 2:**

| Question | Options |
|---|---|
| Run the **maintenance** local hook (CC/OE/VM) before each commit? | Keep it ON (Recommended) / Skip locally (CI `/dev-kit:maintenance` always re-runs) |
| **security_owasp** local hook depth this session? | Full 10-dim OWASP fan-out (Recommended) / Quick single-dim summary / Skip locally |
| **babysit_pr** local hook behavior? | Full auto-fix polling loop (Recommended) / Manual: one `gh pr checks` dump + exit |

Map each answer to a gate key and write them all in one call:

```bash
python3 -m lib.harness_mode_state write custom --gates '{
  "slop_detector": "on",
  "pre_commit_review": "off",
  "maintenance": "on",
  "security_owasp": "quick",
  "babysit_pr": "manual"
}'
```

Correctness gates must never appear as `AskUserQuestion` options and must
never be written into `--gates` — `lib/harness_mode_state.write_state()`
silently drops any correctness-gate key passed to it as defense in depth, but
the picker itself should not offer them at all.

**Non-interactive fallback**: if `AskUserQuestion` is unavailable (e.g. a
headless/CI invocation), print the same 5 questions as a markdown table and
tell the caller to run `fast` or `full` instead of hanging on interactive
input.

### `show`

```bash
python3 -m lib.harness_mode_state show
```

Prints the current `mode` plus the resolved value of every local hook grouped
by category (correctness / quality / style / process), with a one-line
`description` per hook so readers know what each one does. Example:

```json
{
  "mode": "full",
  "local_hooks": {
    "correctness": {
      "stop_verify":     {"value": "on",   "type": "local_hook", "description": "L3 evidence: refuse 'done' without quoted exit code + test count + log"},
      "secret_scan":     {"value": "on",   "type": "local_hook", "description": "credential-leak detection on every Write/Edit"},
      "intent_integrity":{"value": "on",   "type": "local_hook", "description": "plan-vs-execution drift detection"},
      "gh_ci_required":  {"value": "on",   "type": "local_hook", "description": "refuse edits that would break GH-Actions"}
    },
    "quality": {
      "security_owasp":  {"value": "full", "type": "local_hook", "description": "local security scan depth (full 10-dim / quick / off)"}
    },
    "style": {
      "slop_detector":   {"value": "on",   "type": "local_hook", "description": "TODO/stub/placeholder markers on every Write/Edit"},
      "maintenance":     {"value": "on",   "type": "local_hook", "description": "code-sanity (CC/OE/VM) gate, locally"}
    },

From sh-ai-x/dev-harness-kit, MIT.

More from sh-ai-x/dev-harness-kit

Signals

Stars
1
Forks
2
Open issues
8
Last commit (this folder)
Sep 29, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from sh-ai-x

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get harness-mode running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying harness-mode?

CallGet help
Cite this page

harness-mode skill. Agent Mart. https://agentmart.dev/skills/sh-ai-x-harness-mode (last updated 2026-10-24)