/tech-snacks:intent-layerfrom tech-snacks
Sets up hierarchical AGENTS.md files so Claude navigates codebases like a senior engineer. Use when initializing projects or adding AI-friendly context infrastructure.
Ships in tech-snacks. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Hierarchical AGENTS.md infrastructure so agents navigate codebases like senior engineers.
Only ONE root context file. CLAUDE.md and AGENTS.md should NOT coexist at project root. Child AGENTS.md in subdirectories are encouraged for complex subsystems.
1. Detect state
scripts/detect_state.sh /path/to/project
→ Returns: none | partial | complete
2. Route
none/partial → Initial setup (steps 3-5)
complete → Maintenance (step 6)
3. Measure [gate - show table first]
scripts/analyze_structure.sh /path/to/project
scripts/estimate_tokens.sh /path/to/each/source/dir
4. Decide
No root file → Ask: CLAUDE.md or AGENTS.md?
Has root file → Add Intent Layer section + child nodes if needed
5. Execute
Use references/templates.md for structure
Use references/node-examples.md for real-world patterns
Validate: one root, READ-FIRST directive, <4k tokens per node
6. Maintenance mode (when state=complete)
Ask user:
a) Audit nodes → Use references/capture-protocol.md for SME questions
b) Find candidates → Re-measure tokens, suggest new nodes
c) Both
| Signal | Action |
|---|---|
| >20k tokens in directory | Create AGENTS.md |
| Responsibility shift | Create AGENTS.md |
| Hidden contracts/invariants | Document in nearest ancestor |
| Cross-cutting concern | Place at LCA |
Do NOT create for: every directory, simple utilities, test folders (unless complex).
When documenting existing code, ask:
Scripts:
scripts/detect_state.sh - Check Intent Layer state (none/partial/complete)scripts/analyze_structure.sh - Find semantic boundariesscripts/estimate_tokens.sh - Measure directory complexityReferences:
references/templates.md - Root and child node templatesreferences/node-examples.md - Real-world examplesreferences/capture-protocol.md - SME interview protocolThis skill is vendored from crafter-station/skills (MIT, © 2026 Crafter Station). See LICENSE in this directory.
Built by Railly Hugo for Crafter Station, based on The Intent Layer by Tyler Brandt.
LICENSE (opens in a new tab)references/capture-protocol.md (opens in a new tab)references/node-examples.md (opens in a new tab)references/templates.md (opens in a new tab)scripts/analyze_structure.sh (opens in a new tab)scripts/detect_state.sh (opens in a new tab)scripts/estimate_tokens.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub ragnar-pwninskjold/tech-snacks --plugin tech-snacks8 skills in this plugin
/caveman-searchUse when the user wants a terse, opinionated, research-backed answer to a "what tech/tools/stack do I need for X" question, or asks how to approach building something. Triggers on "caveman search", "caveman research", "/caveman-search", and on tooling/architecture questions where the user wants the direct answer, not a survey. Runs decomposed research (local repo + live web), verifies, and renders in a compressed caveman voice that leads with the load-bearing truth./lite-prdUse when the user hands you a vague or half-formed feature ask and wants it turned into a lightweight PRD, or asks to "write a PRD", "spec this feature", "flesh this out", or invokes /lite-prd. Interviews the user by traversing a design tree of clarifying questions, persists every Q&A round to the repo, and emits a lite-prd.md./mine-claude-mdMine 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"./prd-to-uxUse 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./react-refactor-tournamentReview 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"./scaffold-claudeUse 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.Other plugins' skills for the same job