Go back
Go back
Published:Β Β 
Nov 25, 2025
Product Discovery

part 3 of Context Engineering with Claude Skills for Product Discovery

37 patterns that determine how Claude processes your product discovery Skills

‍

These patterns address what happens when your Skill actually runs: how Claude handles tool failures, manages conditional logic, processes boundary cases, and determines when work is complete. This is where reliability separates working Skills from inconsistent ones.

I’ve rigorously tested these patterns across complex product workflows: legal and compliance research, creation of test cards and hypotheses, product roadmaps, OKR monitoring, competitive analysis, user research synthesis, and more. Below, I distill the 37 patterns into 4 strategic pillars:

‍

1. Core structure

2. Clarity & Organization

3. Execution & Control flow

4. Completion & Quality

‍

‍

21. Explicit error handling patterns

Specify what to do when tool calls or operations fail. Don't just specify the happy path, every tool call should have error handling instructions.

‍

❌ No error handling:

Use: docker-desktop-mpc:confluence_create_page

‍

βœ… With explicit error handling:

Use: docker-desktop-mpc:confluence_create_page

IF creation fails THEN
- Retry once with same parameters
- IF retry fails THEN
  - Output full markdown to chat
  - Log error details for debugging
  - Signal: "CONFLUENCE CREATION FAILED - MANUAL UPLOAD REQUIRED"
- NEVER proceed without documenting outcomes

‍

‍

Apply to all tool calls:

βœ… Google Drive search with error handling:

Use: google_drive_search

IF search returns zero results THEN
- Try broader search terms
- IF still zero results THEN proceed to edge case: "Insufficient Documentation"

IF search returns timeout error THEN
- Retry with smaller page_size (reduce from 10 to 5)
- IF timeout persists THEN proceed with partial results

IF search returns permission error THEN
- Notify user: "Access denied to folder [folder path]"
- Request: "Verify Google Drive permissions and retry"

‍

‍

‍

22. Default values and optional parameters

Make explicit which parameters are optional vs required. State default values clearly so Claude knows what happens when parameters are omitted.

‍

❌ Ambiguous parameter requirements:

Parameters:
- space_key
- title  
- parent_id
- labels

‍

βœ… Clear required vs optional:

REQUIRED Parameters (no defaults - must be provided):
- space_key: Project space key (e.g., "PRODUCT")
- title: Page title (e.g., "[Feature Name] - Research")

OPTIONAL Parameters (with defaults):
- parent_id: null (default: no parent - creates top-level page)
- labels: [] (default: empty array - no labels applied)
- content_format: "markdown" (default: markdown format)

‍

‍

Apply to all parameter lists

βœ… Search parameters with defaults:

google_drive_search parameters:

REQUIRED:
- api_query: Search query string (no default)

OPTIONAL:
- semantic_query: null (default: no semantic filtering)
- page_size: 10 (default: return 10 results, max: 250)
- order_by: "relevance desc" (default: most relevant first)

‍

‍

‍

23. Unambiguous references

Use explicit section names or headers. Avoid "above", "below", "previous", "earlier" which become ambiguous in long documents.

‍

❌ Ambiguous references:

Use the citation format mentioned above.
Follow the process described earlier.
Apply the validation from the previous section.
See the example shown below.

‍

βœ… Explicit references:

Use the citation format from Section 4: Citation Format.
Follow the process from <document_retrieval> section.
Apply the validation from <input_validation_checklist>.
See the example in Section 7: Edge Case Handling, CASE 3.

‍

Why this matters for Claude:

✦ "Above" could mean 10 lines up or 500 lines up

✦ "Earlier" could mean previous paragraph or previous section

✦ Explicit references allow direct lookup without ambiguity

‍

‍

βœ… Reference by XML tag:

Apply GDPR filtering from <gdpr_filtering_mandatory> section.
Use error handling pattern from <edge_case_resolution> CASE 5.
Follow completion format from <completion_signal_format>.

‍

‍

‍

‍

24. Quantifier scope clarity

"All", "any", "each", "every" need explicit scope. Specify: all of WHAT exactly?

‍

❌ Vague quantifier scope:

Verify all items are valid.
Check each field.
Process every document.
Validate any errors found.

‍

βœ… Clear quantifier scope:

Verify all 5 items in <input_validation_checklist> are valid.
Check each field in the REQUIRED Parameters list (space_key, title, content).
Process every document in the search results (maximum 10 documents).
Validate any errors found in the transcription output.

‍

Apply to requirements lists:

‍

❌ Unclear scope:

Before proceeding, verify everything is ready.

‍

βœ… Clear scope:

Before proceeding, verify ALL 3 preconditions:
1. Domain context loaded from /knowledge-base/regulatory-framework.md
2. Quality standards loaded from /examples/best-analysis.md
3. Search scope validated (folders exist and accessible)

IF any of the 3 preconditions fails THEN stop - request clarification.

‍

‍

25. State preconditions

Specify what must be true before a section executes. Don't assume Claude knows the required state.

‍

❌ Missing preconditions:

### Generate Output

Create the consolidated report with all findings...

‍

βœ… Clear preconditions:

