# Stack Bootstrap

> Set up or re-sync the agent-stack optimization layer (CLAUDE.md, skills, hooks, code graph, shell compression, Cursor mirror) for a repo. Use when onboarding a repo, right after cloning, or when the agent context feels bloated/unoptimized. Runs `agent-stack init` under the hood — detect, install adapters, generate files, wire hooks, verify, and capture a token baseline — then reports exactly what…

- **Type:** Skill
- **Install:** `agentstack add skill-drmahdikazempour-agent-stack-stack-bootstrap`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [drmahdikazempour](https://agentstack.voostack.com/s/drmahdikazempour)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [drmahdikazempour](https://github.com/drmahdikazempour)
- **Source:** https://github.com/drmahdikazempour/agent-stack/tree/main/skills/stack-bootstrap
- **Website:** https://www.npmjs.com/package/@drmahdikazempour/agent-stack

## Install

```sh
agentstack add skill-drmahdikazempour-agent-stack-stack-bootstrap
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# stack-bootstrap

Bootstrap or re-sync this repo's optimization layer. **Skills decide *when*; the CLI decides *how*** — always shell out to `agent-stack` for file writes so the hook merger stays the sole writer of `settings.json`.

## When to use
- First time working in a repo that should have agent-stack configured.
- After pulling changes that touched `.claude/`, `.cursor/`, or `integrations/`.
- When startup context feels heavy and you suspect the setup drifted.

## What to do
1. Run `npx @drmahdikazempour/agent-stack doctor` to see current state and whether anything is configured.
2. If unconfigured or drifted, run `npx @drmahdikazempour/agent-stack init`. It:
   - detects host(s), profile, package manager, and existing config,
   - backs up anything it will touch into `.agent-stack.bak./`,
   - installs the profile's pinned adapters (or runs config-only with `--no-install`),
   - generates `CLAUDE.md`, skills, agents, commands, `.claudeignore`, the Cursor mirror, and MCP scaffold,
   - wires hooks in a single merged write,
   - verifies every skill loads and every hook is present (rolls back on failure),
   - captures a `ccusage` token baseline.
3. Report the chosen profile, adapters installed, hooks wired, and baseline tokens.

## Flags worth knowing
- `--dry-run` — print the plan, write nothing.
- `--profile ` — override auto-detection.
- `--no-install` — write configs only; skip binary installs.
- `--yes` — skip the single confirm prompt.

## Idempotency
Running `init` twice is a no-op unless `--force`. Safe to re-run anytime.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [drmahdikazempour](https://github.com/drmahdikazempour)
- **Source:** [drmahdikazempour/agent-stack](https://github.com/drmahdikazempour/agent-stack)
- **License:** MIT
- **Homepage:** https://www.npmjs.com/package/@drmahdikazempour/agent-stack

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-drmahdikazempour-agent-stack-stack-bootstrap
- Seller: https://agentstack.voostack.com/s/drmahdikazempour
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
