Skill: 281862066-a11y/openclaw-skill-eeta-audit (version 1.0.0)

--- name: eeat-openclaw-skill-audit description: OpenClaw Skill quality audit based on CORE-EEAT framework adapted for AI agent skills. Evaluates skill's utility (task completion efficiency) and security (safe execution). Features 80 standardized criteria, 8-dimension scoring, veto item detection for security vulnerabilities, and priority improvement recommendations. Applicable for skill selection, security vetting, and skill quality assessment. --- # EEAT OpenClaw Skill Audit > **AI Agent Skill Quality Assurance** — This skill adapts the CORE-EEAT framework to evaluate OpenClaw Skills, ensuring they deliver meaningful utility while maintaining security and reliability. ## Skill Overview OpenClaw Skills are modular capability extensions for AI agents, defined by `SKILL.md` files with YAML frontmatter and prompt instructions. This skill evaluates skill quality through 80 standardized criteria across 8 core dimensions, generating comprehensive audit reports including utility scores, security assessments, and actionable improvement recommendations. **Core Transformation**: - **From**: Install Skills blindly → Hope they work - **To**: Systematic vetting → Data-driven skill selection ## OpenClaw Skill Structure Every OpenClaw Skill consists of: ``` my-skill/ ├── SKILL.md # Core definition (YAML + Markdown instructions) ├── scripts/ # Optional executable scripts │ └── main.py └── references/ # Optional configuration and resources └── config.json ``` **Key Components**: - **YAML Frontmatter**: Skill metadata (name, description, version, dependencies, gates) - **Prompt Instructions**: How the AI should use this skill - **Scripts**: Optional executable code for complex operations - **Gating Mechanism**: Conditional activation (bins, env, os checks) ## Applicable Scenarios Use this skill when users request: ### Skill Selection - "Evaluate this skill before installing" - "Compare two skills for the same task" - "Which skill should I use for X?" ### Security Vetting - "Is this skill safe to run?" - "Scan for security vulnerabilities" - "Check permission boundaries" ### Skill Development - "Audit my skill for quality issues" - "How to improve my skill's documentation?" - "What security best practices am I missing?" ### Skill Maintenance - "Review installed skills for quality" - "Identify deprecated or risky skills" - "Prioritize skill updates" ## Core Capabilities This skill can: 1. **Complete 80-Item Audit**: Score each CORE-EEAT item adapted for OpenClaw Skills 2. **Utility Scoring**: Evaluate task completion efficiency and comparative value 3. **Security Assessment**: Three-level security evaluation (Pass/Caution/Risk) 4. **Gating Validation**: Check conditional activation requirements (bins, env, os) 5. **Veto Item Detection**: Flag critical security violations (command injection, data leakage) 6. **Priority Ranking**: Identify top 5 improvements by impact 7. **Comparative Analysis**: Compare skills for same use case ## Skill Categories This skill supports 6 OpenClaw Skill types, each with different evaluation priorities: ### Productivity Skills - **Definition**: Gmail, Calendar, Google Drive, Microsoft Office integration - **Focus**: Task completion accuracy, API reliability, error handling - **Weights**: C: 30% | R: 25% | Exp: 20% | Ept: 15% | O: 5% | E: 0% | A: 5% | T: 0% ### Development Skills - **Definition**: Code generation, debugging, GitHub automation, CI/CD - **Focus**: Code quality, correctness, testing, security best practices - **Weights**: C: 25% | O: 20% | R: 20% | Ept: 20% | E: 5% | Exp: 5% | A: 5% | T: 0% ### Research Skills - **Definition**: Web search, web fetch, document summarization, data analysis - **Focus**: Information accuracy, source credibility, citation quality - **Weights**: C: 25% | R: 25% | A: 20% | E: 15% | O: 10% | Exp: 0% | Ept: 0% | T: 5% ### Automation Skills - **Definition**: Browser automation, file operations, shell commands, task scheduling - **Focus**: Security, error handling, robustness, permissions - **Weights**: T: 30% | C: 25% | R: 20% | O: 15% | Exp: 5% | Ept: 5% | E: 0% | A: 0% ### Content Skills - **Definition**: Text generation, translation, image generation, audio processing - **Focus**: Output quality, style consistency, creative value - **Weights**: C: 30% | E: 25% | Exp: 20% | O: 15% | Ept: 5% | R: 5% | A: 0% | T: 0% ### System Skills - **Definition**: System monitoring, resource management, network tools, debugging - **Focus**: Performance, reliability, security, compatibility - **Weights**: T: 25% | C: 20% | R: 20% | E: 15% | O: 10% | Ept: 5% | Exp: 5% | A: 0% --- ## 8 Progressive Quality Gates ### Gate 1: Metadata Validation (Pre-Installation) **When**: Before installing any skill **Duration**: 2-5 minutes **Items**: - **C01**: YAML frontmatter present and valid - **C02**: Skill name and description clear - **O01**: Skill structure follows OpenClaw convention - **T04**: No suspicious dependencies or permissions **Deliverable**: Metadata Validation Report **Failure**: Do not install. Contact skill author or fix manually. --- ### Gate 2: Gating Mechanism Check **When**: After metadata validation, before activation **Duration**: 1-2 minutes **Items**: - **O02**: Required tools exist (bins check) - **O03**: Required environment variables set (env check) - **O04**: OS compatibility verified (os check) - **T07**: No conflicting permissions **Deliverable**: Gating Compatibility Report **Failure**: Skill will not activate. Fix environment or choose alternative. --- ### Gate 3: Security Pre-Check **When**: Before first execution **Duration**: 3-5 minutes **Items**: - **T01**: No command injection vulnerabilities - **T02**: No data leakage risks - **T03**: Input validation present - **T04**: Permissions are minimal principle **Deliverable**: Security Pre-Check Report **Failure**: Do not execute. Review code or choose alternative. --- ### Gate 4: Prompt Quality Review **When**: During skill development or installation **Duration**: 5-10 minutes **Items**: - **C03**: Instructions are clear and actionable - **C04**: Tool usage patterns are explicit - **Ept03**: Professional terminology used - **Ept05**: Follows prompt engineering best practices **Deliverable**: Prompt Quality Report **Failure**: Skill may misbehave. Refine SKILL.md instructions. --- ### Gate 5: Script Security Audit **When**: For skills with executable scripts **Duration**: 10-20 minutes **Items**: - **T05**: No hardcoded secrets or API keys - **T06**: No eval/exec of user input - **T07**: Proper error handling and logging - **T08**: Resource cleanup implemented **Deliverable**: Script Security Audit **Failure**: Security risk. Audit scripts or avoid skill. --- ### Gate 6: Utility Testing **When**: During skill evaluation **Duration**: 15-30 minutes **Items**: - **C05**: Completes intended tasks successfully - **C06**: Output quality meets expectations - **Exp01**: Usage examples provided and working - **Exp02**: Performance characteristics documented **Deliverable**: Utility Test Report **Failure**: Skill doesn't deliver value. Consider alternatives. --- ### Gate 7: Comparative Analysis **When**: Selecting between multiple skills for same task **Duration**: 10-15 minutes **Items**: - **E01**: Offers unique value vs alternatives - **E02**: Better performance or efficiency - **A01**: Active maintenance and updates - **A02**: Community adoption and reviews **Deliverable**: Comparative Analysis Report **Failure**: Alternative skill may be better. Choose based on scores. --- ### Gate 8: Full 80-Item Audit **When**: Critical skills, major updates, security reviews **Duration**: 30-60 minutes **Items**: All 80 items across all 8 dimensions **Deliverable**: Comprehensive EEAT Audit Report **Failure**: Address critical issues before production use. --- ## Usage Examples ### Example 1: Pre-Installation Security Check **User Request**: ``` Check if this skill is safe to install: clawhub install agent-browser ``` **Response**: ```markdown ## EEAT Skill Security Audit: agent-browser ### Gate 1: Metadata Validation ✅ - [x] YAML frontmatter valid - [x] Description clear: "Browser automation for web scraping" - [x] Version: 1.2.3 - [x] Dependencies: playwright (verified safe) ### Gate 2: Gating Check ⚠️ - [x] Bins: playwright installed - [x] Env: PLAYWRIGHT_BROWSERS_PATH set - [ ] OS: macOS/Windows only (Linux limited support) ### Gate 3: Security Pre-Check ✅ - [x] T01: No command injection detected - [x] T02: No data leakage risks - [x] T03: Input validation on URLs - [x] T04: Minimal permissions (browser control only) ### Security Score: 92/100 **Security Status**: CAUTION ⚠️ - Linux support limited - Requires browser installation (system-level change) ### Recommendation ✅ **Install with Caution** - Safe for macOS/Windows users - Linux users should check compatibility - Review permissions before first use ``` --- ### Example 2: Compare Two Skills **User Request**: ``` Compare tavily-search vs web-search for web search ``` **Response**: ```markdown ## Skill Comparative Analysis: Web Search ### Skill A: tavily-search **Utility Score**: 85/100 - C05: High accuracy search results ✅ - C06: Clean, structured output ✅ - Exp01: Excellent usage examples ✅ - E01: AI-optimized for agents 🎯 **Security Score**: 95/100 - T01-T04: All checks pass ✅ - T07: No external dependencies ✅ **Overall**: 88/100 (Very Good) ### Skill B: web-search (bundled) **Utility Score**: 70/100 - C05: Basic search functionality ✅ - C06: Output quality varies ⚠️ - Exp01: Limited examples ⚠️ - E01: Generic implementation ⚠️ **Security Score**: 90/100 - T01-T04: Safe but basic ✅ - T07: Uses external APIs ⚠️ **Overall**: 75/100 (Good) ### Recommendation ✅ **Choose tavily-search** - +18 points higher utility - AI-optimized for agent workflows - Better structured output for downstream processing - Higher security score **Trade-off**: Requires API key setup vs. no setup for web-search ``` --- ### Example 3: Full Skill Audit **User Request**: ``` Audit my custom skill: email-automation [Paste SKILL.md content] ``` **Response**: ```markdown ## EEAT Skill Audit: email-automation ### Overview - **Skill Type**: Productivity - **Total Score**: 62/100 (Fair) - **Utility Score**: 75/100 (Good) - **Security Score**: 45/100 (CAUTION ⚠️) - **Veto Item**: ⚠️ T02 Triggered (Data Leakage Risk) ### Dimension Scores | Dimension | Score | Rating | Weight | Weighted Score | |-----------|-------|--------|--------|----------------| | C — Correctness | 70/100 | Good | 30% | 21 | | O — Organization | 65/100 | Fair | 5% | 3.25 | | R — Referenceability | 50/100 | Fair | 25% | 12.5 | | Exp — Experience | 80/100 | Good | 20% | 16 | | Ept — Expertise | 55/100 | Fair | 15% | 8.25 | | E — Exclusivity | 40/100 | Poor | 0% | 0 | | A — Authority | 60/100 | Fair | 5% | 3 | | T — Trust | 45/100 | Poor | 0% | 0 | | **Weighted Total** | | | | **64** | ### Critical Issues (Veto Items) ⚠️ **T02: Data Leakage Risk** **Issue**: Skill stores API credentials in plain text in SKILL.md ```yaml # SKILL.md credentials: smtp_password: "mypassword123" # ⚠️ SECURITY RISK ``` **Action**: Move credentials to environment variables ```yaml credentials: smtp_password: "${SMTP_PASSWORD}" # ✅ SECURE ``` ### Top 5 Priority Improvements 1. **T02 Data Leakage** — Remove hardcoded credentials - Current: Fail | Potential Gain: 8 weighted points - Action: Use environment variables for all secrets 2. **R02 Coverage** — Add error handling examples - Current: Fail | Potential Gain: 6.25 weighted points - Action: Document error scenarios and recovery 3. **Ept01 Documentation** — Improve prompt instructions - Current: Partial | Potential Gain: 4.5 weighted points - Action: Add step-by-step usage examples 4. **R03 Source Authority** — Verify email library security - Current: Partial | Potential Gain: 3.75 weighted points - Action: Audit nodemailer dependency for vulnerabilities 5. **O01 Structure** — Add scripts/ directory for complex logic - Current: Partial | Potential Gain: 2.5 weighted points - Action: Move complex operations to Python scripts ### Action Plan #### Quick Wins (Fix immediately) - [ ] Move all credentials to environment variables - [ ] Add error handling documentation #### Medium Investment (This week) - [ ] Add comprehensive usage examples - [ ] Implement proper logging in scripts #### Strategic (Next sprint) - [ ] Add test suite with edge cases - [ ] Implement retry logic for failed sends - [ ] Add HTML email support ### Recommendation ⚠️ **Do Not Install Until Fixed** - Security risk (T02 veto) must be addressed - After fixes, expected score: 78/100 (Good) ``` --- ## Reference Documents - `references/openclaw-skill-benchmark.md` — Complete 80-item benchmark adapted for OpenClaw Skills - `references/skill-security-checklist.md` — Security-specific evaluation criteria - `references/utility-testing-guide.md` — How to test skill utility and comparative value - `workflow-optimization-analysis.md` — Adaptation strategy from code to skills --- ## Key Differences: Code vs. Skill Audit | Aspect | Code Audit | Skill Audit | |--------|-----------|-------------| | **Primary Focus** | Code correctness, maintainability | Utility, security, reliability | | **Security Emphasis** | SQL injection, XSS | Command injection, data leakage, permissions | | **Evaluation Method** | Static analysis + testing | Comparative utility + security probes | | **Output Format** | Code quality report | Utility score + security status label | | **Key Metrics** | Test coverage, complexity | Task completion, risk level | | **Veto Items** | Security bugs, logic errors | Security vulnerabilities, data risks | | **Automation Level** | High (linters, type checkers) | Medium (requires manual security review) | | **Comparative Analysis** | Code vs. requirements | Skill vs. baseline/skills | --- ## Success Points 1. **Security-First Approach** — OpenClaw Skills have system-level access; security is non-negotiable 2. **Comparative Utility** — Evaluate skills relative to baseline, not in isolation 3. **Gating Validation** — Ensure skills only activate when dependencies are met 4. **Prompt Quality** — SKILL.md instructions determine skill behavior; quality matters 5. **Minimal Permissions** — Skills should only request necessary access 6. **Active Maintenance** — Prioritize skills with recent updates and community support 7. **Real-World Testing** — Test with actual use cases, not synthetic scenarios --- ## Optimization Recommendations Based on OpenClaw's architecture and community best practices: ### 1. Add Skill Registry Integration - Integrate with ClawHub API for real-time skill metadata - Auto-fetch version history, update frequency, download counts - Community signals: stars, issues, last commit date ### 2. Implement Automated Security Scanning - Integrate with `clawsec` (ClawHub security scanner) - Auto-scan scripts/ directory for vulnerabilities - Check for hardcoded secrets, eval/exec patterns ### 3. Add Utility Benchmarking - Run comparative tests: baseline vs. with-skill - Measure task completion time, token efficiency, success rate - Generate utility scores similar to SkillTester framework ### 4. Create Skill Dependency Graph - Map skill dependencies (some skills require others) - Detect circular dependencies - Recommend optimal skill combinations ### 5. Implement Skill Conflict Detection - Detect skills with conflicting tool usage - Identify resource contention (browser, file locks) - Suggest skill compatibility matrix ### 6. Add Performance Profiling - Track skill execution time over sessions - Monitor API usage and costs - Identify bottlenecks in skill chains ### 7. Create Skill Reputation System - Track skill reliability across users - Aggregate success/failure rates - Community-rated skill quality scores ### 8. Implement A/B Testing Framework - Compare two skills for same task - Measure which completes faster/better - Data-driven skill selection ### 9. Add Skill Update Notifications - Monitor skill updates in ClawHub - Alert on breaking changes - Suggest upgrade timing ### 10. Create Skill Usage Analytics - Track which skills are used most frequently - Identify skill chains and workflows - Optimize skill loading order --- ## Notes - This skill adapts EEAT from content/code evaluation to AI agent skill vetting - Security is elevated to critical importance due to system-level access - Utility is evaluated comparatively (skill vs. baseline), not absolutely - Gating mechanisms ensure skills only activate when dependencies are met - Community signals (downloads, stars, issues) inform Authority dimension - Prompt quality in SKILL.md directly impacts skill behavior - Skills with executable scripts require deeper security audit - This framework is designed for OpenClaw's modular skill architecture

