Qi Layer logo

Qi Layer

Community
haowjy
qi-layer

Use when writing or maintaining AGENTS.md, .context/CONTEXT.md, or CLAUDE.md mirrors: keep intent docs minimal and load-bearing.

Overview

Publisherhaowjy
Repositorycreative-writing-skills
Skill nameqi-layer
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 Qi Layer 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/qi-layer
  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/qi-layer .claude/skills/qi-layer
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Qi Layer 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 Qi Layer 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 Qi Layer 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.

qi-layer

/qi-maintenance owns when colocated knowledge must move with source changes. This skill owns how to write and structure that knowledge.

Load /knowledge-layers for where each layer lives and what it holds. Load /llm-writing if it isn't already loaded.

This skill is about how to write and maintain the directory-local pair: AGENTS.md and .context/CONTEXT.md. The pair governs any tree agents work in — code, the KB, docs, work directories. AGENTS.md loads into an agent's bounded context as standing instructions: write it like a prompt, minimal, every line load-bearing.

The Four Principles

  1. Fractal Compression: leaf AGENTS.md summarizes its directory's content; parent AGENTS.md summarizes its children. Each level is a compression of the level below.
  2. Hierarchical Summarization: root provides broad architectural frame. Leaves provide local working knowledge. Agents accumulate understanding as they descend.
  3. LCA Deduplication: shared knowledge appears once at the shallowest node covering all relevant paths. Never duplicate between siblings.
  4. Progressive Disclosure: give just enough to work correctly at this level. Link to .context/CONTEXT.md for depth.

Writing AGENTS.md

Agents read AGENTS.md before opening anything else in the tree — write for that moment. Ask: what must someone understand before working here? That's what AGENTS.md captures.

Keep AGENTS.md as short as the directory allows, rarely past 200 lines. Include only what has substance:

  • Purpose: what this area IS and what it ISN'T (1–3 sentences)
  • Mental model: how to think about this area, key abstractions
  • Key rules: constraints, what breaks if you get it wrong
  • Anti-patterns: what NOT to do here
  • Downlinks: to .context/ for depth, to related areas

An agent that only reads AGENTS.md should be able to work correctly here. An agent that also reads .context/ should be able to change things safely.

Writing .context/CONTEXT.md

Reference depth, co-located with the code it describes. Where an agent goes when it needs contracts, architecture, or rationale in detail.

Sections (use only those with substance):

  • Contracts: interfaces, invariants, what breaks if violated
  • Architecture: component relationships, data flow, dependency direction
  • Rationale: why X over Y, rejected alternatives
  • Patterns: how to work here, concrete pitfalls

The .context/ directory is extensible: additional files alongside CONTEXT.md for specialized concerns.

What Does NOT Belong in AGENTS.md

Apply the every-session test: root AGENTS.md loads on every session. If knowledge is only relevant when working in a specific domain, it belongs in that domain's AGENTS.md or .context/, not root.

Apply the think-vs-lookup test: text whose removal would cause a wrong decision belongs in AGENTS.md. Text an agent would merely have to look up belongs in .context/. Text that changes no behavior gets deleted — agents already know how to code and follow common conventions.

Specific failure modes:

  • Session bleed: LLM working notes that calcified into the instruction file. Tells: status-update language ("deleted", "shipped", "deferred"), implementation terms packed without framing, history narration.
  • Reference material posing as intent: tables, command blocks, full scheme vocabularies, implementation specifics.
  • Redundant guards: prose warnings for invariants already enforced by tests or types. The code is the real guard; prose rots faster.
  • Duplicated knowledge: restating what lives in a skill, a domain .context/, or a KB page. Point, don't duplicate.
  • Domain-specific detail at root: URI scheme tables, gateway pricing internals, auth implementation details. These belong in their domain's AGENTS.md, not root.

Structural Rules

  • Relative paths for all links
  • AGENTS.md and .context/ at the same directory level (siblings)
  • Link to files, not headings (headings change more often)
  • Lateral links between .context/ directories with contracts between them
  • LCA deduplication: if two siblings share context, put it in the parent

CLAUDE.md Mirrors

Claude harnesses read CLAUDE.md, not AGENTS.md. Give every AGENTS.md a sibling CLAUDE.md whose first line is @AGENTS.md — normally the whole file. Run meridian qi claude-md-fix <target-root> on the containing tree after creating or moving AGENTS.md files: it creates missing mirrors, skips exact ones, and reports anything else as a conflict.

Never write shared instructions into CLAUDE.md. Claude-only knowledge is rare; when it exists, put it below the @AGENTS.md import and expect claude-md-fix to keep flagging the file, so the divergence stays visible.

Loading differs by level. At the root, each harness auto-loads its own file every session: Claude reads CLAUDE.md, others read AGENTS.md. In subdirectories, Claude auto-injects CLAUDE.md when it touches files there; other agents see nested AGENTS.md only by reading it on entry. Don't lean on Claude's auto-injection: a nested AGENTS.md carries the local additions an agent needs on entry, with everything else inherited from ancestors.

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 Qi Layer AI skill do?

Use when writing or maintaining AGENTS.md, .context/CONTEXT.md, or CLAUDE.md mirrors: keep intent docs minimal and load-bearing.

Why use Qi Layer on TypingMind?

Because you install it once and use it with any model. Qi Layer 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 Qi Layer in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/haowjy/creative-writing-skills/tree/main/cw/skills/qi-layer. 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 Qi Layer?

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 Qi Layer?

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

Is the Qi Layer 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 👇