Skip to content

jkroepke/okf-crossplane-v2 / .agents/skills/okf-open-knowledge-format

okf-open-knowledge-format

Verified

Create, validate, and enrich Open Knowledge Format (OKF) bundles — the open spec for representing organizational knowledge as markdown files with YAML frontmatter. Use when the user mentions 'OKF', 'Open Knowledge Format', 'knowledge bundle', 'OKF bundle', 'create a knowledge base for agents', 'validate OKF', 'convert to OKF', 'enrich knowledge docs', 'agent-readable knowledge', 'LLM wiki', 'knowledge catalog', 'kcmd', or wants to structure knowledge as markdown files for AI agent consumption. Also use when the user has a directory of markdown files and wants to make them interoperable or conformant with the OKF standard. Even for simple requests like 'make this folder OKF conformant' — the skill has critical structural rules the agent needs.

FileKindSize
SKILL.mdskill md15.2 KB
references/conversion.mdmarkdown4.3 KB
references/examples.mdmarkdown6.9 KB
references/spec-v02.mdmarkdown36.7 KB
scripts/validate.shexecutablescript3.0 KB

scripts/validate.sh

View on GitHub
#!/usr/bin/env bash
# OKF Bundle Validator v0.2
# Usage: validate.sh <bundle-path>
# Checks the three core conformance rules from OKF v0.2:
#   E1: All non-reserved .md files have YAML frontmatter
#   E2: All frontmatter has non-empty 'type' field
#   E3: Reserved files follow structure rules

set -euo pipefail

BUNDLE="${1:-.}"
ERRORS=0
WARNINGS=0
TOTAL=0

RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
NC='\033[0m'

if [ ! -d "$BUNDLE" ]; then
  echo -e "${RED}Error: '$BUNDLE' is not a directory${NC}"
  exit 1
fi

echo "Validating OKF bundle: $BUNDLE"
echo "---"

# Find all .md files
while IFS= read -r -d '' file; do
  TOTAL=$((TOTAL + 1))
  relative="${file#$BUNDLE/}"
  basename=$(basename "$file")

  # Skip reserved files (validate separately)
  if [[ "$basename" == "index.md" || "$basename" == "log.md" ]]; then
    # E3: Check reserved file structure
    if [[ "$basename" == "index.md" ]]; then
      # index.md should NOT have frontmatter (except bundle root may have okf_version)
      if head -1 "$file" | grep -q "^---$"; then
        # Allow only if it's bundle root and contains okf_version
        if [[ "$relative" != "index.md" ]]; then
          echo -e "${RED}E3: $relative — index.md should not have frontmatter${NC}"
          ERRORS=$((ERRORS + 1))
        fi
      fi
    fi
    if [[ "$basename" == "log.md" ]]; then
      # log.md should have date headings in YYYY-MM-DD format
      if ! grep -qE "^## [0-9]{4}-[0-9]{2}-[0-9]{2}" "$file" 2>/dev/null; then
        if [ -s "$file" ]; then
          echo -e "${YELLOW}W: $relative — log.md has no ISO 8601 date headings${NC}"
          WARNINGS=$((WARNINGS + 1))
        fi
      fi
    fi
    continue
  fi

  # E1: Check for YAML frontmatter
  if ! head -1 "$file" | grep -q "^---$"; then
    echo -e "${RED}E1: $relative — no YAML frontmatter${NC}"
    ERRORS=$((ERRORS + 1))
    continue
  fi

  # Extract frontmatter (between first --- and second ---)
  frontmatter=$(sed -n '2,/^---$/p' "$file" | sed '$d')

  # E2: Check for non-empty type field
  type_value=$(echo "$frontmatter" | grep -E "^type:" | sed 's/^type:\s*//' | tr -d '"' | tr -d "'" | xargs)
  if [ -z "$type_value" ]; then
    echo -e "${RED}E2: $relative — missing or empty 'type' field${NC}"
    ERRORS=$((ERRORS + 1))
    continue
  fi

  # Warnings for recommended fields
  if ! echo "$frontmatter" | grep -qE "^title:"; then
    echo -e "${YELLOW}W1: $relative — missing recommended 'title' field${NC}"
    WARNINGS=$((WARNINGS + 1))
  fi
  if ! echo "$frontmatter" | grep -qE "^description:"; then
    echo -e "${YELLOW}W1: $relative — missing recommended 'description' field${NC}"
    WARNINGS=$((WARNINGS + 1))
  fi

done < <(find "$BUNDLE" -name "*.md" -type f -print0 | sort -z)

# Summary
echo "---"
echo "Files scanned: $TOTAL"
if [ $ERRORS -eq 0 ]; then
  echo -e "${GREEN}✅ Bundle is OKF v0.2 conformant${NC}"
else
  echo -e "${RED}❌ $ERRORS error(s) — bundle is NOT conformant${NC}"
fi
if [ $WARNINGS -gt 0 ]; then
  echo -e "${YELLOW}⚠  $WARNINGS warning(s)${NC}"
fi

exit $ERRORS
rea-changelog-updatemorluto/reaPrepare or rewrite REA release changelogs and GitHub release notes from pinned Git history, with verified contributor thanks and Release Please synchronization.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
academy-guideanthropics/skillsStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
claude-apianthropics/skillsReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file).Stars: 198kUpdated Claude CodeCodexUnverifiedInstall
doc-coauthoringanthropics/skillsGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.Stars: 198kUpdated Claude CodeCodexVerifiedInstall