Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/ethics03/kgskill/kg-initgit clone --depth 1 https://github.com/Ethics03/kgskillWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00012 | $0.00674 |
| Opus 5 | $0.00006 | $0.00337 |
| Sonnet 5 | $0.00002 | $0.00135 |
| Haiku 4.5 | $0.00001 | $0.00067 |
Grade A, and why
kg-init scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Initialize a new Knowledge Graph at the path provided. If no path was given, check MYKG_PATH env var, then ~/.config/mykg/config, then default to ~/MyKG.
Steps
1. Resolve target path
Use the first available source:
- Argument passed to this command
$MYKG_PATHenvironment variable- Contents of
~/.config/mykg/config - Default:
~/MyKG
2. Check if already exists
If the target directory contains an index.md, tell the user the KG already exists and suggest /kg-setup to reconfigure. Stop.
3. Create directory structure
Run:
mkdir -p <path>/raw/{articles,papers,transcripts,notes}
mkdir -p <path>/wiki/{entities,concepts,synthesis,comparisons}
4. Create core files
Write these four files at the target path:
index.md:
# Index
Catalog of all wiki pages. The LLM reads this first to find relevant content.
## Entities
Pages for specific entities: people, organizations, tools, places.
| Page | Summary | Sources |
|------|---------|---------|
## Concepts
Pages for ideas, topics, themes, frameworks.
| Page | Summary | Sources |
|------|---------|---------|
## Synthesis
High-level summaries and overviews.
| Page | Summary | Sources |
|------|---------|---------|
## Comparisons
Side-by-side analyses and trade-offs.
| Page | Summary | Sources |
|------|---------|---------|
## Source Summaries
| Page | Source | Date |
|------|--------|------|
## Projects
| Project | Description |
|---------|-------------|
log.md:
# Log
Chronological record of changes. Append-only.
Each entry: `## [YYYY-MM-DD] <type> | <title>`
Types: `ingest`, `query`, `lint`, `project`
---
## [<today's date>] project | Initialize KG
Created Knowledge Graph with initial structure.
- Added: [[index]]
- Added: [[log]]
- Added: [[Active]]
- Added: [[AGENTS]]
Active.md:
# Active
Current focus items and priorities.
## Focus Areas
| Priority | Area | Status | Next Step |
|----------|------|--------|-----------|
## Questions to Investigate
-
## Sources to Find
-
## Completed
| Date | Item | Notes |
|------|------|-------|
AGENTS.md: copy the full content from the AGENTS.md template in the kgskills repo at templates/kg-init/AGENTS.md if it exists, otherwise write a minimal version with structure, page types, and workflow instructions.
5. Save config
mkdir -p ~/.config/mykg
echo "<path>" > ~/.config/mykg/config
6. Report success
Tell the user the KG was created, show the path and structure, and suggest next steps: /kg-ingest <file>, /kg-project <name>.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 136 lines · 12 tokens per session scan A f2b32355f289
kg-init is a command published in the GitHub repository Ethics03/kgskill (3 stars, last pushed 4mo ago), licensed MIT. It adds 12 tokens to every session and 674 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
code-review
The /plannotator-review slash command for reviewing local changes, comparing branches, or reviewing GitHub pull requests.
plan-review
The core plan review flow across Claude Code, Codex, and other supported agent hosts.
plannotator-last
Annotate the last rendered assistant message.
plannotator-review
Open interactive code review for current changes or a PR URL.
wiki-query
Query the LLM Wiki and synthesize an answer.
docs-builder
Reorg a docs corpus, split an oversized doc, search it, keep pages current, index them.