path: references/openclaw-skill-benchmark.md
content: # OpenClaw Skill EEAT Benchmark

> **Complete 80-Item Benchmark for AI Agent Skill Quality Evaluation** — Adapted from CORE-EEAT framework for OpenClaw Skills, focusing on utility, security, and reliability.

## Benchmark Structure

This benchmark defines 80 evaluation items across 8 dimensions, specifically adapted for OpenClaw Skills (modular AI agent capabilities defined by `SKILL.md` files).

### Dimension Overview

| Dimension | Code Context | Items | Focus Area |
|-----------|--------------|-------|------------|
| **C** - Correctness & Clarity | Skill Purpose & Logic | 10 | Does the skill do what it claims? |
| **O** - Organization & Structure | Skill Structure & Layout | 10 | Is the skill well-organized? |
| **R** - Referenceability & Reliability | Skill Quality & Consistency | 10 | Is the skill reliable and maintainable? |
| **E** - Exclusivity & Efficiency | Unique Value & Performance | 10 | Does the skill offer unique value? |
| **Exp** - Experience | Real-World Usage & Testing | 10 | Has the skill been tested in practice? |
| **Ept** - Expertise | Technical Standards & Best Practices | 10 | Does it follow professional standards? |
| **A** - Authority | Ecosystem Trust & Community | 10 | Is the skill trusted by the community? |
| **T** - Trust | Security & Safety | 10 | Is the skill safe to use? |

