product-context-builder
About product-context-builder
Product Context Builder helps teams create a compact, evidence-based context system for coding agents working in a product repository. It discovers existing guidance and design evidence, then drafts only relevant files through reviewable passes rather than generating every document by default.
Key features
- 01Inspects repository guidance and project structure
- 02Grounds context in existing product and design evidence
- 03Selects only relevant context files
- 04Drafts files one at a time for review
- 05Audits generated context against the repository
Use cases
- 01Preparing repository guidance for coding agents
- 02Documenting an established product and visual system
- 03Creating repeatable project skills from stable workflows
- 04Reviewing context files for unsupported assumptions
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ thedesignproject/ agent-skills --skill product-context-builderAfter installing, type/product-context-builderin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
assets/templates/AGENTS.template.mdCLAUDE.template.mdDESIGN.template.mdPRODUCT.template.mdreferences/always-loaded-files.mddesign.mdproduct.mdproject-skills.mdvalidation.mdDetails
From the project READMEProduct Context Builder
Build a compact, connected context system grounded in the user's real product and repository. The finished files should help an AI agent understand the codebase, the product judgment behind it, the visual system it must reuse, and the task-specific workflows it can load when relevant.
Start by discovering what exists
Inspect the repository before interviewing the user. Locate:
- existing
AGENTS.md,CLAUDE.md,PRODUCT.md,DESIGN.md, and skill folders - package scripts, build and test commands, source directories, and contribution rules
- UI components, Storybook stories, theme files, CSS variables, Tailwind configuration, and token packages
- product documentation, PRDs, research, brand guidance, and accessibility requirements
Report what you found, what can be inferred safely, and what needs a human answer. Never invent commands, component names, product positioning, tokens, or constraints.
Choose the files that earn their place
Do not generate every file automatically.
- Create or update
AGENTS.mdwhen multiple coding agents need stable repository instructions. - Create or update
CLAUDE.mdwhen Claude Code needs tool-specific guidance that is meaningfully different. Keep shared rules aligned withAGENTS.md. - Create
PRODUCT.mdwhen agents need durable product judgment: audience, purpose, personality, principles, references, and anti-references. - Create
DESIGN.mdwhen a real visual system or component library can be documented from evidence. - Create a project skill only for a repeatable task with a recognizable trigger and a stable workflow.
Read the matching guide before drafting a file:
Use the templates in assets/templates/ as prompts for evidence, not forms that must be filled mechanically. Remove empty and irrelevant sections.
Work in reviewable passes
Draft one file at a time and explain:
- which repository evidence shaped it
- which statements came from the user
- which questions or conflicts remain
Ask the user to review strategic judgment before treating it as durable context. Product personality, anti-references, exceptions, and hard constraints need explicit confirmation.
Keep the layers connected
The always-loaded file should contain the smallest useful routing rule. For example:
Before writing or changing UI, read PRODUCT.md and DESIGN.md. Reuse documented components and tokens. If the system does not cover a design need, ask before creating a new pattern.
Do not copy the full contents of PRODUCT.md or DESIGN.md into AGENTS.md or CLAUDE.md. Do not hide universal repository rules inside a task skill.
Finish with a context audit
Read validation, check every generated file against the repository, and summarize:
- files created or updated
- evidence used
- contradictions resolved
- assumptions still awaiting confirmation
- the next real task the user should test with the new context system