Knowledge Layers logo

Knowledge Layers

Community
haowjy
knowledge-layers

Use when deciding where knowledge goes or reading/writing durable docs: AGENTS.md, .context/, KB, docs/, and work directories.

Overview

Publisherhaowjy
Repositorycreative-writing-skills
Skill nameknowledge-layers
Stars
511
Forks
69
Bundled files
1
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by haowjy on GitHub. Read the source before you install it.

Installation

Install the Knowledge Layers AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/haowjy/creative-writing-skills/tree/main/cw/skills/knowledge-layers
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/haowjy/creative-writing-skills.git /tmp/creative-writing-skills
mkdir -p .claude/skills
cp -r /tmp/creative-writing-skills/cw/skills/knowledge-layers .claude/skills/knowledge-layers
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Knowledge Layers in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Knowledge Layers on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Knowledge Layers is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Knowledge Layers

Load /qi-layer when writing or editing AGENTS.md or .context/ files: it owns the craft (four principles, contents guidelines, what doesn't belong). Load /information-hierarchy if not already loaded for disclosure tiers. Load /llm-writing if not already loaded.

The Five Layers

LayerWhat it holdsWhen to use it
AGENTS.mdIntent and mental model for a directoryFirst thing agents read on entry; what to understand before working here
.context/Contracts, architecture, rationale (CONTEXT.md); deferred work (TODO, FUTURE)Reference depth and tracked deferrals, co-located with the code they describe
KBCross-cutting decisions, domain concepts, patternsSpans directories; outlives sessions; no single directory owns it
docs/User-facing documentationDifferent audience, different update cadence
Work directoryTemporary design decisions and scratchNot colocated with durable content; scoped to an active work item

Placement Rules

If it's intent/mental-model for a directory → AGENTS.md. If it's directory-scoped depth an agent looks up → .context/. If it's deferred work scoped to this directory → .context/TODO (must-do) or .context/FUTURE (nice-to-have). Flat markdown lists — each entry names the affected path and concrete follow-up. Cross-cutting items or items needing external visibility get filed in the project's issue tracker instead. If it's big picture — cross-cutting decisions, domain concepts, higher-level system architecture → KB. If it's for end users → docs/. If it's a temporary work artifact → work directory.

When in doubt, colocate. Knowledge that depends on one subsystem belongs in that subsystem's AGENTS.md or .context/ even when it reads like a concept; the KB stays code-agnostic, holding what survives implementation change. Knowledge that lives far from what it describes rots faster: changes to the code don't trigger awareness that a distant doc needs updating.

Current Truth Over History

Every durable layer — AGENTS.md, .context/, KB, docs/ — holds the best current understanding; work directories may keep intermediate reasoning while their work item is active. When durable content is superseded, delete it or (for KB pages) move it to archive/ (.kgignore'd, excluded from the knowledge graph). Live content never references archived content. Pages read as current truth, never narrate their own evolution.

Deletion needs no replacement. A page whose subject is gone, or that describes behavior the system no longer has, gets deleted on sight — even with nothing new to write in its place. Stale knowledge is worse than a gap: agents load it and reason from it. Deletion is the content-truth owner's call; structural roles flag instead.

Git history is the archive. Commit untracked files before deleting them so the removal lands in history, and say what was removed and why in the commit message. Deletion is cheap because nothing tracked is ever truly lost.

Truth is anchored per layer. AGENTS.md and .context/ describe the checkout that contains them: update them in the same branch as the code change and let the merge carry both — with parallel PRs in flight, each branch documents itself. The KB is code-agnostic: it records the current settled intent — what the system should be — and a settled decision is KB truth the moment it's made, merged or not. Unsettled intent isn't KB material; it stays in the work directory. docs/ describes shipped behavior.

Decision records are the exception: preserve superseded decisions in place when they explain why the system changed. Mark the old decision as superseded and link to the replacement.

KB Conventions

Structure

The KB is a directory tree like any other: it carries its own AGENTS.md and .context/ pair, written per /qi-layer — intent in AGENTS.md, governance depth (writing conventions, structure, validation) in .context/. Read the KB's own AGENTS.md before writing. Treat this skill as the cross-project default; the local KB guide wins for that KB. See resources/bootstrap.md for a suggested starting layout.

Wiki Page Conventions

Follow /information-hierarchy. One concept per document; name files by what they describe (token-validation.md), not when (auth-redesign-notes.md). Cross-reference instead of re-explaining. Load /shared-dao for vocabulary methodology. Use mermaid for anything spatial; capture what code can't easily tell you.

Operations

Ingest: new information enters the KB. Read the source, extract key knowledge, write or update wiki pages, and update indexes/cross-links touched by the change.

Maintain: keep the wiki current per Current Truth Over History above.

Lint: health-check the wiki. Look for contradictions, stale claims, orphan pages, missing cross-references. Use /md-validation for link checking and diagram validation.

Flag content needing human attention with > [!FLAG] **Needs human review**.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Knowledge Layers AI skill do?

Use when deciding where knowledge goes or reading/writing durable docs: AGENTS.md, .context/, KB, docs/, and work directories.

Why use Knowledge Layers on TypingMind?

Because you install it once and use it with any model. Knowledge Layers is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Knowledge Layers in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/haowjy/creative-writing-skills/tree/main/cw/skills/knowledge-layers. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Knowledge Layers?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Knowledge Layers?

As many as you like. As long as a model supports skills, you can use Knowledge Layers with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Knowledge Layers AI skill free?

Yes. It is published on GitHub by haowjy under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