---

## CORE Dimensions (40 Items) — Skill Context

### C — Correctness & Clarity (Intent & Logic)

**Goal**: Ensure the skill delivers on its promises with clear, predictable behavior.

| ID | Check Item | Skill Context | Scoring Standard |
|----|------------|---------------|------------------|
| C01 🎯 | Intent Alignment | Skill description matches actual functionality | **Pass (10)**: Description accurately reflects all features<br>**Partial (5)**: Minor discrepancies or vague language<br>**Fail (0)**: Misleading or false claims |
| C02 🎯 | Direct Result | Skill produces clear, observable outputs | **Pass (10)**: Outputs are well-structured and actionable<br>**Partial (5)**: Outputs exist but require post-processing<br>**Fail (0)**: Ambiguous or inconsistent outputs |
| C03 | Edge Cases | Skill handles boundary conditions gracefully | **Pass (10)**: All documented edge cases handled<br>**Partial (5)**: Some edge cases crash or fail<br>**Fail (0)**: No edge case handling |
| C04 | Type Definitions | Input/output types are clearly defined | **Pass (10)**: Complete type annotations in prompts and scripts<br>**Partial (5)**: Partial type information<br>**Fail (0)**: No type definitions |
| C05 | Skill Scope | Well-defined boundaries and limitations | **Pass (10)**: Clear in-scope and out-of-scope documented<br>**Partial (5)**: Scope mentioned but unclear<br>**Fail (0)**: No scope definition |
| C06 | Target Context | Appropriate for intended use cases | **Pass (10)**: Perfect fit for target scenarios<br>**Partial (5)**: Works in some but not all target scenarios<br>**Fail (0)**: Mismatched with target use cases |
| C07 | Control Flow | Prompt instructions are logical and sequential | **Pass (10)**: Clear step-by-step instructions<br>**Partial (5)**: Some logical gaps or inconsistencies<br>**Fail (0)**: Disorganized or contradictory instructions |
| C08 | Usage Patterns | Clear API/tool usage patterns | **Pass (10)**: Explicit tool invocation examples<br>**Partial (5)**: Vague or implicit usage<br>**Fail (0)**: No usage guidance |
| C09 | Error Cases | Proper error handling and recovery | **Pass (10)**: Comprehensive error handling with messages<br>**Partial (5)**: Basic error handling<br>**Fail (0)**: No error handling |
| C10 | Semantic Closure | Complete logic, no loose ends | **Pass (10)**: All operations have clear completion<br>**Partial (5)**: Some operations may hang<br>**Fail (0)**: Incomplete workflows |

