Wiki docs

From ProxiBlue/claude-skills · View interactive version

Wiki docs is an AI agent skill from the GitHub repository ProxiBlue/claude-skills. Document custom Magento 2 site functionality in the project wiki. Systematically captures custom features, modules, configurations, and business logic for client handover and developer onboarding.

How to use this skill

Skill file

Wiki Documentation Skill

Overview

This skill provides a systematic approach to documenting custom Magento 2 site functionality in the project's GitHub wiki. It ensures custom features, modules, configurations, and business logic are properly documented for client handover, developer onboarding, and long-term maintenance.

When to Use This Skill

Wiki Location and Access

Wiki Directory Structure

The wiki is located at the project root in a directory with the pattern:

<project_name>.wiki/

For this project:

For other Magento 2 projects, determine wiki location:

# Find wiki directory
find . -maxdepth 1 -type d -name "*.wiki"

# Or check CLAUDE.md for wiki configuration
grep -i "wiki" CLAUDE.md

Wiki Git Workflow

The wiki is a separate git repository (GitHub Wiki standard):

# Navigate to wiki directory
cd <project_name>.wiki/

# Check status
git status

# Pull latest changes before editing
git pull origin master

# After making changes
git add .
git commit -m "docs: <description of changes>"
git push origin master

# Return to main project
cd ..

Documentation Workflow

Step 1: Identify What Needs Documentation

Ask yourself:

Trigger events for documentation:

Skip documentation for:

Step 2: Determine Documentation Type

A. Feature/Module Documentation

For custom modules and features:

Example topics:

B. Configuration Documentation

For custom configurations:

Example topics:

C. Process Documentation

For workflows and procedures:

Example topics:

D. Troubleshooting Documentation

For known issues and solutions:

Example topics:

Step 3: Choose or Create Wiki Page

Existing Pages

Check for existing pages:

cd <project_name>.wiki/
ls -la *.md

Common wiki pages:

Update existing page if:

New Pages

Create new page if:

Naming convention for new pages:

Step 4: Write the Documentation

Documentation Template for Features/Modules

IMPORTANT: Structure Documentation for End Users First

The wiki is primarily used by clients, site administrators, and non-technical users. Always structure documentation with user-facing content first, followed by technical details at the end.

Recommended Structure:

  1. Overview (brief, what it does)
  2. User-facing content (how to use it)
  3. Troubleshooting (common issues end users might encounter)
  4. External documentation links
  5. Horizontal rule separator (---)
  6. Technical details (for developers)
# [Feature/Module Name]

## Overview
Brief 2-3 sentence description of what this feature does and why it exists. Focus on business value and what users can accomplish with it.

## Managing [Feature Name]

### Admin Access
**Path:** Section > Subsection > Page

From here you can:
- Action 1
- Action 2
- Action 3

### Creating/Configuring [Feature]
Step-by-step guide for admin users:
1. Navigate to [path]
2. Configure [settings]
   - **Setting 1:** Description of what it does
   - **Setting 2:** Description of what it does
3. Save and flush cache

### Available Options
**Option 1** - What this option provides
**Option 2** - What this option provides
**Option 3** - What this option provides

## Advanced Features
(If applicable - optional features or advanced usage)

### Import/Export
(If applicable)

### Bulk Operations
(If applicable)

## Troubleshooting

### Issue: [Common Problem]
**Symptoms:** What the user sees

**Possible Causes:**
1. Cause 1
2. Cause 2

**Solution:**

Commands or admin steps to fix


### Issue: [Another Problem]
**Symptoms:** What the user sees

**Solution:**
1. Clear browser cache
2. Contact developer if issue persists

## Documentation

