DIY Guides
Step-by-step repair guides for common home maintenance tasks. Includes video links, tools lists, materials needed, difficulty ratings, and safety warnings.
Overview
The DIY Guides skill provides a curated database of home repair guides covering plumbing, electrical, appliances, furniture, outdoor work, automotive, painting, flooring, HVAC, and general repairs.
Features
- 12 Pre-loaded Guides: Common repairs from fixing leaky faucets to changing tires
- Difficulty Ratings: Easy, Medium, and Hard classifications
- Tool & Material Lists: Complete lists of what you'll need
- Video Links: Curated video tutorials for visual learners
- Step-by-Step Instructions: Numbered steps with detailed descriptions
- Pro Tips: Expert advice for better results
- Safety Warnings: Important precautions for each repair
- Cost Estimates: Approximate cost for materials
- Time Estimates: Expected duration for completion
Categories
| Category | Icon | Description |
|---|---|---|
| plumbing | 🔧 | Faucets, drains, toilets, pipes |
| electrical | ⚡ | Switches, outlets, wiring |
| appliance | 🔌 | Major appliances repair |
| furniture | 🪑 | Assembly, repair, refinishing |
| outdoor | 🌳 | Landscaping, gutters, exterior |
| automotive | 🚗 | Car maintenance and repair |
| painting | 🎨 | Interior/exterior painting |
| flooring | 🏠 | Floor installation, repair |
| hvac | ❄️ | Heating, cooling, ventilation |
| general | 🔨 | Miscellaneous repairs |
Installation
cd skills/diy-guides
npm install
npm run build
CLI Usage
List all guides
npm run cli -- list
View a guide
npm run cli -- get 1
Search guides
npm run cli -- search "faucet"
Filter by category
npm run cli -- category plumbing
Filter by difficulty
npm run cli -- difficulty easy
View tools needed
npm run cli -- tools 1
View materials needed
npm run cli -- materials 1
View step-by-step instructions
npm run cli -- steps 1
View safety warnings
npm run cli -- warnings 1
Programmatic Usage
import { DIYGuidesSkill } from '@openclaw/diy-guides';
const skill = new DIYGuidesSkill();
// Initialize and seed default guides
await skill.initialize();
// Get all guides
const guides = await skill.listGuides();
// Get specific guide
const guide = await skill.getGuide(1);
// Search guides
const results = await skill.searchGuides({
category: 'plumbing',
difficulty: 'easy',
searchTerm: 'faucet'
});
// Get guides by category
const plumbingGuides = await skill.getGuidesByCategory('plumbing');
// Get guides by difficulty
const easyGuides = await skill.getGuidesByDifficulty('easy');
// Get statistics
const stats = await skill.getStats();
await skill.close();
Guide Structure
interface DIYGuide {
id?: number;
title: string;
description: string;
category: RepairCategory;
difficulty: DifficultyLevel;
estimatedTime: string;
tools: string[];
materials: string[];
steps: GuideStep[];
videoLinks?: VideoLink[];
tips?: string[];
warnings?: string[];
skillLevel?: string;
costEstimate?: string;
}
interface GuideStep {
stepNumber: number;
title: string;
description: string;
imageUrl?: string;
}
interface VideoLink {
title: string;
url: string;
platform: 'youtube' | 'vimeo' | 'other';
duration?: string;
}
Default Guides
The skill includes 12 pre-loaded repair guides:
- Fix a Leaky Faucet (Plumbing, Easy)
- Unclog a Drain (Plumbing, Easy)
- Replace a Light Switch (Electrical, Medium)
- Patch Drywall Holes (General, Medium)
- Fix a Running Toilet (Plumbing, Easy)
- Replace Cabinet Hardware (Furniture, Easy)
- Caulk a Bathtub or Shower (Plumbing, Medium)
- Replace an HVAC Filter (HVAC, Easy)
- Fix Squeaky Floors (Flooring, Medium)
- Change a Tire (Automotive, Medium)
- Paint a Room (Painting, Medium)
- Clean Gutters (Outdoor, Medium)
Database Schema
The skill uses SQLite with the following schema:
CREATE TABLE guides (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT NOT NULL,
description TEXT NOT NULL,
category TEXT NOT NULL,
difficulty TEXT NOT NULL,
estimated_time TEXT NOT NULL,
tools TEXT NOT NULL, -- JSON array
materials TEXT NOT NULL, -- JSON array
steps TEXT NOT NULL, -- JSON array
video_links TEXT, -- JSON array (optional)
tips TEXT, -- JSON array (optional)
warnings TEXT, -- JSON array (optional)
skill_level TEXT, -- optional
cost_estimate TEXT, -- optional
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
Dependencies
sqlite3: Database storage
Type Safety
All difficulty levels and categories are typed:
type DifficultyLevel = 'easy' | 'medium' | 'hard';
type RepairCategory =
| 'plumbing'
| 'electrical'
| 'appliance'
| 'furniture'
| 'outdoor'
| 'automotive'
| 'painting'
| 'flooring'
| 'hvac'
| 'general';
Error Handling
The skill throws errors for:
- Database initialization failures
- Guide not found (returns null)
- Invalid search parameters
Always wrap calls in try-catch blocks and close the skill in a finally block.
Health Check
const health = await skill.healthCheck();
// { healthy: true, message: "DIY Guides skill healthy. 12 guides available." }
No External Dependencies
This skill works entirely offline with local SQLite storage. No API keys or internet connection required.