Anchorwatch

Stack Packs

/stack-packs:init [typescript|nextjs|python|go|generic] writes project instructions that are specific to your repository, not a generic template.

How it works

  1. Detects the stack from package.json (Next.js vs other TypeScript), pyproject.toml/requirements.txt, go.mod, or falls back to generic. You can force one with the argument.
  2. Fills the template with real values: the actual install/dev/test/lint/build commands from your scripts or Makefile, the package manager from the lockfile, framework versions from dependencies, and a short table of the real directory layout. It never invents a command; if one doesn't exist, the line is omitted and you're told.
  3. Merges, never overwrites. An existing CLAUDE.md is kept; missing sections are added, duplicates avoided, and contradictions are flagged for you instead of silently resolved. Target: under 200 lines.
  4. Adds path‑scoped rules under .claude/rules/: git and safety conventions for every stack; test‑file rules for TypeScript, Python and Go; server/client boundary rules for Next.js. Globs are adjusted to your layout.

The packs

Run /setup-audit:run afterwards to grade the result.