**C Dimension Score**: (Sum of scores) / 10

---

### O — Organization & Structure

**Goal**: Ensure the skill is well-structured, modular, and easy to navigate.

| ID | Check Item | Skill Context | Scoring Standard |
|----|------------|---------------|------------------|
| O01 🎯 | Module Hierarchy | Clear directory structure (SKILL.md, scripts/, references/) | **Pass (10)**: Follows OpenClaw convention<br>**Partial (5)**: Deviates but understandable<br>**Fail (0)**: Chaotic structure |
| O02 | Interface Summary | Clear skill metadata in YAML frontmatter | **Pass (10)**: All required fields present (name, description, version)<br>**Partial (5)**: Missing some metadata<br>**Fail (0)**: No or invalid frontmatter |
| O03 | Data Structures | Well-defined data schemas and types | **Pass (10)**: Clear input/output schemas<br>**Partial (5)**: Some schema ambiguity<br>**Fail (0)**: No schema definitions |
| O04 | List/Sequence | Proper handling of collections/arrays | **Pass (10)**: Correct batch/array processing<br>**Partial (5)**: Limited collection support<br>**Fail (0)**: Fails with collections |
| O05 | Schema/Type Markers | Type hints in scripts and prompts | **Pass (10)**: Comprehensive type annotations<br>**Partial (5)**: Partial annotations<br>**Fail (0)**: No type hints |
| O06 | Function Length | Reasonable prompt/section sizes | **Pass (10)**: Prompts under 2000 tokens, modular sections<br>**Partial (5)**: Some long sections<br>**Fail (0)**: Monolithic, difficult to follow |
| O07 | Visual Hierarchy | Clear formatting, headings, code blocks | **Pass (10)**: Professional Markdown formatting<br>**Partial (5)**: Basic formatting<br>**Fail (0)**: Poor or no formatting |
| O08 | Navigation | Easy to find relevant sections | **Pass (10)**: Clear sections, table of contents<br>**Partial (5)**: Some navigation aid<br>**Fail (0)**: Hard to navigate |
| O09 | Density | Balanced information density | **Pass (10)**: Appropriate detail level<br>**Partial (5)**: Too dense or too sparse<br>**Fail (0)**: Information overload or too sparse |
| O10 | Multimedia | Diagrams, screenshots, visual aids | **Pass (10)**: Includes helpful visuals<br>**Partial (5)**: Basic visuals<br>**Fail (0)**: No visual aids |

**O Dimension Score**: (Sum of scores) / 10

---

### R — Referenceability & Reliability

**Goal**: Ensure the skill is reliable, testable, and maintainable.

| ID | Check Item | Skill Context | Scoring Standard |
|----|------------|---------------|------------------|
| R01 | Test Precision | Clear test scenarios and expectations | **Pass (10)**: Comprehensive test cases documented<br>**Partial (5)**: Some test examples<br>**Fail (0)**: No testing guidance |
| R02 | Coverage | Sufficient test coverage for key paths | **Pass (10)**: All major paths testable<br>**Partial (5)**: Partial test coverage<br>**Fail (0)**: No testability consideration |
| R03 | Source Authority | Uses trusted dependencies and APIs | **Pass (10)**: All dependencies vetted and stable<br>**Partial (5)**: Some dependencies questionable<br>**Fail (0)**: Uses untrusted or deprecated deps |
| R04 | Evidence | Assertions, validations, checks in code | **Pass (10)**: Robust validation throughout<br>**Partial (5)**: Some validation<br>**Fail (0)**: No validation |
| R05 | Methodology | Clear algorithms and approaches | **Pass (10)**: Well-documented approach<br>**Partial (5)**: Vague methodology<br>**Fail (0)**: No clear method |
| R06 | Versioning | Semantic versioning and change logs | **Pass (10)**: Proper semver, changelog maintained<br>**Partial (5)**: Basic versioning<br>**Fail (0)**: No versioning |
| R07 | Entity Precision | Consistent naming conventions | **Pass (10)**: Professional, consistent naming<br>**Partial (5)**: Some inconsistency<br>**Fail (0)**: Chaotic naming |
| R08 | Internal References | Clear module/script dependencies | **Pass (10)**: Well-documented dependencies<br>**Partial (5)**: Some dependency info<br>**Fail (0)**: No dependency documentation |
| R09 | Semantics | Meaningful variable/function names | **Pass (10)**: Self-documenting code<br>**Partial (5)**: Some unclear names<br>**Fail (0)**: Cryptic or misleading names |
| R10 ⚠️ | Consistency | No contradictions, consistent behavior | **Pass (10)**: Fully consistent<br>**Fail (0)**: Contradictions or unpredictable behavior |

**R Dimension Score**: (Sum of scores) / 10

---

### E — Exclusivity & Efficiency

**Goal**: Ensure the skill offers unique value and performs efficiently.

| ID | Check Item | Skill Context | Scoring Standard |
|----|------------|---------------|------------------|
| E01 | Original Algorithms | Custom implementations, not just wrappers | **Pass (10)**: Novel or optimized approach<br>**Partial (5)**: Standard implementation<br>**Fail (0)**: Trivial wrapper |
| E02 | Innovative Patterns | Novel design patterns or workflows | **Pass (10)**: Creative solution<br>**Partial (5)**: Conventional approach<br>**Fail (0)**: Generic or copied |
| E03 | Benchmarks | Performance metrics documented | **Pass (10)**: Comprehensive benchmarks<br>**Partial (5)**: Basic timing info<br>**Fail (0)**: No performance data |
| E04 | Alternative Approaches | Considers multiple solutions | **Pass (10)**: Compares alternatives<br>**Partial (5)**: Mentions alternatives<br>**Fail (0)**: Single solution only |
| E05 | Visual Assets | Diagrams, flowcharts, architecture | **Pass (10)**: Rich visual documentation<br>**Partial (5)**: Basic visuals<br>**Fail (0)**: No visual assets |
| E06 | Gap Filling | Solves unaddressed problems | **Pass (10)**: Fills clear gap<br>**Partial (5)**: Incremental improvement<br>**Fail (0)**: Redundant solution |
| E07 | Utilities | Helper functions, convenience methods | **Pass (10)**: Useful utilities included<br>**Partial (5)**: Basic utilities<br>**Fail (0)**: No utilities |
| E08 | Depth | Comprehensive implementation | **Pass (10)**: Full-featured<br>**Partial (5)**: Partial implementation<br>**Fail (0)**: Shallow or incomplete |
| E09 | Integration | Good ecosystem integration | **Pass (10)**: Seamless OpenClaw integration<br>**Partial (5)**: Basic integration<br>**Fail (0)**: Poor integration |
| E10 | Future-Proof | Anticipates changes and updates | **Pass (10)**: Forward-compatible design<br>**Partial (5)**: Some consideration<br>**Fail (0)**: Brittle design |

