rohitg00/pro-workflow / skills/wiki-builder
wiki-builder
VerifiedStart, structure, and grow a persistent research wiki indexed in pro-workflow's SQLite knowledge base. Each wiki is a folder of markdown pages with provenance, plus a shadow FTS5 index so any session can recall it. Use when the user says "start a wiki", "add to wiki", "compile a page", "wiki on X", or wants a long-lived knowledge base on a topic, paper, product, person, project, or codebase.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.0 KB |
| agents/openai.yaml | config | 276 B |
| references/wiki-flavors.md | markdown | 3.5 KB |
| scripts/init_wiki.shexecutable | script | 2.7 KB |
| scripts/wiki-cli.jsexecutable | script | 6.8 KB |
| templates/index.md | markdown | 384 B |
| templates/maintenance-log.md | markdown | 128 B |
| templates/prompts/compile-concept-page.md | markdown | 715 B |
| templates/prompts/compile-index.md | markdown | 549 B |
| templates/prompts/compile-source-page.md | markdown | 759 B |
| templates/prompts/lint-wiki.md | markdown | 639 B |
| templates/prompts/query-and-file.md | markdown | 539 B |
| templates/sources.md | markdown | 263 B |
| templates/wiki.config.md | markdown | 1.5 KB |
scripts/init_wiki.sh
View on GitHub#!/usr/bin/env bash
set -euo pipefail
slug=""
title=""
flavor="research"
scope="global"
root=""
usage() {
cat <<EOF
Usage: init_wiki.sh <slug> --title "<title>" [--flavor <flavor>] [--scope global|project] [--root <path>]
Flavors: research paper domain product person organization project codebase incident
EOF
}
if [ $# -lt 1 ]; then usage; exit 1; fi
slug="$1"; shift
if ! [[ "$slug" =~ ^[a-z0-9][a-z0-9-]*$ ]]; then
echo "Invalid slug: lowercase letters, digits, hyphens only (must start alphanumeric)" >&2
exit 1
fi
while [ $# -gt 0 ]; do
case "$1" in
--title) title="$2"; shift 2 ;;
--flavor) flavor="$2"; shift 2 ;;
--scope) scope="$2"; shift 2 ;;
--root) root="$2"; shift 2 ;;
-h|--help) usage; exit 0 ;;
*) echo "Unknown arg: $1" >&2; usage; exit 1 ;;
esac
done
if [ -z "$title" ]; then echo "--title required" >&2; exit 1; fi
case "$scope" in
global|project) ;;
*) echo "Invalid --scope: $scope (expected global|project)" >&2; exit 1 ;;
esac
case "$flavor" in
research|paper|domain|product|person|organization|project|codebase|incident) ;;
*) echo "Invalid --flavor: $flavor" >&2; exit 1 ;;
esac
if [ -z "$root" ]; then
if [ "$scope" = "project" ]; then
project_dir="${CLAUDE_PROJECT_DIR:-$PWD}"
root="$project_dir/.claude/wikis"
else
root="${WIKI_ROOT:-$HOME/.pro-workflow/wikis}"
fi
fi
dest="$root/$slug"
if [ -d "$dest" ]; then
echo "Wiki already exists: $dest" >&2
exit 2
fi
mkdir -p "$dest"/{raw,wiki,derived,prompts,logs}
case "$flavor" in
paper) mkdir -p "$dest/wiki/sections" ;;
domain|research) mkdir -p "$dest/wiki"/{concepts,papers,questions} ;;
product) mkdir -p "$dest/wiki"/{features,decisions,issues} ;;
person|organization) mkdir -p "$dest/wiki"/{publications,timelines} ;;
project) mkdir -p "$dest/wiki"/{decisions,runbooks,questions} ;;
codebase) mkdir -p "$dest/wiki"/{modules,symbols,decisions} ;;
incident) mkdir -p "$dest/wiki"/{timeline,signals,fixes} ;;
esac
skill_dir="$(cd "$(dirname "$0")"/.. && pwd)"
templates="$skill_dir/templates"
render() {
local src="$1" dst="$2"
sed -e "s|{{SLUG}}|$slug|g" \
-e "s|{{TITLE}}|$title|g" \
-e "s|{{FLAVOR}}|$flavor|g" \
-e "s|{{SCOPE}}|$scope|g" \
-e "s|{{TODAY}}|$(date -u +%Y-%m-%d)|g" \
"$src" > "$dst"
}
render "$templates/wiki.config.md" "$dest/wiki.config.md"
render "$templates/index.md" "$dest/wiki/index.md"
render "$templates/sources.md" "$dest/sources.md"
render "$templates/maintenance-log.md" "$dest/logs/maintenance-log.md"
for p in compile-index compile-source-page compile-concept-page query-and-file lint-wiki; do
if [ -f "$templates/prompts/$p.md" ]; then
render "$templates/prompts/$p.md" "$dest/prompts/$p.md"
fi
done
echo "$dest"
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| Agent Cost Reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| Agent Cost Reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |