From pm
Capture hard-won insights, gotchas, and trial-and-error solutions in the knowledge system. Use when encountering non-obvious problems, multi-attempt solutions, user corrections, or debugging issues that required research.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pm:knowledge-managementThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill guides proper knowledge capture in the PM Dashboard knowledge system.
This skill guides proper knowledge capture in the PM Dashboard knowledge system.
Only capture what's hard-won, not what's routine.
Knowledge items are for future you and your team to avoid repeating painful debugging sessions or trial-and-error.
Trial-and-Error Solutions (took multiple attempts):
upsert_knowledge(
title="PostgreSQL FTS GIN Index Required (Not BTREE)",
content="Problem: Search slow (2000ms). Tried: 1) BTREE index (no help), 2) Increased work_mem (no help), 3) Finally: GIN index required for FTS. Command: CREATE INDEX USING gin(to_tsvector('english', content)). Result: 50ms search time.",
category="database_gotchas",
tags='["postgresql", "fts", "performance", "indexing"]',
task_id="current_task_id"
)
Non-Obvious Gotchas:
upsert_knowledge(
title="GitHub OAuth Requires User-Agent Header",
content="Gotcha: GitHub OAuth API returns 403 without User-Agent header. Not prominently documented. Required: User-Agent: YourAppName/1.0",
category="integration_gotchas",
tags='["github", "oauth", "http_headers", "403"]',
task_id="current_task_id"
)
User Corrections (what NOT to do):
upsert_knowledge(
title="FastMCP Parameters Must Be Strings",
content="Critical: FastMCP only accepts string parameters. Passing task_id=123 (int) fails silently. Must use task_id='123' (string). Applies to ALL MCP parameters.",
category="user_corrections",
tags='["fastmcp", "parameters", "types", "gotcha"]',
task_id="current_task_id"
)
Integration Challenges (required research/debugging):
upsert_knowledge(
title="WebSocket Connection Requires CORS Headers",
content="Problem: WebSocket connections failed from frontend. Tried: 1) Different ports (failed), 2) Finally discovered: Need CORS headers for WebSocket handshake. Solution: Add Access-Control-Allow-Origin to WebSocket endpoint.",
category="integration_gotchas",
tags='["websocket", "cors", "frontend", "connection"]',
task_id="current_task_id"
)
Routine Implementations:
Obvious Solutions:
Project-Level - Broad architectural insights:
upsert_knowledge(
title="Database Migration Strategy",
content="Always use Alembic for schema changes. Manual ALTER TABLE caused production downtime.",
project_id="3",
category="architecture"
)
Epic-Level - Feature-specific patterns:
upsert_knowledge(
title="Authentication Flow Best Practices",
content="Use JWT with HttpOnly cookies, not localStorage (XSS risk).",
project_id="3",
epic_id="5",
category="security"
)
Task-Level - Specific implementation details:
upsert_knowledge(
title="Safari Flexbox Quirk",
content="Safari 14 needs -webkit-flex prefix. Safari 15+ works with standard flexbox.",
task_id="42",
category="css_gotchas"
)
Recommended categories:
gotchas - Non-obvious problemsuser_corrections - Mistakes to avoidarchitecture_decisions - High-level choicesintegration_gotchas - External service issuesperformance_optimizations - What actually workedsecurity_patterns - Security-related insightsdatabase_gotchas - Database-specific issuescss_gotchas - Browser/CSS quirksmulti_attempt_solutions - Trial-and-error winsCategories: Broad grouping (gotchas, decisions, patterns) Tags: Specific technologies/concepts (postgresql, oauth, safari, websocket)
upsert_knowledge(
title="...",
content="...",
category="integration_gotchas", # Broad
tags='["github", "oauth", "api", "http_headers"]' # Specific
)
# Get project-wide gotchas
get_knowledge(project_id="3", category="gotchas")
# Get epic-specific architecture decisions
get_knowledge(project_id="3", epic_id="5", category="architecture_decisions")
# Get task-specific notes
get_knowledge(task_id="42")
# Search by tags (use limit to avoid overwhelming results)
get_knowledge(project_id="3", category="security", limit="10")
Clear problem statement:
upsert_knowledge(
title="Clear Problem → Attempts → Solution",
content="Problem: [specific issue]. Tried: 1) [approach 1] (failed because X), 2) [approach 2] (failed because Y), 3) Finally: [solution] worked because Z. Time saved for next person: 2 hours.",
category="gotchas",
tags='["specific", "searchable", "tags"]'
)
Vague or routine:
# ❌ Too vague
upsert_knowledge(
title="Fixed a bug",
content="There was a bug and I fixed it.",
category="general"
)
# ❌ Too routine
upsert_knowledge(
title="Added error handling",
content="Added try-catch block to handle errors.",
category="patterns"
)
Track changes with append_knowledge_log:
append_knowledge_log(
knowledge_id="123",
action_type="update",
change_reason="Added note about Safari 15+ compatibility",
created_by="claude"
)
Knowledge complements RA tags:
Workflow:
upsert_knowledge(
title="Safari Grid Layout Bug with position:sticky",
content="Problem: Sticky header broken in Safari. position:sticky inside CSS grid fails in Safari 14-15. Tried: 1) z-index changes (failed), 2) Finally: Use position:fixed with JS scroll listener instead.",
category="css_gotchas",
tags='["safari", "css_grid", "position_sticky", "workaround"]'
)
upsert_knowledge(
title="SQLite WAL Mode Checkpoint Timing",
content="Problem: Database file growing unbounded. Tried: 1) Manual VACUUM (temporary fix), 2) Finally: Configure WAL checkpoint interval. PRAGMA wal_autocheckpoint=1000. Keeps DB size stable.",
category="database_gotchas",
tags='["sqlite", "wal", "performance", "file_size"]'
)
upsert_knowledge(
title="Stripe Webhook Signature Verification Order",
content="Critical: Must verify webhook signature BEFORE parsing body. Parsing first makes signature invalid. Correct order: 1) Get raw body, 2) Verify signature, 3) Parse JSON. Wasted 3 hours on this.",
category="integration_gotchas",
tags='["stripe", "webhooks", "security", "signature_verification"]'
)
Knowledge management is about capturing pain to prevent future pain.
If it took you multiple attempts, surprised you, or came from a user correction, capture it. If it was routine or obvious, skip it.
Future you will thank present you.
npx claudepluginhub p/commands-com-pm-claude-pluginCaptures solved problems as structured JSONL knowledge entries for fast recall in future sessions. Automatically activates after bug fixes or when a solution should be preserved.
Saves, searches, recalls, digests, and prunes project learnings that persist across sessions. Use when the user wants to record knowledge or load prior learnings before starting work.