**E Dimension Score**: (Sum of scores) / 10

---

## EEAT Dimensions (40 Items) — Skill Context

### Exp — Experience (Practical Testing)

**Goal**: Ensure the skill demonstrates real-world testing and usage.

| ID | Check Item | Skill Context | Scoring Standard |
|----|------------|---------------|------------------|
| Exp01 | Usage Examples | Demonstrates skill usage with examples | **Pass (10)**: Multiple, varied examples<br>**Partial (5)**: Basic example<br>**Fail (0)**: No examples |
| Exp02 | Observable Behavior | Logging, metrics, or debug output | **Pass (10)**: Comprehensive logging<br>**Partial (5)**: Basic logging<br>**Fail (0)**: No observability |
| Exp03 | Process Docs | Step-by-step workflow documentation | **Pass (10)**: Clear workflow guide<br>**Partial (5)**: Basic steps<br>**Fail (0)**: No workflow docs |
| Exp04 | Substantive Proof | Screenshots, demo outputs, evidence | **Pass (10)**: Rich evidence of working skill<br>**Partial (5)**: Basic evidence<br>**Fail (0)**: No proof |
| Exp05 | Runtime Duration | Performance characteristics documented | **Pass (10)**: Detailed performance info<br>**Partial (5)**: Basic timing info<br>**Fail (0)**: No performance data |
| Exp06 | Issues Encountered | Known limitations documented | **Pass (10)**: Honest, detailed limitations<br>**Partial (5)**: Basic limitations list<br>**Fail (0)**: No limitations documented |
| Exp07 | Before/After | Comparative improvements shown | **Pass (10)**: Clear comparison<br>**Partial (5)**: Some comparison<br>**Fail (0)**: No comparison |
| Exp08 | Quantified Metrics | Benchmarks, success rates, SLAs | **Pass (10)**: Comprehensive metrics<br>**Partial (5)**: Basic metrics<br>**Fail (0)**: No metrics |
| Exp09 | Stress Testing | Load tests, edge case testing | **Pass (10)**: Stress testing documented<br>**Partial (5)**: Basic edge testing<br>**Fail (0)**: No stress testing |
| Exp10 | Limitations | Honest capability documentation | **Pass (10)**: Thorough limitations section<br>**Partial (5)**: Some limitations<br>**Fail (0)**: Overly optimistic claims |

**Exp Dimension Score**: (Sum of scores) / 10

---

### Ept — Expertise (Technical Proficiency)

**Goal**: Ensure the skill demonstrates professional engineering standards.

| ID | Check Item | Skill Context | Scoring Standard |
|----|------------|---------------|------------------|
| Ept01 | Author Identity | Clear skill author attribution | **Pass (10)**: Complete author info<br>**Partial (5)**: Basic author info<br>**Fail (0)**: No author attribution |
| Ept02 | Credentials | Links to portfolio, GitHub, expertise | **Pass (10)**: Verified credentials<br>**Partial (5)**: Some credentials<br>**Fail (0)**: No credentials |
| Ept03 🎯 | Professional Terminology | Standard AI/ML/programming terminology | **Pass (10)**: Accurate, professional language<br>**Partial (5)**: Some jargon or imprecise terms<br>**Fail (0)**: Inaccurate or amateurish |
| Ept04 | Technical Depth | Appropriate complexity for the task | **Pass (10)**: Right level of depth<br>**Partial (5)**: Too shallow or too complex<br>**Fail (0)**: Mismatched complexity |
| Ept05 | Methodology | Follows skill engineering best practices | **Pass (10)**: Professional approach<br>**Partial (5)**: Decent methodology<br>**Fail (0)**: Poor or no methodology |
| Ept06 | Edge Cases | Handles corner cases professionally | **Pass (10)**: Comprehensive edge case handling<br>**Partial (5)**: Some edge cases<br>**Fail (0)**: Ignores edge cases |
| Ept07 | Historical Context | References best practices or standards | **Pass (10)**: Well-researched, references standards<br>**Partial (5)**: Some references<br>**Fail (0)**: No context |
| Ept08 🎯 | Reasoning | Prompts are self-explanatory | **Pass (10)**: Clear, logical instructions<br>**Partial (5)**: Some ambiguity<br>**Fail (0)**: Confusing or illogical |
| Ept09 | Cross-Domain | Integrates multiple concerns well | **Pass (10)**: Holistic approach<br>**Partial (5)**: Limited integration<br>**Fail (0)**: Siloed thinking |
| Ept10 | Review Process | Code review or peer review evidence | **Pass (10)**: Review process documented<br>**Partial (5)**: Some review mentions<br>**Fail (0)**: No review process |

**Ept Dimension Score**: (Sum of scores) / 10

---

### A — Authority (Ecosystem Standing)

**Goal**: Ensure the skill and its repository have community trust.

| ID | Check Item | Skill Context | Scoring Standard |
|----|------------|---------------|------------------|
| A01 | Dependencies | Quality and security of upstream deps | **Pass (10)**: All deps are reputable<br>**Partial (5)**: Some deps questionable<br>**Fail (0)**: Uses problematic deps<br>**N/A**: No external deps |
| A02 | Community Mentions | References, citations, usage | **Pass (10)**: Widely referenced<br>**Partial (5)**: Some mentions<br>**Fail (0)**: No mentions<br>**N/A**: New skill |
| A03 | Awards/Badges | CI badges, security scores, quality indicators | **Pass (10)**: Multiple quality badges<br>**Partial (5)**: Basic badges<br>**Fail (0)**: No badges |
| A04 | Release History | Stable, frequent updates | **Pass (10)**: Active, stable releases<br>**Partial (5)**: Sporadic updates<br>**Fail (0)**: Abandoned or unstable |
| A05 | Brand/Repo Recognition | Repository reputation and trust | **Pass (10)**: Highly regarded repo<br>**Partial (5)**: Moderate reputation<br>**Fail (0)**: Unknown or suspicious |
| A06 | Social Proof | Stars, forks, contributors, downloads | **Pass (10)**: Strong community adoption<br>**Partial (5)**: Some adoption<br>**Fail (0)**: No adoption<br>**N/A**: Private skill |
| A07 | Package Index | Listed on ClawHub or package managers | **Pass (10)**: Official listing<br>**Partial (5)**: Informal listing<br>**Fail (0)**: Not listed |
| A08 | Entity Consistency | Consistent naming across ecosystem | **Pass (10)**: Consistent branding<br>**Partial (5)**: Some inconsistency<br>**Fail (0)**: Confusing naming |
| A09 | Partner Integrations | Official or verified integrations | **Pass (10)**: Official integrations<br>**Partial (5)**: Unofficial integrations<br>**Fail (0)**: No integrations |
| A10 | Community Response | Issue resolution, support activity | **Pass (10)**: Active, responsive support<br>**Partial (5)**: Some response<br>**Fail (0)**: Unresponsive community |

