web-abin/OpenGeno / skills/geno-init
geno-init
UnverifiedInitialize an OpenGeno feature tree for a project. Asks the user to pick a documentation language (English or Chinese, default English), a drift mode, and a generation mode (stub-only by default, or one-shot full docs that fills every L3 section now). Scans the codebase, proposes a module breakdown, generates the L1 root index, L2 module indexes and L3 feature docs in the chosen language, writes .feat-tree.json, and injects the OpenGeno workflow rules into CLAUDE.md (and AGENTS.md if present). Use when starting OpenGeno on a new project. Run once per project.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 11.6 KB |
| reference.md | markdown | 10.1 KB |
| scripts/drift-check.shexecutable | script | 2.8 KB |
| scripts/post-edit-warn.shexecutable | script | 1.9 KB |
| scripts/stop-check.shexecutable | script | 2.8 KB |
| templates/claude-md-injection.md | markdown | 3.7 KB |
| templates/claude-md-injection.zh.md | markdown | 3.6 KB |
| templates/feat-tree.json | config | 93 B |
| templates/feature-logic.md | markdown | 1.2 KB |
| templates/feature-logic.zh.md | markdown | 1.1 KB |
| templates/feature-ui.md | markdown | 2.1 KB |
| templates/feature-ui.zh.md | markdown | 2.0 KB |
| templates/module-index.md | markdown | 1.1 KB |
| templates/module-index.zh.md | markdown | 1011 B |
| templates/root-index.md | markdown | 1.4 KB |
| templates/root-index.zh.md | markdown | 1.3 KB |
scripts/drift-check.sh
View on GitHub#!/usr/bin/env bash
# OpenGeno drift-check
#
# Walks every L3 feature doc under feat-tree/, compares last_synced_commit
# to git HEAD for each code: path, and prints a structured report.
#
# Exit codes:
# 0 — no drift / no tree
# 1 — drift found (used by Stop hook in block mode)
#
# Output format (one line per drift entry):
# DRIFT <doc-path> <code-path> <commit-count>
# STUB <doc-path>
# BROKEN <doc-path> <missing-code-path>
set -u
# Resolve tree path from .feat-tree.json or default
TREE_PATH="feat-tree"
if [ -f .feat-tree.json ]; then
# Use grep instead of jq to avoid dependency
CONFIGURED=$(grep -o '"tree_path"[[:space:]]*:[[:space:]]*"[^"]*"' .feat-tree.json 2>/dev/null \
| sed 's/.*"tree_path"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/')
[ -n "$CONFIGURED" ] && TREE_PATH="$CONFIGURED"
fi
# No tree → silent success (project may not be initialized yet)
if [ ! -d "$TREE_PATH" ]; then
exit 0
fi
# Must be in a git repo for diffing to work
if ! git rev-parse --git-dir >/dev/null 2>&1; then
echo "opengeno-drift: not a git repo, skipping" >&2
exit 0
fi
DRIFT_FOUND=0
# Find all L3 feature docs (frontmatter has type: og-feature)
while IFS= read -r DOC; do
# Extract frontmatter (lines between first two --- markers)
FM=$(awk '/^---$/{c++; next} c==1' "$DOC" 2>/dev/null)
# Confirm this is a feature doc
echo "$FM" | grep -q "^type:[[:space:]]*og-feature" || continue
# Extract last_synced_commit
LSC=$(echo "$FM" | grep "^last_synced_commit:" | head -1 \
| sed 's/^last_synced_commit:[[:space:]]*//' \
| sed 's/^"//;s/"$//' \
| tr -d "'" \
| tr -d ' ')
# Extract code: list (lines under "code:" until next top-level key)
CODE_PATHS=$(echo "$FM" | awk '
/^code:[[:space:]]*$/ { in_code=1; next }
in_code && /^[[:space:]]*-[[:space:]]+/ {
sub(/^[[:space:]]*-[[:space:]]+/, "")
sub(/[[:space:]]+$/, "")
print
next
}
in_code && /^[^[:space:]]/ { in_code=0 }
')
# Stub: no SHA
if [ -z "$LSC" ]; then
echo "STUB $DOC"
DRIFT_FOUND=1
continue
fi
# Verify SHA exists in repo (could be from before history was rewritten)
if ! git cat-file -e "$LSC^{commit}" 2>/dev/null; then
echo "STALE_SHA $DOC $LSC"
DRIFT_FOUND=1
continue
fi
# Per code path, count commits since LSC
while IFS= read -r CODE_PATH; do
[ -z "$CODE_PATH" ] && continue
if [ ! -e "$CODE_PATH" ]; then
echo "BROKEN $DOC $CODE_PATH"
DRIFT_FOUND=1
continue
fi
COMMIT_COUNT=$(git log --oneline "$LSC..HEAD" -- "$CODE_PATH" 2>/dev/null | wc -l | tr -d ' ')
if [ "$COMMIT_COUNT" -gt 0 ]; then
echo "DRIFT $DOC $CODE_PATH $COMMIT_COUNT"
DRIFT_FOUND=1
fi
done <<EOF
$CODE_PATHS
EOF
done < <(find "$TREE_PATH" -type f -name "*.md" 2>/dev/null)
if [ "$DRIFT_FOUND" -eq 1 ]; then
exit 1
fi
exit 0
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 471k | Updated | Claude CodeCodex | Verified | Install |
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |
| 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: 198k | Updated | Claude CodeCodex | Unverified | Install |
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |