Agent SkillsAgent Skills
Spectaculous-Code

topic-manager

@Spectaculous-Code/topic-manager
Spectaculous-Code
0
0 forks
Updated 4/12/2026
View on GitHub

Expert assistant for managing biblical topics in the KR92 Bible Voice project. Use when (1) creating/editing topics and their Finnish translations, (2) managing topic relations (related, opposite, broader, narrower), (3) validating Finnish translations and pronunciations with Voikko/Omorfi, (4) reviewing topics marked with qa_status='unchecked', (5) bulk updating topic translations, (6) managing topic aliases and synonyms, or (7) fixing incorrectly translated Finnish topic names.

Installation

$npx agent-skills-cli install @Spectaculous-Code/topic-manager
Claude Code
Cursor
Copilot
Codex
Antigravity

Details

Path.claude/skills/topic-manager/SKILL.md
Branchmain
Scoped Name@Spectaculous-Code/topic-manager

Usage

After installing, this skill will be available to your AI coding assistant.

Verify installation:

npx agent-skills-cli list

Skill Instructions


name: topic-manager description: Expert assistant for managing biblical topics in the KR92 Bible Voice project. Use when (1) creating/editing topics and their Finnish translations, (2) managing topic relations (related, opposite, broader, narrower), (3) validating Finnish translations and pronunciations with Voikko/Omorfi, (4) reviewing topics marked with qa_status='unchecked', (5) bulk updating topic translations, (6) managing topic aliases and synonyms, or (7) fixing incorrectly translated Finnish topic names.

Topic Manager

Manage biblical topics: names, translations, relations, aliases, and QA validation.

Quick Reference

Read these context files first:

  • Docs/context/db-schema-short.md - Table structures
  • apps/raamattu-nyt/src/lib/topicEditorUtils.ts - TypeScript API utilities

Database Schema

topical_topics (bible_schema)

id UUID PRIMARY KEY
name_en TEXT NOT NULL          -- English topic name
name_fi TEXT                   -- Finnish translation
slug TEXT UNIQUE NOT NULL      -- URL slug (English)
slug_fi TEXT                   -- Finnish URL slug
parent_id UUID                 -- Broader topic (hierarchy)
qa_status qa_status_enum       -- 'unchecked', 'ok', 'needs_review'
is_core BOOLEAN                -- Important/featured topic
is_biblical BOOLEAN            -- Biblical vs modern term
semantic_field TEXT            -- Semantic category
semantic_field_fi TEXT         -- Finnish semantic field
semantic_field_en TEXT         -- English semantic field
usage_context TEXT             -- How term is used
usage_context_fi TEXT          -- Finnish context
usage_context_en TEXT          -- English context
nuance_fi TEXT                 -- Finnish nuance
nuance_en TEXT                 -- English nuance

topical_relations (bible_schema)

source_topic_id UUID           -- Source topic
target_topic_id UUID           -- Target topic
relation_type TEXT             -- 'related', 'opposite', 'synonym'
is_bidirectional BOOLEAN       -- TRUE for opposite/synonym

topical_aliases (bible_schema)

topic_id UUID
alias TEXT                     -- Display text
alias_norm TEXT                -- Normalized (lowercase, no diacritics)
lang TEXT                      -- 'fi' or 'en'
alias_type TEXT                -- 'synonym', 'abbrev', 'variant', 'old_term', 'misspelling'
qa_status qa_status_enum       -- 'unchecked', 'ok', 'needs_review'
source TEXT                    -- 'manual', 'ai', 'import'

topical_references (bible_schema)

topic_id UUID
osis_start TEXT                -- Start verse (e.g., 'Gen.1.1')
osis_end TEXT                  -- End verse (for ranges)
relevance_score INTEGER        -- 1-5 relevance

Common Operations

Find Topics Needing Review

-- Topics with unchecked qa_status
SELECT id, name_en, name_fi, qa_status
FROM bible_schema.topical_topics
WHERE qa_status = 'unchecked'
ORDER BY is_core DESC, name_en
LIMIT 50;

-- Topics without Finnish translation
SELECT id, name_en, slug
FROM bible_schema.topical_topics
WHERE name_fi IS NULL
ORDER BY is_core DESC, name_en;

Update Topic Translation

UPDATE bible_schema.topical_topics
SET
  name_fi = 'suomenkielinen nimi',
  slug_fi = 'suomenkielinen-slug',
  qa_status = 'ok'
WHERE id = 'uuid-here';

Create Topic Relation

-- Related topic (one-way)
INSERT INTO bible_schema.topical_relations
  (source_topic_id, target_topic_id, relation_type, is_bidirectional)
VALUES ('source-uuid', 'target-uuid', 'related', false);

-- Opposite (bidirectional)
INSERT INTO bible_schema.topical_relations
  (source_topic_id, target_topic_id, relation_type, is_bidirectional)
VALUES ('source-uuid', 'target-uuid', 'opposite', true);

Set Topic Hierarchy

-- Set parent (broader term)
UPDATE bible_schema.topical_topics
SET parent_id = (SELECT id FROM bible_schema.topical_topics WHERE slug = 'parent-slug')
WHERE slug = 'child-slug';

Add Topic Alias

INSERT INTO bible_schema.topical_aliases
  (topic_id, alias, alias_norm, lang, alias_type, source, qa_status)
VALUES (
  'topic-uuid',
  'Vaihtoehtoinen nimi',
  'vaihtoehtoinen nimi',
  'fi',
  'synonym',
  'manual',
  'ok'
);

Finnish Translation Validation

QA Status Values

  • unchecked - Not reviewed yet (default for imports)
  • ok - Verified correct
  • needs_review - Flagged for human review

Common Finnish Issues

  1. Wrong translation - Check with Voikko/Omorfi
  2. Missing diacritics - รค, รถ must be correct
  3. Compound words - Finnish compounds may be written together
  4. Capitalization - Finnish doesn't capitalize most terms

Voikko/Omorfi Integration

For Finnish morphological validation, use these tools:

Option 1: UralicNLP (Python)

# pip install uralicnlp
from uralicnlp import uralicApi

# Check if word is valid Finnish
def is_valid_finnish(word):
    analyses = uralicApi.analyze(word, "fin")
    return len(analyses) > 0

# Get lemma (base form)
def get_lemma(word):
    analyses = uralicApi.analyze(word, "fin")
    if analyses:
        return analyses[0][0]  # First analysis, lemma
    return word

Option 2: libvoikko (Python)

# pip install libvoikko
import libvoikko

voikko = libvoikko.Voikko("fi")

def is_valid_finnish(word):
    return voikko.spell(word)

def analyze_word(word):
    return voikko.analyze(word)

def get_suggestions(word):
    if not voikko.spell(word):
        return voikko.suggest(word)
    return []

Option 3: API-based (no local install)

// Use Edge Function to call external API
async function validateFinnish(word: string) {
  const response = await fetch(
    `https://api.kielitoimistonsanakirja.fi/api/search?word=${encodeURIComponent(word)}`
  );
  return response.ok;
}

Validation Script

See scripts/validate_finnish.py for batch validation of topic translations.

Bulk Operations

Export for Translation

-- Export untranslated topics to CSV format
SELECT
  slug,
  name_en,
  COALESCE(name_fi, '') as name_fi,
  COALESCE(slug_fi, '') as slug_fi,
  is_core
FROM bible_schema.topical_topics
WHERE name_fi IS NULL OR qa_status = 'unchecked'
ORDER BY is_core DESC, name_en;

Import Translations

-- Create temp table
CREATE TEMP TABLE topic_import (
  slug TEXT,
  name_fi TEXT,
  slug_fi TEXT
);

-- Import (via \copy or Supabase)
-- Update topics
UPDATE bible_schema.topical_topics t
SET
  name_fi = i.name_fi,
  slug_fi = i.slug_fi,
  qa_status = 'ok'
