ns-harness — Claude Code skill: bootstrap and brownfield project prep
A skill for Claude Code, Cursor and other platforms: reverse-engineers existing code and generates project rules for the agent. Triggered by /ns-harness prepare this repo or architecture-rules.md.
Apache-2.0 249 installs updated 2026-10-24
npx skills add nextstage-brasil/skills --skill ns-harness -a claude-codeWhat ns-harness does
Analyzes repository structure, extracts architectural patterns and generates architecture-rules.md — a document that explains how the project works to the agent. Creates AGENTS.md with task entry points, runs reverse engineering of business logic from code and builds a brownfield system map.
Inside: four modules for repo preparation, architecture rules generation, AGENTS.md writing and spec reverse-engineering. The skill reads references from references/ and follows them without improvisation. Requires reading references/session-boot.md before any step.
For brownfield projects with complex history, this gives the agent context without manual retelling. The skill does not write code — it only maps the terrain for whoever will.
What it helps with
- reverse-engineer a brownfield project without docs
- generate architecture rules for an AI agent
- create AGENTS.md with task descriptions and entry points
- extract business logic from legacy code
- prepare context after a refactor
Example prompts for the agent
- Prepare this repository for agent work
- Generate architecture-rules.md for the project
- Create AGENTS.md with task descriptions
How to install ns-harness
1Skills CLI (Vercel)
npx skills add nextstage-brasil/skills --skill ns-harness -a claude-code2Manually: put the files in place
~/.claude/skills/ns-harness/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/ns-harness/
1Skills CLI (Vercel)
npx skills add nextstage-brasil/skills --skill ns-harness -a codex2Manually: put the files in place
.agents/skills/ns-harness/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add nextstage-brasil/skills --skill ns-harness -a cursor2Manually: put the files in place
.cursor/skills/ns-harness/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install nextstage-brasil/skills skills/ns-harness2Manually: put the files in place
.github/skills/ns-harness/SKILL.md1Skills CLI (Vercel)
npx skills add nextstage-brasil/skills --skill ns-harness -a gemini-cli2Platform CLI
gemini skills install https://github.com/nextstage-brasil/skills --path skills/ns-harnessManually: put the files in place
.devin/skills/ns-harness/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add nextstage-brasil/skills --skill ns-harness -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about ns-harness
How to install ns-harness in Claude Code?
Run npx skills add nextstage-brasil/skills --skill ns-harness -a claude-code, then open ~/.claude/skills/ns-harness/SKILL.md.
What does ns-harness do?
It analyzes existing code, maps the architecture and generates rules for the AI agent: architecture-rules.md, AGENTS.md and business logic specs.
Why use ns-harness for brownfield projects?
It gives the agent context without manual retelling: parses structure, extracts patterns and creates documents that explain how the project works and where to make changes.
Source text
SKILL.md · Apache-2.0
---
name: ns-harness
description: "(NS) Harness boot + brownfield prepare. Triggers: /ns-harness, prepare this repo, harness prepare, generate architecture rules, architecture-rules.md, write AGENTS.md, reverse-engineer codebase, engenharia reversa, brownfield map, bootstrap brownfield, ns-harness-prepare, ns-architecture-rules, ns-agent-generator, ns-codebase-reverse-spec, ns-bootstrap-brownfield. Do NOT: coding, SDD, GitLab."
license: Apache-2.0
metadata:
author: nextstage-brasil
version: "1.5.3"
---
# NextStage Harness
Project harness face. Other catalog skills point here for **session boot** + artifact paths. Also runs brownfield onboarding via local references — no separate prepare/architecture/agents/reverse/brownfield skills.
**Consumer skill convention:** point to `references/session-boot.md`; require **Session boot (blocking)** before other steps. Do not duplicate boot sequence in skill bodies or frontmatter `description`.
## Dispatch (this skill as face)
**Session boot** (`references/session-boot.md`) first — pick **one** row. First matching signal wins.
| Signal | Reference |
| ------ | --------- |
| Prepare this repo / harness prepare / onboard brownfield / full prepare / stale context after refactor | `references/prepare.md` (four workers in order) |
| Architecture rules / constitution / "how this repo works for the AI" / `.nextstage-harness/rules/architecture-rules.md` | `references/architecture-rules-generator.md` |
| Write/refresh `AGENTS.md` / `CLAUDE.md` / agent entry | `references/agents-md.md` |
| Reverse-engineer / engenharia reversa / business rules from code | `references/codebase-reverse-spec.md` |
| Brownfield map / analyze existing project (map only) | `references/bootstrap-brownfield.md` |
| `/ns-harness` with no qualifier | Show this table; ask once if intent unclear |
Bare `/ns-harness prepare this repo` **is** full `prepare.md`. Do **not** send user to retired slash names.
Read chosen reference **in full**; follow it. Do not improvise parallel workflow.
## Shared references (other skills)
| File | When to read |
| ---- | ------------ |
| `references/session-boot.md` | Session boot (blocking), rules paths, MCP GitLab pointers |
| `references/rules-sync.md` | Canonical rules layout, manifest schema, `harness sync` |
| `references/artifact-layout.md` | SDD artifact paths under `docs/versions/`, living specs, handoff rules |
| `references/code-skill-routing.md` | Entry priority + handoffs between implementation skills |
| `references/subagent-dispatch.md` | Spawn gate: cheap vs heavy execute; **MUST** exact `{name}` when gate requires. **FORBIDDEN** child Task `inherit` / platform `coder` / `reviewer` |
| `references/agent-artifact-compress.md` | **Pre-save** on agent-facing drafts only (caveman ultra; never chat) |
| `references/project-skill-authoring.md` | Author project-local skills — requires Anthropics `skill-creator` + `harness sync` |
Read only file(s) the active workflow names. Do not assume stack unless detected in rules or context.
© nextstage-brasil · Apache-2.0 · nextstage-brasil/skills