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.
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.
The wiki is located at the project root in a directory with the pattern:
<project_name>.wiki/
For this project:
m2_ntotank.wiki/git@github.com:uptactics/m2_ntotank.wiki.gitFor 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
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 ..
Ask yourself:
Trigger events for documentation:
Skip documentation for:
For custom modules and features:
Example topics:
For custom configurations:
Example topics:
For workflows and procedures:
Example topics:
For known issues and solutions:
Example topics:
Check for existing pages:
cd <project_name>.wiki/
ls -la *.md
Common wiki pages:
Home.md - Wiki home page with indexMagento-2-Site-Docs.md - General site documentationData-Migration.md - Migration-specific docsGrouping-Related-Products.md)Update existing page if:
Magento-2-Site-Docs.md)Create new page if:
Naming convention for new pages:
Custom-Shipping-Calculator.mdHyva-Theme-Customizations.mdProduct-ViewModels.mdIMPORTANT: 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:
---)# [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:**
```bash
# Commands or admin steps to fix
Symptoms: What the user sees
Solution:
Official Documentation: External Docs
Key Pages:
Module: Vendor_ModuleName
Version: X.Y.Z
Path: app/code/Vendor/ModuleName/
Dependencies:
Custom Templates:
path/to/template.phtmlpath/to/template2.phtmlTechnical features list:
The system consists of:
Tables:
table_name - PurposeKey Fields:
field_1 - Descriptionfield_2 - DescriptionFile: path/to/file.php:line
Purpose: What this component does
// Key code snippet if helpful
Admin Path: Stores > Configuration > Section > Subsection Settings:
config/path/setting1 - Descriptionconfig/path/setting2 - DescriptionHow developers can customize templates
How developers can customize styling
bin/magento command:name
REST or GraphQL API examples (if applicable)
Developer Documentation: Dev Docs
Developer Pages:
(If applicable - include migration details at the very end)
Migration strategy and approach
Step-by-step migration details
Technical challenges encountered
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
```markdown
# [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:**
```bash
bin/magento config:set section/group/field value1
...
Configuration:
setting1 = value
setting2 = value
Result: What happens with this configuration
Common issues related to these configurations
Links to related wiki pages or external docs
#### Documentation Template for Processes
```markdown
# [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:**
```bash
command to run
Expected Output:
what you should see
Troubleshooting:
...
How to confirm the process completed successfully:
verification command
If something goes wrong, how to undo:
rollback command
How often this process should be performed.
Whether this process is automated and how:
Links to related procedures
### Step 5: Add Visual Assets (When Helpful)
**Include screenshots for:**
- Admin configuration screens
- Custom UI elements
- Complex workflows
- Before/after comparisons
**Include diagrams for:**
- Architecture overviews
- Data flow
- Integration points
- System interactions
**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: ``
**Or use images directory:**
```bash
cd <project_name>.wiki/
mkdir -p images
/bin/cp /path/to/screenshot.png images/
git add images/screenshot.png
Reference in markdown:

After creating or updating documentation, ensure it's discoverable in both the Home page and sidebar.
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
[Link Text](Page-Name) (no .md extension)[Link Text](Page-Name#anchor)[Link Text](Page-Name.md) - Causes raw markdown view[Link Text](Page-Name.md#anchor) - Causes raw markdown viewIMPORTANT: Always maintain a custom _Sidebar.md file to prevent navigation issues.
Why _Sidebar.md is Required:
_Sidebar.md doesn't existCreate/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:
**bold** for main section links- for subsections--- horizontal rules for visual separators.md extensions)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:
_Sidebar.md (update if pages added/removed)Home.md (update index if major pages added)images/ directory.md extensions)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
{
// ...
}
app/code/Vendor/Module/Model/Example.php:123What to document:
Wiki page:
Custom-Module-Name.mdHome.md with linkWhat to document:
Wiki page:
Third-Party-Module-Customizations.mdWhat to document:
Wiki page:
Data-Migration.mdWhat to document:
Wiki page:
Magento-2-Site-Docs.md or create specific config pageWhat to document:
Wiki page:
Custom-Feature-Name.mdWhat to document:
Wiki page:
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.
Bad: [Link](Page-Name.md) or [Link](Page-Name.md#anchor)
Good: [Link](Page-Name) or [Link](Page-Name#anchor)
Why it's wrong:
.md extensions can cause "raw markdown view" issuesraw.githubusercontent.comReal 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:
.md extensions from wiki links[Text](Page-Name) not [Text](Page-Name.md)[Text](Page#section) not [Text](Page.md#section)Bad: Create new pages without maintaining custom sidebar
Good: Always update _Sidebar.md when adding/removing pages
Why it's wrong:
_Sidebar.md doesn't existWhat Happens Without Custom Sidebar:
How to Fix:
_Sidebar.md in wiki root directory.md extensions)_Sidebar.md with every wiki updateExample 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)
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:
Home.md index (if major page)_Sidebar.md navigation.md)Bad: Some links with .md, some without
Good: Consistently use proper format (no .md) throughout wiki
Why it's wrong:
How to Prevent:
](.*.md) โ ](Page-Name).md in linksBefore finalizing wiki documentation, verify:
Document:
Document:
Document:
File: m2_ntotank.wiki/Grouping-Related-Products.md
Strengths:
File: m2_ntotank.wiki/Data-Migration.md
Strengths:
File: m2_ntotank.wiki/Magento-2-Site-Docs.md
Could add:
Don't use wiki documentation for:
ai/ directory in projectInstead:
README.md in module for quick referenceai/ folder for AI conversation summariesโ 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
# 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 ..
app/code/Vendor/Module/Model/Example.php:123
section/group/field
Stores > Configuration > Section > Subsection > Field
[Link Text](Page-Name.md)

# or

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.