forge-harness
Scaffolds an agentic harness into a target repository — AGENTS.md or CLAUDE.md, feature_list.json, progress.md, init.sh, and session-handoff.md. Detects the target's stack (Node, Python, PHP, Go, Rust, Java, .NET) and emits stack-appropriate verification commands — framework-aware for Laravel/Filament, Django, and uv-managed Python. Use when the user asks to "scaffold a harness", "add AGENTS.md", "set up CLAUDE.md", "make this repo agent-ready", "create a feature tracker for this repo", "add session continuity", or "audit this repo's agent harness". Do NOT use for creating a Claude Code skill (use forge-skill instead) or for improving an existing skill (use improve-skill).
What this skill does
## Critical Rules
- ALWAYS use AskUserQuestion for decisions — never plain text questions
- ALWAYS use the bundled scripts (`scripts/create-harness.mjs`, `scripts/validate-harness.mjs`) when working on a local repo — they are deterministic and faster than hand-writing files
- ALWAYS confirm overwrites with the user before passing `--force` to `create-harness.mjs` — the script skips existing files by default for a reason
- ALWAYS read `${CLAUDE_PLUGIN_ROOT}/shared/agentic-subsystems.md` before scaffolding — the 5 subsystems (Instructions / State / Verification / Scope / Lifecycle) are the design framework
- The script bundles are pure Node built-ins — no npm install needed in the target repo
- Keep the harness MINIMAL on first scaffold — memory persistence, tool safety, multi-agent coordination are opt-ins, not defaults
- Generated files live in the TARGET REPO, not the plugin — `${CLAUDE_PLUGIN_ROOT}` is the source; `--target <path>` is the destination
## Step 1 — Confirm Target & Intent
Accept the brain dump from `$ARGUMENTS` or from the conversation context. Determine:
- **Target directory** — absolute path to the repo being harnessed. If unclear, use AskUserQuestion to ask.
- **Intent** — one of:
- `create` — scaffold a new harness from scratch
- `audit` — score an existing harness across the 5 subsystems and recommend improvements
- `report` — produce a shareable HTML assessment
If intent is ambiguous, use AskUserQuestion to ask the user to pick one.
If the target directory already has `AGENTS.md` or `CLAUDE.md`, default to **audit** mode unless the user explicitly asked to create. Surprise overwrites are a `--force` event and require explicit consent.
## Step 2 — Detect Stack & Verify Capabilities
Spawn or invoke deterministic detection via Bash:
```bash
node ${CLAUDE_PLUGIN_ROOT}/scripts/create-harness.mjs --target <ABSOLUTE_PATH> --help
```
(This is a dry-run probe — the `--help` flag prints capabilities without writing.)
Then run actual detection (no flags = preview mode does not exist; the script writes by default, so we use AskUserQuestion before calling it):
For `create` intent, before running the script, show the user what will be generated:
> The harness scaffolder will write the following to `<TARGET>`:
>
> - `AGENTS.md` (or `CLAUDE.md` if --agent-file is set)
> - `feature_list.json` (5 placeholder features)
> - `progress.md`
> - `session-handoff.md`
> - `init.sh` (with detected verification commands)
>
> Existing files will be skipped unless `--force` is set.
>
> 1. Proceed
> 2. Use CLAUDE.md instead of AGENTS.md
> 3. Override package manager (npm, pnpm, yarn, bun)
> 4. Override verification commands manually
> 5. Cancel
## Step 3 — Create Harness (intent=create)
```bash
node ${CLAUDE_PLUGIN_ROOT}/scripts/create-harness.mjs --target <ABSOLUTE_PATH> [--agent-file CLAUDE.md] [--package-manager npm|pnpm|yarn|bun] [--commands "cmd one,cmd two"]
```
After running, report:
- The detected stack (e.g., `typescript-react`)
- The verification commands that ended up in `init.sh`
- Which files were written vs skipped (existing)
- Next steps for the user: replace placeholder features in `feature_list.json` with real ones; run `./init.sh` from the target repo to verify baseline; commit the harness.
If overwriting is required, surface a discrete second prompt:
> File `<path>` already exists. Force overwrite?
>
> 1. Yes, overwrite this file
> 2. No, skip this file
> 3. Yes, overwrite ALL existing harness files (`--force`)
Never silently pass `--force` without explicit user approval.
## Step 4 — Audit Harness (intent=audit)
```bash
node ${CLAUDE_PLUGIN_ROOT}/scripts/validate-harness.mjs --target <ABSOLUTE_PATH> --json
```
The script returns a JSON report with:
- `overall` score (0–100)
- `bottleneck` (which of the 5 subsystems scored lowest)
- Per-subsystem score (0–5) with individual check results
Present the result to the user. If overall < 70, recommend the first 2–3 changes that would lift the lowest-scoring subsystem. Do NOT claim the bottleneck is the _cause_ of any agent failure without evidence — say "candidate bottleneck" until confirmed by an actual agent session.
## Step 5 — Render HTML Report (intent=report)
```bash
node ${CLAUDE_PLUGIN_ROOT}/scripts/validate-harness.mjs --target <ABSOLUTE_PATH> --html <TARGET>/harness-assessment.html
```
After writing the HTML, tell the user the absolute path so they can open it in a browser.
Be clear with the user: **this is a structural benchmark, not a behavioral one.** It confirms the harness is present and coherent. Real effectiveness still requires before/after agent-session testing on representative tasks.
## Step 6 — Recommend Next Steps
For every successful run, end with concrete next-step recommendations the user can copy-paste into their backlog:
- Replace placeholder features in `feature_list.json` with real project features
- Run `./init.sh` to verify the baseline before adding new scope
- Commit the harness with a descriptive message
- If the project will have multi-session work: confirm `session-handoff.md` is filled in at end of session
- If working with memory persistence: see `${CLAUDE_PLUGIN_ROOT}/shared/references/memory-persistence-pattern.md`
- If working with multi-agent coordination: see `${CLAUDE_PLUGIN_ROOT}/shared/references/multi-agent-pattern.md`
## Step 7 — Retrospective (Optional)
If the run revealed a recurring pattern (e.g., a stack the detector didn't classify correctly, a verification command that's wrong for the user's setup), append a note to `${CLAUDE_PLUGIN_ROOT}/shared/learnings.md` with the date and observation. Pattern accumulation drives future generator improvements.
## When to Read References
Load only the reference needed for the user's problem:
- Memory across sessions: [Memory Persistence](../../shared/references/memory-persistence-pattern.md)
- Reusable workflows as skills: [Skill Runtime](../../shared/references/) — see also the sibling `forge-skill`
- Permissions, tools, concurrency: [Tool Registry & Safety](../../shared/references/tool-registry-pattern.md)
- Context budget and progressive disclosure: [Context Engineering](../../shared/references/context-engineering-pattern.md)
- Delegation and parallel agents: [Multi-Agent Coordination](../../shared/references/multi-agent-pattern.md)
- Hooks, startup, long-running work: [Lifecycle & Bootstrap](../../shared/references/lifecycle-bootstrap-pattern.md)
- Non-obvious failure modes: [Gotchas](../../shared/references/gotchas.md)
- 5-subsystem framework: [Agentic Subsystems](../../shared/agentic-subsystems.md)
## Deliverable Checklist
For a usable minimal harness, the target project ends with:
- [ ] `AGENTS.md` or `CLAUDE.md` (Instructions subsystem)
- [ ] `feature_list.json` (State subsystem — feature tracker)
- [ ] `progress.md` (State subsystem — session continuity)
- [ ] `init.sh` (Verification subsystem)
- [ ] `session-handoff.md` for multi-session work (Lifecycle subsystem)
- [ ] Documented verification evidence pattern (recorded in `progress.md` or `feature_list.json`)
If you cannot create files (e.g., sandbox restrictions), provide exact file contents and the `node scripts/create-harness.mjs ...` command instead.
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.