plugins/tech-snacks/skills/scaffold-claude/SKILL.md
Use when the user wants to create, draft, or scaffold a CLAUDE.md (or AGENTS.md) file for their project. Triggers on "scaffold CLAUDE.md", "write a CLAUDE.md", "set up CLAUDE.md", "/scaffold-claude", or any request to bootstrap project-level Claude/agent instructions. Produces a scratchpad draft that captures edge cases and tribal knowledge — not derivable facts.
npx skillsauth add ragnar-pwninskjold/tech-snacks scaffold-claudeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Scaffold a CLAUDE.md for the user's project. Output is written to a scratchpad so the user can review and move it to the repo root themselves.
The file you produce documents edge cases, non-obvious choices, and tribal knowledge — things Claude can't read off package.json, the directory tree, or the README. If a fact is derivable, it does not belong in the file.
Never write a section based on inference. Always ask, and stub when the answer is "skip" or "I don't know."
A stubbed section (a <!-- TODO: ... --> comment) is strictly better than a section filled with plausible-sounding guesses. Guesses encode false confidence that future Claude will trust.
/scaffold-claude or asks to "scaffold/write/create CLAUDE.md"intent-layer-capture skill insteadWrite to: docs/scratchpad/CLAUDE.md (relative to the user's current working directory)
docs/scratchpad/ doesn't exist, create it.Read these if they exist, only to identify what to ask about — not to fill in:
package.json, Gemfile, pyproject.toml, go.mod, Cargo.toml (any one that's present)README.md (skim, do not summarize into the CLAUDE.md)CLAUDE.md, AGENTS.md, .cursorrules, .github/copilot-instructions.md — if any exist, mention them and ask whether to merge or start freshState what you found in one or two sentences. Example: "Saw a Next.js + Drizzle setup with a lib/ directory and no existing CLAUDE.md. I won't assume anything about your conventions — I'll ask."
Walk through the 8 sections one at a time, in order, using the scripts in references/interview-questions.md:
For each section:
Do not batch all questions into one big message. The user's attention is the bottleneck; one section per turn.
Use templates/claude-md-stub.md as the base. Fill in confirmed content. Leave every skipped section as the original <!-- TODO: ... --> stub from the template — do not delete the stubs, they help future-you know what was deliberately left blank.
Write to docs/scratchpad/CLAUDE.md after confirming the path.
Tell the user:
CLAUDE.md at the root of any project."No marketing flourishes. No "Now your project is well-documented!" Just the facts.
references/postlane-example.md contains a complete, real-world CLAUDE.md.
Use it to calibrate:
Do NOT use it to:
When showing the example to the user, frame it as: "This is what a fully-filled-in version looks like. Yours will be shorter — most projects don't have this much tribal knowledge to document yet, and that's correct."
| Rationalization | Reality | |---|---| | "Their package.json clearly shows Next.js — I'll just write that." | If Next.js choice has no story, it doesn't belong in Stack. Ask first. | | "Most projects use Prettier, I'll add a convention for it." | Most projects ≠ this project. Ask. | | "They didn't answer for Hard Constraints, but every project has some — let me suggest a few." | An empty stub is correct. Invented constraints are worse than no constraints. | | "The Gotchas section feels empty, let me add some 'common Next.js gotchas.'" | Gotchas are bug-fix archaeology specific to this project. Generic gotchas are noise. | | "I'll write 'good code quality' under Conventions as a placeholder." | Vague conventions are worse than no conventions. Stub it. | | "They said skip but I can tell from the repo that X is true." | Skip means skip. The user knows their project; if they skipped, it's because there's nothing non-obvious to say. | | "The example has 8 filled sections, theirs should too." | The example is for a mature, scarred-by-production codebase. A new project might fill 2 sections. That's correct. |
If you find yourself:
Stop. You've drifted into assumption. Re-ask the user; if they say skip, stub it.
references/postlane-example.md — the one-shot, with framing for what to copy (structure, voice) vs. not copy (specifics)references/interview-questions.md — section-by-section question scriptstemplates/claude-md-stub.md — the empty template with TODO comments for each sectiondevelopment
Review React/Next.js code against the real vercel-react-best-practices skill, backlog the performance findings keyed to actual rule ids + impact tiers, rank the most over-subscribed tiers, then fix + test the top N in isolated worktrees. Use when the user wants to systematically harvest and fix React/Next.js PERFORMANCE refactors (waterfalls, bundle size, RSC fetching, re-renders, JS perf), or says "react refactor tournament", "find React performance refactors", "/react-refactor-tournament".
development
Mine recent Claude Code sessions for non-obvious, multi-file CLAUDE.md candidates, adversarially verify them, and propose paste-ready additions. Use when the user wants to harvest documentation-worthy patterns/gotchas from past coding sessions into a project's CLAUDE.md, or says "mine my sessions for CLAUDE.md", "what should be in my CLAUDE.md", "/mine-claude-md".
development
Use when user provides a URL and wants to replicate or clone a website's UI, design, or visual style for their own product. Entry point for the full 4-phase SRIP pipeline.
development
Use when translating a PRD, feature spec, or raw product idea into screen-level prompts for web UX generators (Google Stitch, Figma AI, Pencil.dev, Claude Design, v0, or similar). Use before creating visual mockups or wireframes.