### Generate Output

PRECONDITIONS (must be true before executing this section):
- Document retrieval completed successfully (at least 1 document retrieved)
- Analysis phase complete (at least 1 obligation identified with citation)
- All obligations have risk levels assigned
- Output template loaded from /knowledge-base/compliance-templates.md

IF any precondition is false THEN
- Identify which precondition failed
- Return to appropriate section to resolve
- DO NOT attempt output generation with incomplete data

Once all preconditions verified, create the consolidated report...

‍

Apply to all major workflow sections

‍

βœ… Preconditions for synthesis:

### Synthesis Phase

PRECONDITIONS (ALL must be true):
- PM-Compliance signal received: "PM-COMPLIANCE ANALYSIS COMPLETE"
- UX-Researcher signal received: "UX RESEARCH ANALYSIS COMPLETE"
- Both outputs available and non-empty
- Confluence template loaded
- Jira project key validated

IF PM-Compliance signal NOT received THEN wait (do not start synthesis)
IF UX signal NOT received AND Mode A workflow THEN wait
IF Mode B workflow THEN proceed without UX data

‍

‍

‍

26. Required vs optional steps

Mark steps as required or optional explicitly. Distinguish between "nice to have" and "must have".

‍

❌ Ambiguous priority:

Workflow Steps:
1. Load domain context
2. Search documents
3. Consult quality examples
4. Analyze documents
5. Update memory files
6. Generate output

‍

βœ… Clear priority marking:

REQUIRED Steps (MUST execute - workflow fails without these):
1. Load domain context from /knowledge-base/
2. Search documents in designated folders
3. Analyze documents and extract obligations
4. Generate output with all required sections

OPTIONAL Steps (improves quality but not blocking):
5. Consult quality examples from /examples/ (skip if time constrained)
6. Update memory files in /memory/ (beneficial for future but not critical)

IF any REQUIRED step fails THEN stop workflow and report error.
IF any OPTIONAL step fails THEN log warning and continue.

‍

Apply to validation steps:

‍

βœ… Required vs optional validations:

<validation_requirements>
REQUIRED Validations (block execution if fail):
- [ ] Citations include document title
- [ ] Citations include section/article number
- [ ] Risk level assigned to each obligation

OPTIONAL Validations (warn but don't block):
- [ ] Citations include page numbers (warn if missing but continue)
- [ ] Obligations have product implications (warn if missing but continue)
</validation_requirements>

‍

‍

27. Numeric precision

Use exact numbers with units. Avoid approximations like "a few", "reasonably short", "briefly".

‍

❌ Vague numbers:

Keep files reasonably short.
Process a few documents.
Wait briefly before retrying.
Search for recent documents.

‍

βœ… Precise numbers with units:

Keep files under 500 lines maximum.
Process up to 10 documents per search (not 11 or more).
Wait 5 seconds before retrying (not 4, not 6).
Search for documents modified within last 30 days.

‍

‍

Apply to all constraints:

‍

βœ… Precise time limits:

<time_constraints>
- Document retrieval: Maximum 3 minutes (180 seconds)
- Analysis per document: Maximum 30 seconds
- Total analysis phase: Maximum 10 minutes (600 seconds)
- Output generation: Maximum 2 minutes (120 seconds)

IF any time limit exceeded THEN
- Log: "Timeout in [phase] after [N] seconds"
- Proceed to timeout handling
</time_constraints>

‍

βœ… Precise data limits:

<data_constraints>
- Confluence page: Maximum 50,000 characters
- Jira description: Maximum 10,000 characters
- File name length: Maximum 255 characters
- Search results: Maximum 10 documents (page_size=10)

IF content exceeds limit THEN truncate and note: "Content truncated to [N] characters"

‍

‍

‍

‍

‍

‍

28. Exclusive vs inclusive operations

Make clear if X replaces everything or adds to existing. Use ONLY, ALSO, INSTEAD explicitly.

‍

❌ Ambiguous scope:

Search in the compliance folder.
Use these parameters.
Apply this format.

‍

Could mean:

✦ Search ONLY in compliance (exclude all others)?

✦ ALSO search compliance (in addition to others)?

✦ Use ONLY these parameters (ignore all defaults)?

✦ ALSO use these parameters (in addition to defaults)?

‍

‍

βœ… Clear exclusive operation:

Search ONLY in these folders (NOT anywhere else):
- /Compliance-Research/archives-act-legal/
- /Compliance-Research/archives-act-technical/
- /Compliance-Research/eu-regulations/

NEVER search in:
- /Compliance-Research/drafts/
- /Compliance-Research/archive/
- Any personal folders

‍

βœ… Clear inclusive operation:

Use standard search parameters AND ALSO add these:
- Standard: api_query, page_size
- Additional: semantic_query (for semantic filtering)
- Additional: order_by (for custom sorting)

‍

βœ… Clear replacement operation:

Use this citation format INSTEAD OF any other format:
[Document Title] | [Section] | [Page] | [Jurisdiction] | [Date]

DO NOT use:
- (Author, Year) format
- Footnote format
- APA format
- Any other academic citation style

‍

‍

View all articles
View all articles