**A Dimension Score**: (Sum of scores) / 10

---

### T — Trust (Reliability & Security)

**Goal**: Ensure the skill is trustworthy, secure, and safe to use.

| ID | Check Item | Skill Context | Scoring Standard |
|----|------------|---------------|------------------|
| T01 | Legal Compliance | License compliance, proper attribution | **Pass (10)**: Clear, compliant license<br>**Partial (5)**: License ambiguity<br>**Fail (0)**: License violation or no license |
| T02 | Contact Info | Maintainer is contactable | **Pass (10)**: Multiple contact methods<br>**Partial (5)**: Basic contact info<br>**Fail (0)**: No way to contact maintainer |
| T03 🎯 | Security Standards | Secure coding practices in scripts | **Pass (10)**: Follows security best practices<br>**Partial (5)**: Some security measures<br>**Fail (0)**: No security consideration |
| T04 ⚠️ | Disclosure | Security vulnerabilities disclosed | **Pass (10)**: Transparent about issues<br>**Fail (0)**: Hidden vulnerabilities or no disclosure |
| T05 | Code Review Policy | Review standards documented | **Pass (10)**: Clear review process<br>**Partial (5)**: Basic review mention<br>**Fail (0)**: No review process |
| T06 | Deprecation Policy | Version management and deprecation | **Pass (10)**: Clear deprecation policy<br>**Partial (5)**: Basic version info<br>**Fail (0)**: No deprecation planning |
| T07 | Dependency Hygiene | No vulnerable dependencies | **Pass (10)**: All deps secure and updated<br>**Partial (5)**: Some outdated deps<br>**Fail (0)**: Vulnerable dependencies |
| T08 | Risk Disclaimers | Beta/alpha warnings, risk disclosures | **Pass (10)**: Clear risk communication<br>**Partial (5)**: Basic warnings<br>**Fail (0)**: No risk disclosure |
| T09 | Authenticity | Not plagiarized, properly attributed | **Pass (10)**: Original or properly attributed<br>**Partial (5)**: Some attribution missing<br>**Fail (0)**: Plagiarized or uncredited |
| T10 | Support Channels | Issues, discussions, help docs | **Pass (10)**: Comprehensive support resources<br>**Partial (5)**: Basic support<br>**Fail (0)**: No support channels |

**T Dimension Score**: (Sum of scores) / 10

---

## Veto Items (Critical Failures)

These items, if failed, prevent skill installation or use:

- **C10**: Semantic Closure - Incomplete workflows
- **R10**: Consistency - Contradictory behavior
- **T03**: Security Standards - No security consideration
- **T04**: Disclosure - Hidden vulnerabilities
- **T07**: Dependency Hygiene - Vulnerable dependencies

**Action**: If any veto item fails, do not install or use the skill until fixed.

---

## GEO-First Items (🎯)

These items are critical for AI agent citation and reuse:

- **C01**: Intent Alignment - Clear, accurate purpose
- **C02**: Direct Result - Observable, actionable outputs
- **O01**: Module Hierarchy - Standard structure
- **O02**: Interface Summary - Complete metadata
- **Ept03**: Professional Terminology - Accurate language
- **Ept08**: Reasoning - Self-explanatory prompts
- **T03**: Security Standards - Secure implementation

**Focus**: Prioritize these for skills intended to be widely adopted or cited by AI agents.

---

## Skill Type Weightings

Different skill types prioritize different dimensions:

### Productivity Skills
- C: 30% | O: 5% | R: 25% | E: 0% | Exp: 20% | Ept: 15% | A: 5% | T: 0%

### Development Skills
- C: 25% | O: 20% | R: 20% | E: 5% | Exp: 5% | Ept: 20% | A: 5% | T: 0%

### Research Skills
- C: 25% | O: 10% | R: 25% | E: 15% | Exp: 0% | Ept: 0% | A: 20% | T: 5%

### Automation Skills
- T: 30% | C: 25% | O: 15% | R: 20% | E: 0% | Exp: 5% | Ept: 5% | A: 0%

### Content Skills
- C: 30% | O: 15% | R: 5% | E: 25% | Exp: 20% | Ept: 5% | A: 0% | T: 0%

### System Skills
- T: 25% | C: 20% | O: 10% | R: 20% | E: 15% | Exp: 5% | Ept: 5% | A: 0%

---

## Scoring Summary

**Dimension Score** = (Sum of item scores) / 10

**System Scores**:
- **GEO Score** (AI Citation Potential) = (C + O + R + E) / 4
- **SEO Score** (Utility & Trust) = (Exp + Ept + A + T) / 4

**Weighted Total Score** = Σ (Dimension Score × Skill Type Weight)

**Rating Standards**:
- 90-100: Excellent
- 75-89: Good
- 60-74: Fair
- 40-59: Poor
- 0-39: Critical


path: references/skill-security-checklist.md
content: # OpenClaw Skill Security Checklist

> **Comprehensive Security Evaluation for AI Agent Skills** — Focused on identifying security vulnerabilities, data leakage risks, and permission abuses in OpenClaw Skills.

## Security Philosophy

OpenClaw Skills operate with system-level access (file system, network, shell commands), making security non-negotiable. This checklist provides a structured approach to security vetting.

**Core Principles**:
1. **Principle of Least Privilege** - Skills should only request necessary access
2. **Defense in Depth** - Multiple layers of security validation
3. **Transparency** - All security risks must be disclosed
4. **Zero Trust** - Verify everything, trust nothing by default

---

## Security Zones

### Zone 1: Pre-Installation Check (Critical)

**When**: Before installing any skill

**Duration**: 2-5 minutes

**Purpose**: Identify show-stopping security issues

---

#### T04.1: Command Injection Vulnerabilities

**Check**: Scan for dangerous patterns in `SKILL.md` and `scripts/`

**Dangerous Patterns**:
```bash
# Shell command execution
exec()
eval()
subprocess.run(shell=True)
os.system()
child_process.execSync()
```

**Example Vulnerability**:
```python
# ❌ DANGEROUS - User input in exec
user_url = input("Enter URL: ")
os.system(f"curl {user_url}")  # Command injection!
```

**Example Fix**:
```python
# ✅ SAFE - Use subprocess with args
import subprocess
user_url = input("Enter URL: ")
subprocess.run(["curl", user_url], check=True)  # Safe
```

**Scoring**:
- **Pass (10)**: No dangerous patterns found
- **Fail (0)**: Command injection vulnerability detected

**Action**: Fix vulnerability before installation

---

#### T04.2: Data Leakage Risks

**Check**: Examine how skill handles sensitive data

**Risks**:
- Hardcoded API keys, passwords, tokens
- Logging sensitive information
- Unencrypted data transmission
- Sensitive data in error messages

