Skill: theshadowrose/wiki-local (version 1.0.0)

--- name: "WikiLocal Personal Knowledge Wiki" description: "Personal knowledge wiki managed by your agent. Create, link, search articles. Build a searchable knowledge base through conversation." author: "@TheShadowRose" version: "1.0.0" tags: ["wiki-local"] license: "MIT" --- # WikiLocal Personal Knowledge Wiki Personal knowledge wiki managed by your agent. Create, link, search articles. Build a searchable knowledge base through conversation. --- Build a personal knowledge base through conversation. Linked, searchable, yours. ## Usage ``` You: "Add to wiki: Spaced repetition is a study technique where you review at increasing intervals. Related to: memory, learning" Agent: "Added 'Spaced Repetition'. Linked to: Memory (existing), Learning (existing). Wiki: 47 articles." ``` ## Features - **Conversational editing** — add, update, link through chat - **Auto-linking** — detects related articles - **Full-text search** — find anything instantly - **Backlinks** — see what links TO an article - **Categories/tags** — organize by topic - **Stub detection** — tracks mentioned but unwritten articles - **Export** — static HTML wiki, markdown, PDF ## Search ``` You: "wiki search: cognitive bias" Agent: "3 results: 1. Cognitive Biases (main, 450 words) 2. System 1 Thinking (mentions, 280 words) 3. Decision Making (section on bias, 600 words)" ``` --- ## ⚠️ Disclaimer This software is provided "AS IS", without warranty of any kind, express or implied. **USE AT YOUR OWN RISK.** - The author(s) are NOT liable for any damages, losses, or consequences arising from the use or misuse of this software — including but not limited to financial loss, data loss, security breaches, business interruption, or any indirect/consequential damages. - This software does NOT constitute financial, legal, trading, or professional advice. - Users are solely responsible for evaluating whether this software is suitable for their use case, environment, and risk tolerance. - No guarantee is made regarding accuracy, reliability, completeness, or fitness for any particular purpose. - The author(s) are not responsible for how third parties use, modify, or distribute this software after purchase. By downloading, installing, or using this software, you acknowledge that you have read this disclaimer and agree to use the software entirely at your own risk. **DATA DISCLAIMER:** This software processes and stores data locally on your system. The author(s) are not responsible for data loss, corruption, or unauthorized access resulting from software bugs, system failures, or user error. Always maintain independent backups of important data. This software does not transmit data externally unless explicitly configured by the user. --- ## Support & Links | | | |---|---| | 🐛 **Bug Reports** | [REDACTED_SECRET] | | ☕ **Ko-fi** | [ko-fi.com/theshadowrose](https://ko-fi.com/theshadowrose) | | 🛒 **Gumroad** | [shadowyrose.gumroad.com](https://shadowyrose.gumroad.com) | | 🐦 **Twitter** | [@TheShadowyRose](https://twitter.com/TheShadowyRose) | | 🐙 **GitHub** | [github.com/TheShadowRose](https://github.com/TheShadowRose) | | 🧠 **PromptBase** | [promptbase.com/profile/shadowrose](https://promptbase.com/profile/shadowrose) | *Built with [OpenClaw](https://github.com/openclaw/openclaw) — thank you for making this possible.* --- 🛠️ **Need something custom?** Custom OpenClaw agents & skills starting at $500. If you can describe it, I can build it. → [Hire me on Fiverr](https://www.fiverr.com/s/jjmlZ0v)

path: LICENSE.md
content: MIT License

Copyright (c) 2026 Shadow Rose

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


path: README.md
content: # WikiLocal — Personal Knowledge Wiki

Build a personal knowledge base through conversation. Linked, searchable, yours.

## Usage

```
You: "Add to wiki: Spaced repetition is a study technique where you 
      review at increasing intervals. Related to: memory, learning"
Agent: "Added 'Spaced Repetition'. Linked to: Memory (existing), 
        Learning (existing). Wiki: 47 articles."
```

## Features

- **Conversational editing** — add, update, link through chat
- **Auto-linking** — detects related articles
- **Full-text search** — find anything instantly
- **Backlinks** — see what links TO an article
- **Categories/tags** — organize by topic
- **Stub detection** — tracks mentioned but unwritten articles
- **Export** — static HTML wiki, markdown, PDF

## Search

```
You: "wiki search: cognitive bias"
Agent: "3 results:
  1. Cognitive Biases (main, 450 words)
  2. System 1 Thinking (mentions, 280 words)
  3. Decision Making (section on bias, 600 words)"
```
---

## ⚠️ Disclaimer

This software is provided "AS IS", without warranty of any kind, express or implied.

**USE AT YOUR OWN RISK.**

- The author(s) are NOT liable for any damages, losses, or consequences arising from 
  the use or misuse of this software — including but not limited to financial loss, 
  data loss, security breaches, business interruption, or any indirect/consequential damages.
- This software does NOT constitute financial, legal, trading, or professional advice.
- Users are solely responsible for evaluating whether this software is suitable for 
  their use case, environment, and risk tolerance.
- No guarantee is made regarding accuracy, reliability, completeness, or fitness 
  for any particular purpose.
- The author(s) are not responsible for how third parties use, modify, or distribute 
  this software after purchase.

By downloading, installing, or using this software, you acknowledge that you have read 
this disclaimer and agree to use the software entirely at your own risk.


**DATA DISCLAIMER:** This software processes and stores data locally on your system. 
The author(s) are not responsible for data loss, corruption, or unauthorized access 
resulting from software bugs, system failures, or user error. Always maintain 
independent backups of important data. This software does not transmit data externally 
unless explicitly configured by the user.

---

## Support & Links

| | |
|---|---|
| 🐛 **Bug Reports** | [REDACTED_SECRET] |
| ☕ **Ko-fi** | [ko-fi.com/theshadowrose](https://ko-fi.com/theshadowrose) |
| 🛒 **Gumroad** | [shadowyrose.gumroad.com](https://shadowyrose.gumroad.com) |
| 🐦 **Twitter** | [@TheShadowyRose](https://twitter.com/TheShadowyRose) |
| 🐙 **GitHub** | [github.com/TheShadowRose](https://github.com/TheShadowRose) |
| 🧠 **PromptBase** | [promptbase.com/profile/shadowrose](https://promptbase.com/profile/shadowrose) |

*Built with [OpenClaw](https://github.com/openclaw/openclaw) — thank you for making this possible.*

---

🛠️ **Need something custom?** Custom OpenClaw agents & skills starting at $500. If you can describe it, I can build it. → [Hire me on Fiverr](https://www.fiverr.com/s/jjmlZ0v)


path: src/wiki-local.js
content: /**
 * WikiLocal — Personal Knowledge Wiki
 * @author @TheShadowRose
 * @license MIT
 */
const fs = require('fs');
const path = require('path');

class WikiLocal {
  constructor(options = {}) {
    this.wikiDir = options.wikiDir || './wiki/articles';
    this.indexFile = options.indexFile || './wiki/index.json';
    if (!fs.existsSync(this.wikiDir)) fs.mkdirSync(this.wikiDir, { recursive: true });
  }

  add(title, content, tags = [], relatedTo = []) {
    const slug = title.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '');
    if (!slug) return { error: 'Title must contain alphanumeric characters' };
    const file = path.join(this.wikiDir, slug + '.md');
    const header = `# ${title}\nTags: ${tags.join(', ')}\nRelated: ${relatedTo.join(', ')}\n\n`;
    fs.writeFileSync(file, header + content);
    this._updateIndex(slug, title, tags, relatedTo);
    // Create stubs for related articles that don't exist
    for (const r of relatedTo) {
      const rSlug = r.toLowerCase().replace(/[^a-z0-9]+/g, '-');
      const rFile = path.join(this.wikiDir, rSlug + '.md');
      if (!fs.existsSync(rFile)) {
        fs.writeFileSync(rFile, `# ${r}\n\n*Stub — expand this article.*\n`);
        this._updateIndex(rSlug, r, [], [title]);
      }
    }
    return { slug, title, file, linked: relatedTo.length };
  }

  get(titleOrSlug) {
    const slug = titleOrSlug.toLowerCase().replace(/[^a-z0-9]+/g, '-');
    const file = path.join(this.wikiDir, slug + '.md');
    try { return fs.readFileSync(file, 'utf8'); } catch { return null; }
  }

  search(query) {
    const q = query.toLowerCase();
    const index = this._getIndex();
    const results = [];
    const escaped = q.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
    for (const [slug, meta] of Object.entries(index)) {
      const content = this.get(slug) || '';
      if (meta.title.toLowerCase().includes(q) || content.toLowerCase().includes(q) || meta.tags.some(t => t.toLowerCase().includes(q))) {
        results.push({ slug, title: meta.title, matches: (content.match(new RegExp(escaped, 'gi')) || []).length });
      }
    }
    return results.sort((a, b) => b.matches - a.matches);
  }

  backlinks(titleOrSlug) {
    const slug = titleOrSlug.toLowerCase().replace(/[^a-z0-9]+/g, '-');
    const index = this._getIndex();
    return Object.entries(index).filter(([, meta]) => meta.relatedTo.some(r => r.toLowerCase().replace(/[^a-z0-9]+/g, '-') === slug)).map(([s, m]) => ({ slug: s, title: m.title }));
  }

  stats() {
    const index = this._getIndex();
    const articles = Object.keys(index).length;
    const stubs = Object.values(index).filter(m => m.tags.length === 0 && m.relatedTo.length === 0).length;
    return { articles, stubs, complete: articles - stubs };
  }

  _getIndex() { try { return JSON.parse(fs.readFileSync(this.indexFile, 'utf8')); } catch { return {}; } }
  _updateIndex(slug, title, tags, relatedTo) {
    const index = this._getIndex();
    index[slug] = { title, tags, relatedTo, updated: new Date().toISOString() };
    fs.writeFileSync(this.indexFile, JSON.stringify(index, null, 2));
  }
}

module.exports = { WikiLocal };


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