FROM topic_import i
WHERE t.slug = i.slug;

Mark Topics as Reviewed

-- Mark single topic
UPDATE bible_schema.topical_topics
SET qa_status = 'ok'
WHERE id = 'uuid';

-- Batch mark by criteria
UPDATE bible_schema.topical_topics
SET qa_status = 'ok'
WHERE qa_status = 'unchecked'
AND name_fi IS NOT NULL
AND LENGTH(name_fi) > 2;

Relation Types

TypeDirectionUse Case
relatedOne-wayTopic A relates to B
oppositeBidirectionalAntonyms (e.g., good โ†” evil)
synonymBidirectionalSame concept, different name
broaderUses parent_idHierarchy (parent topic)
narrowerReverse of parent_idHierarchy (child topics)

QA Workflow

  1. Query unchecked topics - Start with high-value (is_core=true)
  2. Validate Finnish - Use Voikko/UralicNLP to check spelling
  3. Review translation - Ensure theological accuracy
  4. Check relations - Verify related/opposite links make sense
  5. Mark as reviewed - Set qa_status='ok'

Integration with Other Skills

TaskDelegate To
Schema changessupabase-migration-writer
Admin UI changesadmin-panel-builder
Bulk CSV operationstranslation-sync
AI-assisted translationsai-prompt-manager
Finding topic codecode-wizard

TypeScript API

Key functions in apps/raamattu-nyt/src/lib/topicEditorUtils.ts:

  • fetchTopicById(id) - Get topic details
  • updateTopic(id, updates, token) - Update topic
  • createAlias(topicId, alias, lang, type, token) - Add alias
  • createRelation(source, target, type, token) - Create relation
  • setTopicParent(topicId, parentId, token) - Set hierarchy
  • searchSimilarTopics(query, excludeId) - Find duplicates
  • mergeTopicAsSynonym(primary, duplicate, token) - Merge topics

More by Spectaculous-Code

View all
core-ux-detective
0

Discover, define and canonicalize the core user tasks and user paths of the application. Use when (1) mapping what users can actually do in the app, (2) defining canonical user journeys/flows, (3) creating the AI-readable user model (core-user-model.json), (4) reviewing whether a new feature introduces a new core path, (5) other skills (help, marketing, onboarding) need authoritative task/path definitions to consume. Triggers: "core tasks", "user paths", "user journeys", "UX model", "what can users do", "core flows", "user model", "canonical tasks", file types: core-user-model.json.

landing-page-architect
0

Product marketing and landing page architect for Raamattu Nyt. Generates landing page copy, feature page copy, and CTA suggestions based on the canonical user model. Translates user paths into benefit narratives and core tasks into user value propositions. Use when (1) creating or updating the main landing page, (2) writing feature page copy, (3) generating marketing messaging for app features, (4) crafting CTAs, (5) translating technical features into user benefits, (6) planning marketing page structure. Triggers: "landing page", "marketing copy", "feature page", "CTA", "value proposition", "markkinointi", "laskeutumissivu", "ominaisuussivu", "benefits copy", "marketing messaging".

code-wizard
0

Codebase exploration and location finder for the Raamattu Nyt monorepo. Use when finding where specific functionality is implemented, locating constants/tokens/config values, discovering file patterns, or answering "where is X coded?" questions. Helps other skills and agents locate code quickly.

seo-ptimizer
0

Search Engine Optimization and AI Search Optimization (GEO) specialist. Use when: (1) optimizing for traditional search (Google, Bing), (2) optimizing for AI search engines (ChatGPT, Perplexity, Google AI Overviews, Claude), (3) implementing schema markup for AI citation, (4) improving Core Web Vitals (LCP, INP, CLS), (5) creating citation-worthy content structure, (6) zero-click optimization, (7) E-E-A-T signal implementation. Expert in GEO (Generative Engine Optimization), structured data, and AI-readable content.