**Example Vulnerability**:
```yaml
# ❌ DANGEROUS - Hardcoded credentials
[REDACTED_SECRET]"
database_url: "postgresql://user:pass123@..."
```

**Example Fix**:
```yaml
# ✅ SAFE - Environment variables
[REDACTED_SECRET]"
database_url: "${DATABASE_URL}"
```

**Scoring**:
- **Pass (10)**: No data leakage risks
- **Fail (0)**: Sensitive data exposed

**Action**: Remove all hardcoded secrets, use environment variables

---

#### T04.3: Path Traversal Vulnerabilities

**Check**: Validate file path handling

**Dangerous Patterns**:
```python
# ❌ DANGEROUS - Unvalidated paths
user_path = input("Enter file path: ")
with open(user_path, 'r') as f:
    content = f.read()  # Could read /etc/passwd!
```

**Example Fix**:
```python
# ✅ SAFE - Validate and sanitize
import os
from pathlib import Path

SAFE_DIR = "/app/data"
user_path = input("Enter filename: ")

full_path = (Path(SAFE_DIR) / user_path).resolve()
if not str(full_path).startswith(SAFE_DIR):
    raise ValueError("Invalid path")

with open(full_path, 'r') as f:
    content = f.read()
```

**Scoring**:
- **Pass (10)**: Path traversal protection in place
- **Fail (0)**: Path traversal vulnerability

**Action**: Implement path validation

---

#### T04.4: Permission Overreach

**Check**: Validate requested permissions vs. actual needs

**Permission Types**:
- **File System**: Read, Write, Execute
- **Network**: HTTP, TCP, UDP
- **Shell**: Command execution
- **System**: Process control, system info

**Example Overreach**:
```yaml
# ❌ OVERREACH - Skill only needs to read files
permissions:
  filesystem: "read+write+execute"  # Too broad!
```

**Example Fix**:
```yaml
# ✅ MINIMAL - Only what's needed
permissions:
  filesystem: "read"
```

**Scoring**:
- **Pass (10)**: Minimal, justified permissions
- **Partial (5)**: Some overreach
- **Fail (0)**: Excessive or dangerous permissions

**Action**: Restrict permissions to minimum required

---

### Zone 2: Gating Mechanism Check

**When**: After pre-installation check, before activation

**Duration**: 1-2 minutes

**Purpose**: Ensure skill only activates when safe

---

#### T04.5: Tool Availability Check (bins)

**Check**: Verify required tools exist before activation

**Example**:
```yaml
gating:
  bins:
    - ffmpeg  # Required for video processing
    - imagemagick  # Required for image conversion
```

**Validation**:
```bash
# Check if required tools exist
which ffmpeg
which imagemagick
```

**Scoring**:
- **Pass (10)**: All required tools checked and validated
- **Partial (5)**: Some tools unchecked
- **Fail (0)**: No tool validation

**Action**: Add gating for all required external tools

---

#### T04.6: Environment Variable Check (env)

**Check**: Verify required environment variables are set

**Example**:
```yaml
gating:
  env:
    - OPENAI_API_KEY
    - DATABASE_URL
```

**Scoring**:
- **Pass (10)**: All required env vars validated
- **Partial (5)**: Some env vars unchecked
- **Fail (0)**: No env var validation

**Action**: Add gating for all required environment variables

---

#### T04.7: OS Compatibility Check (os)

**Check**: Verify skill works on target OS

**Example**:
```yaml
gating:
  os:
    - "darwin"    # macOS
    - "linux"
    # "windows"  # Excluded - not supported
```

**Scoring**:
- **Pass (10)**: OS compatibility clearly defined and checked
- **Partial (5)**: Basic OS check
- **Fail (0)**: No OS compatibility check

**Action**: Add OS gating if skill has platform dependencies

---

### Zone 3: Runtime Security Check

**When**: During skill execution

**Duration**: Ongoing

**Purpose**: Monitor security during operation

---

#### T04.8: Input Validation

**Check**: All user inputs are validated and sanitized

**Input Types to Validate**:
- File paths
- URLs
- Shell commands
- JSON/XML data
- User-provided code

**Example Validation**:
```python
def validate_url(url: str) -> str:
    """Validate and sanitize URL input"""
    from urllib.parse import urlparse
    
    parsed = urlparse(url)
    
    # Only allow http/https
    if parsed.scheme not in ['http', 'https']:
        raise ValueError("Only HTTP/HTTPS URLs allowed")
    
    # Block localhost/internal IPs
    if parsed.hostname in ['localhost', '127.0.0.1', '::1']:
        raise ValueError("Internal hosts not allowed")
    
    return url
```

**Scoring**:
- **Pass (10)**: Comprehensive input validation
- **Partial (5)**: Basic validation
- **Fail (0)**: No input validation

**Action**: Add validation for all user inputs

---

#### T04.9: Error Message Safety

**Check**: Error messages don't leak sensitive information

**Dangerous**:
```python
# ❌ DANGEROUS - Leaks file structure
try:
    with open(user_file, 'r') as f:
        data = f.read()
except Exception as e:
    print(f"Error reading file: {e}")  # Leaks path!
    # Output: Error reading file: [Errno 2] No such file: '/etc/passwd'
```

**Safe**:
```python
# ✅ SAFE - Generic error
try:
    with open(user_file, 'r') as f:
        data = f.read()
except FileNotFoundError:
    print("File not found")
except PermissionError:
    print("Access denied")
except Exception as e:
    print("Error reading file")
    logger.error(f"Error: {e}")  # Log detailed error, show generic to user
```

**Scoring**:
- **Pass (10)**: Safe, generic error messages
- **Partial (5)**: Some information leakage
- **Fail (0)**: Detailed error messages to users

**Action**: Sanitize all error messages shown to users

---

#### T04.10: Resource Cleanup

**Check**: Proper cleanup of resources (files, connections, processes)

**Example**:
```python
# ✅ GOOD - Proper cleanup with context manager
def process_file(filename: str) -> str:
    with open(filename, 'r') as f:  # Auto-closes
        data = f.read()
    return data

# ✅ GOOD - Explicit cleanup
def fetch_data(url: str) -> str:
    import requests
    session = requests.Session()
    try:
        response = session.get(url, timeout=30)
        return response.text
    finally:
        session.close()  # Ensure cleanup
```

**Scoring**:
- **Pass (10)**: All resources properly cleaned up
- **Partial (5)**: Some cleanup issues
- **Fail (0)**: Resource leaks

**Action**: Ensure proper cleanup using context managers or finally blocks

---

### Zone 4: Dependency Security

**When**: Installation and update

**Duration**: 3-5 minutes

**Purpose**: Verify dependencies are secure

---

#### T04.11: Dependency Vulnerability Scan

**Check**: Scan for known vulnerabilities in dependencies

**Tools**:
```bash
# Python
pip-audit
safety check

# Node.js
npm audit
yarn audit

# Go
go mod verify
gosec ./...

# Rust
cargo audit
```

**Scoring**:
- **Pass (10)**: No vulnerabilities
- **Partial (5)**: Minor vulnerabilities, fixable
- **Fail (0)**: Critical or high vulnerabilities

**Action**: Update or replace vulnerable dependencies

---

#### T04.12: Dependency Source Verification

**Check**: Verify dependencies come from trusted sources

**Trusted Sources**:
- Official package registries (PyPI, npm, crates.io)
- Official GitHub repositories with verified signatures
- Vendor-controlled package managers

**Untrusted Sources**:
- Random GitHub repos without verification
- Unofficial mirrors
- Direct download links without checksums

**Scoring**:
- **Pass (10)**: All dependencies from trusted sources
- **Partial (5)**: Some from questionable sources
- **Fail (0)**: Dependencies from untrusted sources

**Action**: Replace with trusted alternatives or vendor

---

### Zone 5: Advanced Security Checks

**When**: For high-risk or production skills

**Duration**: 10-20 minutes

**Purpose**: Deep security analysis

---

#### T04.13: Code Obfuscation Check

**Check**: Identify obfuscated or suspicious code

**Warning Signs**:
- Base64-encoded strings in code
- Compressed/minified code
- Unusual character encoding
- Anti-debugging techniques

**Example Suspicious Code**:
```python
# ❌ SUSPICIOUS - Base64 encoded
import base64
cmd = base64.b64decode("Y3VybCBodHRwOi8vZXZpbC5jb20v...").decode()
os.system(cmd)  # What is this doing?
```

**Scoring**:
- **Pass (10)**: No obfuscation
- **Fail (0)**: Obfuscated or suspicious code found

**Action**: Demand explanation or reject skill

---

#### T04.14: Network Communication Audit

**Check**: Audit all network communications

**What to Check**:
- All HTTP/HTTPS endpoints (are they legitimate?)
- Data in transit (is it encrypted?)
- Certificate validation (is it bypassed?)
- Data exfiltration risks

**Example Check**:
```python
# ❌ DANGEROUS - Certificate validation disabled
import requests
requests.get("https://example.com", verify=False)  # No SSL verification!

# ✅ SAFE - Proper certificate validation
requests.get("https://example.com", verify=True)
```

**Scoring**:
- **Pass (10)**: All network communications secure
- **Partial (5)**: Some insecure communications
- **Fail (0)**: Multiple security issues

**Action**: Fix all network security issues

---

#### T04.15: File Access Audit

**Check**: Audit all file system access

**What to Check**:
- Files read (are they user data or system files?)
- Files written (where are they going?)
- File permissions (are they appropriate?)
- Temporary file cleanup

**Example Check**:
```python
# ❌ DANGEROUS - Could read any file
def read_user_file(path: str) -> str:
    with open(path, 'r') as f:  # No validation!
        return f.read()

# ✅ SAFE - Restricted to safe directory
def read_user_file(filename: str) -> str:
    safe_dir = os.path.expanduser("~/skill-data")
    full_path = os.path.join(safe_dir, filename)
    
    # Validate path
    if not os.path.abspath(full_path).startswith(safe_dir):
        raise PermissionError("Access denied")
    
    with open(full_path, 'r') as f:
        return f.read()
```

**Scoring**:
- **Pass (10)**: File access properly restricted
- **Partial (5)**: Some unrestricted access
- **Fail (0)**: Unrestricted file system access

**Action**: Restrict file access to necessary directories

---

## Security Score Calculation

**Zone 1 (Critical)**: 50% weight
- T04.1: Command Injection (15%)
- T04.2: Data Leakage (15%)
- T04.3: Path Traversal (10%)
- T04.4: Permission Overreach (10%)

**Zone 2 (Gating)**: 20% weight
- T04.5: Tool Check (7%)
- T04.6: Env Check (7%)
- T04.7: OS Check (6%)

**Zone 3 (Runtime)**: 15% weight
- T04.8: Input Validation (5%)
- T04.9: Error Messages (5%)
- T04.10: Resource Cleanup (5%)

**Zone 4 (Dependencies)**: 10% weight
- T04.11: Vulnerability Scan (6%)
- T04.12: Source Verification (4%)

**Zone 5 (Advanced)**: 5% weight
- T04.13: Obfuscation (2%)
- T04.14: Network Audit (2%)
- T04.15: File Access (1%)

**Total Security Score** = Sum of all zone scores

**Rating**:
- 90-100: Secure
- 75-89: Mostly Secure
- 60-74: Caution
- 40-59: Risky
- 0-39: Dangerous

---

## Security Action Matrix

| Score | Action | Installation |
|-------|--------|-------------|
| 90-100 | None | ✅ Approve |
| 75-89 | Review and fix minor issues | ⚠️ Conditional |
| 60-74 | Fix critical issues before use | ❌ Block until fixed |
| 40-59 | Significant security concerns | ❌ Reject |
| 0-39 | Critical security vulnerabilities | ❌ Reject and report |

---

## Automated Security Scanning

Integrate with security tools for automated checks:

```bash
# Python skill security scan
python -m bandit -r scripts/
python -m safety check

# Node.js skill security scan
npm audit --audit-level=high
npx eslint scripts/ --plugin security

# General checks
grep -r "eval\|exec\|subprocess.*shell" scripts/
grep -r "os.system\|child_process.exec" scripts/
```

---

## Security Disclosure Template

If security issues are found, use this template to report:

```markdown
## Security Issue Report for [Skill Name]

### Severity: [Critical/High/Medium/Low]

### Issue Description
[Brief description of the security vulnerability]

### Affected Code
```python/ yaml/ bash
[Relevant code snippet]
```

### Proof of Concept
[Steps to reproduce the vulnerability]

### Impact
[What could happen if exploited?]

### Recommended Fix
```python/ yaml/ bash
[Secure implementation]
```

### Additional Notes
[Any other relevant information]
```

---

## Best Practices Summary

1. **Never** trust user input - always validate
2. **Never** hardcode secrets - use environment variables
3. **Always** use parameterized queries - prevent injection
4. **Always** validate file paths - prevent traversal
5. **Always** request minimal permissions - principle of least privilege
6. **Always** sanitize error messages - prevent information leakage
7. **Always** implement proper gating - check dependencies
8. **Always** scan dependencies - update regularly
9. **Always** use HTTPS - encrypt in transit
10. **Always** review code - manual security review

---

## References

- [OWASP Top 10](https://owasp.org/www-project-top-ten/)
- [CWE Top 25](https://cwe.mitre.org/top25/)
- [OpenClaw Security Guidelines](https://hello-claw.com/cn/adopt/chapter5/)
- [Python Security Best Practices](https://python.readthedocs.io/en/stable/library/security_warnings.html)


Security scan verdicts — ClawScan: clean | static analysis: suspicious | VirusTotal: clean | SkillSpector: suspicious (MEDIUM)