**Official Documentation:** [External Docs](https://example.com)

**Key Pages:**
- [Page 1](https://example.com/page1)
- [Page 2](https://example.com/page2)

---

## Technical Details

### Module Location
**Module:** `Vendor_ModuleName`
**Version:** X.Y.Z
**Path:** `app/code/Vendor/ModuleName/`
**Dependencies:**
- Magento_Backend
- Magento_Catalog

**Custom Templates:**
- Template 1: `path/to/template.phtml`
- Template 2: `path/to/template2.phtml`

### Features
Technical features list:
- Feature 1
- Feature 2

### Architecture
The system consists of:
1. **Backend Component:** Purpose
2. **Frontend Component:** Purpose
3. **Data Model:** Purpose

### Database Schema
**Tables:**
- `table_name` - Purpose

**Key Fields:**
- `field_1` - Description
- `field_2` - Description

### Key Components

#### [Component 1 - e.g., ViewModel]
**File:** `path/to/file.php:line`
**Purpose:** What this component does

// Key code snippet if helpful


### Configuration
**Admin Path:** Stores > Configuration > Section > Subsection
**Settings:**
- `config/path/setting1` - Description
- `config/path/setting2` - Description

### Customization

#### Template Customization
How developers can customize templates

#### Styling
How developers can customize styling

### CLI Commands

bin/magento command:name


### API Access
REST or GraphQL API examples (if applicable)

### Related Features
- [Related Page](Related-Page) - Description
- [Another Feature](Another-Feature) - Description

### Technical Documentation
**Developer Documentation:** [Dev Docs](https://example.com/dev)

**Developer Pages:**
- [Setup](https://example.com/setup)
- [API](https://example.com/api)

## Migration from Magento 1
(If applicable - include migration details at the very end)

### Overview
Migration strategy and approach

### Migration Process
Step-by-step migration details

### Migration Challenges & Solutions
Technical challenges encountered

---

## Maintenance
**Last Updated:** YYYY-MM-DD
**Last Reviewed By:** Developer Name
**Magento Version:** 2.4.x / Mage-OS 1.x.x

Key Principles:

  1. Users First: Admin guides, usage instructions, and troubleshooting come before technical details
  2. Clear Separation: Use --- horizontal rule to separate user content from technical content
  3. Progressive Disclosure: Start with simple concepts, progress to complex
  4. Accessibility: Write troubleshooting steps that non-technical users can follow
  5. Technical Section: Place all developer-specific content (architecture, database schema, code examples) after the separator
Documentation Template for Configuration
# [Configuration Topic]

## Overview
What this configuration controls and why it's important.

## Admin Path
**Location:** Stores > Configuration > [Section] > [Subsection]
**Or:** [Alternative location if not in standard config]

## Configuration Options

### [Setting 1 Name]
**Config Path:** `section/group/field`
**Type:** [Text/Select/Yes-No/etc.]
**Default Value:** `value`
**Purpose:** What this setting controls

**Valid Values:**
- `value1` - Description of effect
- `value2` - Description of effect

**Dependencies:**
- Requires [module] to be enabled
- Affects [other setting]

**Example:**

bin/magento config:set section/group/field value1


### [Setting 2 Name]
...

## Use Cases

### Use Case 1: [Scenario]
**Configuration:**

setting1 = value

setting2 = value

**Result:** What happens with this configuration

## Troubleshooting
Common issues related to these configurations

## Related Documentation
Links to related wiki pages or external docs
Documentation Template for Processes
# [Process Name]

## Overview
What this process does and when to use it.

## Prerequisites
- Requirement 1
- Requirement 2
- Access needed

## Process Steps

### Step 1: [Action]
**Command/Action:**

command to run


**Expected Output:**

what you should see


**Troubleshooting:**
- If X happens, do Y

### Step 2: [Action]
...

## Verification
How to confirm the process completed successfully:

verification command


## Rollback
If something goes wrong, how to undo:

rollback command


## Frequency
How often this process should be performed.

## Automation
Whether this process is automated and how:
- Cron job configuration
- CI/CD integration

## Related Processes
Links to related procedures

Step 5: Add Visual Assets (When Helpful)

Include screenshots for:

Include diagrams for:

How to add images to GitHub Wiki:

  1. Create issue in GitHub (or use existing)
  2. Drag and drop image to issue comment
  3. Copy the generated URL: https://github.com/user/repo/assets/...
  4. Use in markdown: ![description](url)

Or use images directory:

cd <project_name>.wiki/
mkdir -p images
/bin/cp /path/to/screenshot.png images/
git add images/screenshot.png

Reference in markdown:

![Description](images/screenshot.png)

Step 6: Update Wiki Home/Index and Sidebar

After creating or updating documentation, ensure it's discoverable in both the Home page and sidebar.

A. Update Home.md

Update Home.md with:

## Custom Functionality
- [Feature Name](Feature-Name) - Brief description
- [Another Feature](Another-Feature) - Brief description

## Configuration
- [Config Topic](Config-Topic) - Brief description

## Processes
- [Process Name](Process-Name) - Brief description

CRITICAL: GitHub Wiki Link Format

B. Update or Create _Sidebar.md

IMPORTANT: Always maintain a custom _Sidebar.md file to prevent navigation issues.

Why _Sidebar.md is Required:

Create/Update _Sidebar.md:

### Wiki Home
[Home](Home)

---

### Site Management
**[Homepage Management](Homepage-Management)**
- [Configure Category List](Homepage-Management#configure-category-list)

**[General Site Docs](Magento-2-Site-Docs)**
- [Categories](Magento-2-Site-Docs#categories)

---

### Custom Features
[Feature Name](Feature-Name)
[Another Feature](Another-Feature)

---

### Configuration
[Config Topic](Config-Topic)

---

### Troubleshooting
[Issue Name](Issue-Name)

Sidebar Best Practices:

Step 7: Commit and Push Wiki Changes

cd <project_name>.wiki/

# Check what changed
git status
git diff

# Stage changes (including _Sidebar.md if updated)
git add .

# Commit with descriptive message
git commit -m "docs: Add documentation for [feature/topic]

- Added [new page] documenting [feature]
- Updated [existing page] with [new information]
- Updated _Sidebar.md with new navigation links
- Added screenshots for [feature]

Co-Authored-By: Claude <noreply@anthropic.com>"

# Push to wiki repository
git push origin master

# Return to main project
cd ..

Files to Always Check Before Committing:

Step 8: Reference Wiki in Code (Optional but Recommended)

Add wiki references in module README or docblocks:

Module README.md:

# Vendor_ModuleName

Brief description.

## Documentation
Full documentation available in the [project wiki](https://github.com/user/repo/wiki/Feature-Name).

## Quick Start
...

PHP Docblock:

/**
 * Custom ViewModel for product data
 *
 * @see https://github.com/uptactics/m2_ntotank/wiki/Product-ViewModels
 */
class ProductData extends AbstractViewModel
{
    // ...
}

Documentation Best Practices

Writing Style

Technical Accuracy

Maintenance

Organization

Common Documentation Scenarios

Scenario 1: Just Built a Custom Module

What to document:

  1. Module purpose and business requirements
  2. Key classes and their responsibilities
  3. Configuration options (if any)
  4. How to use in admin/frontend
  5. Extension points for future customization
  6. Testing notes

Wiki page:

Scenario 2: Customized Third-Party Module

What to document:

  1. Which module was customized and why
  2. What was changed (plugins, overrides, etc.)
  3. File locations of customizations
  4. Upgrade considerations
  5. Alternative approaches considered

Wiki page:

Scenario 3: Completed Data Migration

What to document:

  1. Migration tool and version used
  2. Custom migration scripts created
  3. Data transformations applied
  4. Post-migration cleanup steps
  5. Known data discrepancies
  6. Verification queries

Wiki page:

Scenario 4: Custom Admin Configuration

What to document:

  1. What the config controls
  2. Admin path to settings
  3. Each setting and its purpose
  4. Valid values and effects
  5. Dependencies between settings
  6. CLI commands to set values

Wiki page:

Scenario 5: Frontend Custom Feature

What to document:

  1. What the feature does (user perspective)
  2. Where it appears on the site
  3. How it works technically (templates, ViewModels, Alpine.js)
  4. Configuration options
  5. Styling customizations
  6. JavaScript interactions

Wiki page:

Scenario 6: Complex Bug Fix

What to document:

  1. Original issue/symptom
  2. Root cause discovered
  3. Solution implemented
  4. Files changed
  5. How to prevent recurrence
  6. Related issues to watch for

Wiki page:

Wiki Maintenance Schedule

After Every Feature Implementation

Monthly Review

During Magento Upgrades

During Developer Onboarding

Integration with Main CLAUDE.md

The project's CLAUDE.md should reference the wiki for detailed documentation:

## Documentation

Custom functionality is documented in the [project wiki](https://github.com/user/repo/wiki):
- [Feature Name](https://github.com/user/repo/wiki/Feature-Name)
- [Another Feature](https://github.com/user/repo/wiki/Another-Feature)

See the wiki for detailed documentation on custom modules, configurations, and processes.

Common Pitfalls to Avoid

❌ DON'T: Use .md Extensions in Wiki Links

Bad: [Link](Page-Name.md) or [Link](Page-Name.md#anchor)

Good: [Link](Page-Name) or [Link](Page-Name#anchor)

Why it's wrong:

Real Example of the Problem:

Bad URL:  raw.githubusercontent.com/wiki/user/repo/Page.md#anchor
Good URL: github.com/user/repo/wiki/Page#anchor

How to Fix:


❌ DON'T: Forget to Create/Update _Sidebar.md

Bad: Create new pages without maintaining custom sidebar

Good: Always update _Sidebar.md when adding/removing pages

Why it's wrong:

What Happens Without Custom Sidebar:

How to Fix:

  1. Create _Sidebar.md in wiki root directory
  2. Add organized navigation structure
  3. Update sidebar every time you add/remove wiki pages
  4. Use proper link format (no .md extensions)
  5. Commit _Sidebar.md with every wiki update

Example Custom Sidebar Structure:

### Wiki Home
[Home](Home)

---

### Category Name
**[Main Page](Main-Page)**
- [Subsection 1](Main-Page#subsection-1)
- [Subsection 2](Main-Page#subsection-2)

[Another Page](Another-Page)

---

### Another Category
[Page Name](Page-Name)

❌ DON'T: Skip Sidebar When Adding Pages

Bad: Create page → Update Home.md → Commit (forgot sidebar)

Good: Create page → Update Home.md → Update _Sidebar.md → Commit all

Why it's wrong:

Workflow Checklist:


❌ DON'T: Mix Link Formats

Bad: Some links with .md, some without

Good: Consistently use proper format (no .md) throughout wiki

Why it's wrong:

How to Prevent:


Quality Checklist

Before finalizing wiki documentation, verify:

Project-Specific Patterns

For Hyvä Themes Projects

Document:

For Mage-OS Projects

Document:

For Migration Projects

Document:

Examples from This Project

Good Example: Grouping Related Products

File: m2_ntotank.wiki/Grouping-Related-Products.md

Strengths:

Good Example: Data Migration

File: m2_ntotank.wiki/Data-Migration.md

Strengths:

Area for Improvement: Magento 2 Site Docs

File: m2_ntotank.wiki/Magento-2-Site-Docs.md

Could add:

When NOT to Use This Skill

Don't use wiki documentation for:

Instead:

Success Criteria

✅ Custom functionality is discoverable - New developers can find it

✅ Purpose is clear - Anyone can understand why it exists

✅ Usage is explained - Admins and developers know how to use it

✅ Maintenance is enabled - Future updates won't break undocumented features

✅ Troubleshooting is proactive - Common issues are documented before support tickets

✅ Client handover is smooth - Client can maintain site with wiki reference

Quick Reference

Common Commands

# Navigate to wiki
cd <project_name>.wiki/

# Pull latest
git pull origin master

# Create new page
touch New-Feature-Name.md

# Check what changed
git status
git diff

# Commit changes
git add .
git commit -m "docs: description"
git push origin master

# Return to project
cd ..

File Path Format

app/code/Vendor/Module/Model/Example.php:123

Config Path Format

section/group/field

Admin Path Format

Stores > Configuration > Section > Subsection > Field

Wiki Link Format

[Link Text](Page-Name.md)

Image Reference Format

![Description](images/screenshot.png)
# or
![Description](https://github.com/user/repo/assets/...)

Related Resources


Remember: Good documentation is a gift to your future self and your team. Take the time to document well, and you'll save countless hours in the future.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.