
Keine Manage
- 1 installs
- 17 repo stars
- Updated March 22, 2026
- duskmoon314/keine
Manages a markdown knowledge base: creating, editing, tagging, linking, and indexing entries with a required document format.
About
This skill governs adding, ingesting, finding, linking, and tagging entries in a git-backed markdown knowledge base. A developer uses it to keep knowledge entries and tag indexes consistently structured.
- Enforces knowledge-entry and tag-index document formats
- Maintains a tag index via a maintenance script
Keine Manage by the numbers
- 1 all-time installs (skills.sh)
- Ranked #1,365 of 1,879 Documentation skills by installs in the Skillselion catalog
- Data as of Jul 8, 2026 (Skillselion catalog sync)
npx skills add https://github.com/duskmoon314/keine --skill keine-manageAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1 |
|---|---|
| repo stars | ★ 17 |
| Last updated | March 22, 2026 |
| Repository | duskmoon314/keine ↗ |
What it does
Manages a markdown knowledge base: creating, editing, tagging, linking, and indexing entries with a required document format.
Files
Keine Knowledge Base Management
Assets
references
|-- TEMPLATE_ENTRY.md
|-- TEMPLATE_TAG.md
`-- TEMPLATE_TOPIC.md
scripts
`-- maintain_tags.py — maintain tag indexDocument Format
Knowledge Entry (docs/<yyyy-mm-dd-slug>.md)
---
title: "Human-readable title"
description: "One sentence for use in tag indexes"
tags: ["tag1", "tag2"]
source: "URL, DOI, or other reference" # required — link to the original
source_type: "url | pdf | book | note" # required — omit only for original writing
---Body structure:
- H1 = title (exactly one)
- ## Summary — 2-5 sentences
- ## Content — main knowledge, use H3+ for subsections
- ## Related — relative links to other docs, tags, or maps
Tag Index (docs/tags/<slug>.md)
Auto-maintained. Do not edit manually. Run scripts/maintain_tags.py
Topic Map (docs/maps/<slug>.md)
---
title: "Topic Area Name"
tags: [tag-a, tag-b]
---Body: structured overview, mindmap, or learning path linking to entries.
Workflow
For the task at hand, use the appropriate sub-skill:
| Task | Skill |
|---|---|
| Create or edit a knowledge entry | keine-update-entries |
| Create or edit a topic map | keine-update-maps |
| Create a deep research report | keine-research |
Finding entries
- By keyword:
grep -ri "term" docs/ - By tag: read
docs/tags/<tag>.md - By topic: check
docs/maps/for a topic map
Knowledge entry template
Summary
2-5 sentences overview.
Content
Main knowledge content.
Related
- Related title
Tag: template
- Title - one-line description
Topic Template
Overview
Brief introduction to this topic area.
Structure
Sub-topic A
- Brief explanation
- Relevant Doc
Learning Path (Optional)
1. Start with: Doc A 2. Then read: Doc B
"""
Build docs/tags index files from document frontmatter
"""
from collections import defaultdict
from datetime import datetime
from pathlib import Path
from typing import Dict, List, Set, Tuple
import frontmatter
DOCS_DIR = Path("docs")
TAGS_DIR = DOCS_DIR / "tags"
def check_date_str(stem: str) -> bool:
try:
datetime.strptime(stem, "%Y-%m-%d")
return True
except ValueError:
return False
def scan_docs() -> Dict[str, List[Tuple[str, str, str, str]]]:
"""
Scan all knowledge entries, Returns {tag: [(date, title, filename, description)]}
"""
tag_map: Dict[str, List[Tuple[str, str, str, str]]] = defaultdict(list)
for md_file in sorted(DOCS_DIR.glob("*.md")):
# Only files starting with "yyyy-mm-dd" are valid entry
# If not valid, skip
date_prefix = md_file.stem[:10]
if not check_date_str(date_prefix):
continue
with md_file.open() as f:
post = frontmatter.load(f)
title = post.get("title", md_file.stem)
description = post.get("description", "")
tags = post.get("tags", [])
# Ensure tags is always a list
if not isinstance(tags, list):
tags = [tags] if tags else []
for tag in tags:
tag_map[str(tag)].append(
(date_prefix, str(title), md_file.name, str(description))
)
return tag_map
def write_tag_file(tag: str, entries: List[Tuple[str, str, str, str]]) -> Path:
"""
Write a tag's index file
"""
TAGS_DIR.mkdir(parents=True, exist_ok=True)
entries.sort(key=lambda e: e[0], reverse=True)
def format_entry(title: str, filename: str, description: str) -> str:
line = f"- [{title}](../{filename})"
if description:
line += f" — {description}"
return line
with open(TAGS_DIR / f"{tag}.md", "w") as f:
f.writelines(
[
"---\n",
f"tag: {tag}\n",
"---\n\n",
"\n".join(
format_entry(title, filename, desc)
for _, title, filename, desc in entries
),
]
)
return TAGS_DIR / f"{tag}.md"
def remove_stale_tags(active_tags: Set[str]):
"""
Remove stale tag files
"""
if not TAGS_DIR.exists():
return
for tag_file in TAGS_DIR.glob("*.md"):
tag = tag_file.stem
if tag not in active_tags:
tag_file.unlink()
print(f"Removed stale tag file: {tag_file}")
def main():
tag_map = scan_docs()
print(f"Found {len(tag_map)} tags")
for tag, entries in sorted(tag_map.items()):
path = write_tag_file(tag, entries)
print(f"{path} ({len(entries)} entries)")
remove_stale_tags(set(tag_map.keys()))
print("Done")
if __name__ == "__main__":
main()