بنقرة واحدة
compound-docs
Capture solved problems as categorized documentation with YAML frontmatter for fast lookup
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Capture solved problems as categorized documentation with YAML frontmatter for fast lookup
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
This skill should be used when creating or organizing working files in the .claude/ directory. It enforces consistent structure, naming conventions, and required cross-references for plans, architecture docs, examples, research, and analysis files.
Browser automation with persistent page state. Use when users ask to navigate websites, fill forms, take screenshots, extract web data, test web apps, or automate browser workflows. Trigger phrases include "go to [url]", "click on", "fill out the form", "take a screenshot", "scrape", "automate", "test the website", "log into", or any browser interaction request.
This skill should be used when managing the file-based todo tracking system in the .claude/todos/ directory. It provides workflows for creating todos, managing status and dependencies, conducting triage, and integrating with slash commands and code review processes.
This skill should be used when writing code in any opinionated framework's distinctive style. It applies when writing framework-based applications, creating models/controllers/views, or any framework code. Triggers on code generation, refactoring requests, code review, or when the user mentions framework conventions. Embodies the philosophy of embracing framework conventions, fighting complexity, and choosing simplicity over cleverness.
This skill should be used when writing software libraries, packages, or modules following battle-tested patterns for clean, minimal, production-ready code. It applies when creating new libraries, refactoring existing ones, designing library APIs, or when clean, dependency-minimal library code is needed. Triggers on requests like "create a library", "write a package", "design a module API", or mentions of professional library development.
This skill should be used when building production LLM applications in any language. It applies when implementing predictable AI features, creating structured interfaces for LLM operations, configuring language model providers, building agent systems with tools, optimizing prompts, or testing LLM-powered functionality. Covers language-agnostic patterns for type-safe contracts, modular composition, multi-provider support, and production deployment.
| name | compound-docs |
| description | Capture solved problems as categorized documentation with YAML frontmatter for fast lookup |
| allowed-tools | ["Read","Write","Bash","Grep"] |
| preconditions | ["Problem has been solved (not in-progress)","Solution has been verified working"] |
Purpose: Automatically document solved problems to build searchable institutional knowledge with category-based organization (enum-validated problem types).
This skill captures problem solutions immediately after confirmation, creating structured documentation that serves as a searchable knowledge base for future sessions.
Organization: Single-file architecture - each problem documented as one markdown file in its symptom category directory (e.g., .claude/solutions/performance-issues/n-plus-one-briefs.md). Files use YAML frontmatter for metadata and searchability.
<critical_sequence name="documentation-capture" enforce_order="strict">
Auto-invoke after phrases:
OR manual: /doc-fix command
Non-trivial problems only:
Skip documentation for:
Extract from conversation history:
Required information:
Environment details:
BLOCKING REQUIREMENT: If critical context is missing (module name, exact error, stage, or resolution steps), ask user and WAIT for response before proceeding to Step 3:
I need a few details to document this properly:
1. Which module had this issue? [ModuleName]
2. What was the exact error message or symptom?
3. What stage were you in? (0-6 or post-implementation)
[Continue after user provides details]
### Step 3: Check Existing Docs
Search .claude/solutions/ for similar issues:
# Search by error message keywords
grep -r "exact error phrase" .claude/solutions/
# Search by symptom category
ls .claude/solutions/[category]/
IF similar issue found:
THEN present decision options:
Found similar issue: .claude/solutions/[path]
What's next?
1. Create new doc with cross-reference (recommended)
2. Update existing doc (only if same root cause)
3. Other
Choose (1-3): _
WAIT for user response, then execute chosen action.
ELSE (no similar issue found):
Proceed directly to Step 4 (no user interaction needed).
### Step 4: Generate FilenameFormat: [sanitized-symptom]-[module]-[YYYYMMDD].md
Sanitization rules:
Examples:
missing-include-BriefSystem-20251110.mdparameter-not-saving-state-EmailProcessing-20251110.mdwebview-crash-on-resize-Assistant-20251110.md
CRITICAL: All docs require validated YAML frontmatter with enum validation.
<validation_gate name="yaml-schema" blocking="true">
Validate against schema:
Load schema.yaml and classify the problem against the enum values defined in yaml-schema.md. Ensure all required fields are present and match allowed values exactly.
BLOCK if validation fails:
❌ YAML validation failed
Errors:
- problem_type: must be one of schema enums, got "compilation_error"
- severity: must be one of [critical, moderate, minor], got "high"
- symptoms: must be array with 1-5 items, got string
Please provide corrected values.
GATE ENFORCEMENT: Do NOT proceed to Step 6 (Create Documentation) until YAML frontmatter passes all validation rules defined in schema.yaml.
</validation_gate>
### Step 6: Create DocumentationDetermine category from problem_type: Use the category mapping defined in yaml-schema.md (lines 49-61).
Create documentation file:
PROBLEM_TYPE="[from validated YAML]"
CATEGORY="[mapped from problem_type]"
FILENAME="[generated-filename].md"
DOC_PATH=".claude/solutions/${CATEGORY}/${FILENAME}"
# Create directory if needed
mkdir -p ".claude/solutions/${CATEGORY}"
# Write documentation using template from assets/resolution-template.md
# (Content populated with Step 2 context and validated YAML frontmatter)
Result:
Create documentation: Populate the structure from assets/resolution-template.md with context gathered in Step 2 and validated YAML frontmatter from Step 5.
If similar issues found in Step 3:
Update existing doc:
# Add Related Issues link to similar doc
echo "- See also: [$FILENAME]($REAL_FILE)" >> [similar-doc.md]
Update new doc: Already includes cross-reference from Step 6.
Update patterns if applicable:
If this represents a common pattern (3+ similar issues):
# Add to .claude/solutions/patterns/common-solutions.md
cat >> .claude/solutions/patterns/common-solutions.md << 'EOF'
## [Pattern Name]
**Common symptom:** [Description]
**Root cause:** [Technical explanation]
**Solution pattern:** [General approach]
**Examples:**
- [Link to doc 1]
- [Link to doc 2]
- [Link to doc 3]
EOF
Critical Pattern Detection (Optional Proactive Suggestion):
If this issue has automatic indicators suggesting it might be critical:
critical in YAMLThen in the decision menu (Step 8), add a note:
💡 This might be worth adding to Required Reading (Option 2)
But NEVER auto-promote. User decides via decision menu (Option 2).
Template for critical pattern addition:
When user selects Option 2 (Add to Required Reading), use the template from assets/critical-pattern-template.md to structure the pattern entry. Number it sequentially based on existing patterns in .claude/solutions/patterns/cora-critical-patterns.md.
</critical_sequence>
<decision_gate name="post-documentation" wait_for_user="true">
After successful documentation, present options and WAIT for user response:
✓ Solution documented
File created:
- .claude/solutions/[category]/[filename].md
What's next?
1. Continue workflow (recommended)
2. Add to Required Reading - Promote to critical patterns (cora-critical-patterns.md)
3. Link related issues - Connect to similar problems
4. Add to existing skill - Add to a learning skill (e.g., hotwire-native)
5. Create new skill - Extract into new learning skill
6. View documentation - See what was captured
7. Other
Handle responses:
Option 1: Continue workflow
Option 2: Add to Required Reading ⭐ PRIMARY PATH FOR CRITICAL PATTERNS
User selects this when:
Action:
.claude/solutions/patterns/cora-critical-patterns.mdOption 3: Link related issues
Option 4: Add to existing skill
User selects this when the documented solution relates to an existing learning skill:
Action:
Example: For Hotwire Native Tailwind variants solution:
hotwire-native/references/resources.md under "CORA-Specific Resources"hotwire-native/references/examples.md with link to solution docOption 5: Create new skill
User selects this when the solution represents the start of a new learning domain:
Action:
python3 .claude/skills/skill-creator/scripts/init_skill.py [skill-name]Option 6: View documentation
Option 7: Other
</decision_gate>
<integration_protocol>
Invoked by:
Invokes:
Handoff expectations: All context needed for documentation should be present in conversation history before invocation.
</integration_protocol>
<success_criteria>
Documentation is successful when ALL of the following are true:
</success_criteria>
Missing context:
YAML validation failure:
Similar issue ambiguity:
Module not in CORA-MODULES.md:
MUST do:
mkdir -p)MUST NOT do:
Good documentation has:
Avoid:
User: "That worked! The N+1 query is fixed."
Skill activates:
includes(:emails) on Brief modeln-plus-one-brief-generation-BriefSystem-20251110.mdmodule: Brief System
date: 2025-11-10
problem_type: performance_issue
component: rails_model
symptoms:
- "N+1 query when loading email threads"
- "Brief generation taking >5 seconds"
root_cause: missing_include
severity: high
tags: [n-plus-one, eager-loading, performance]
✅ Valid.claude/solutions/performance-issues/n-plus-one-brief-generation-BriefSystem-20251110.mdOutput:
✓ Solution documented
File created:
- .claude/solutions/performance-issues/n-plus-one-brief-generation-BriefSystem-20251110.md
What's next?
1. Continue workflow (recommended)
2. Add to Required Reading - Promote to critical patterns (cora-critical-patterns.md)
3. Link related issues - Connect to similar problems
4. Add to existing skill - Add to a learning skill (e.g., hotwire-native)
5. Create new skill - Extract into new learning skill
6. View documentation - See what was captured
7. Other
Not in Phase 7 scope, but potential: