Skip to content
Agentmart
Submit a tool

doctrine-keeper

Captures insights, rules, and learnings from any AI coding conversation into the user's personal ai-doctrine.md file — a single source of truth that is then…

Skill by AQaddora

IndexedMIT★ 3
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/aqaddora-doctrine-keeper

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Captures insights, rules, and learnings from any AI coding conversation into the user's personal ai-doctrine.md file — a single source of truth that is then auto-synced into Claude Code, Cursor, Copilot, Codex, Gemini CLI, and Windsurf so every tool the user opens reads the same hard-won rules. Use this skill whenever the user says "add to doctrine", "save this rule", "capture this learning", "this should be a rule", "doctrine this", "remember this", or asks to record an insight from a prompt/response. Also triggers when the user shares a hard-won learning, a prompt pattern that worked unusually well, a failure mode to avoid, or any rule they want to remember across tools.

Use cases: agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/doctrine-keeper

What's inside

Skill name
doctrine-keeper
Description
Captures insights, rules, and learnings from any AI coding conversation into the user's personal ai-doctrine.md file — a single source of truth that is then auto-synced into Claude Code, Cursor, Copilot, Codex, Gemini CLI, and Windsurf so every tool the user opens reads the same hard-won rules. Use this skill whenever the user says "add to doctrine", "save this rule", "capture this learning", "this should be a rule", "doctrine this", "remember this", or asks to record an insight from a prompt/response. Also triggers when the user shares a hard-won learning, a prompt pattern that worked unusually well, a failure mode to avoid, or any rule they want to remember across tools.
License
MIT
Instructions
164 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (6)

  • SKILL.md
  • categories.md · references/
  • entry-format.md · references/
  • append_entry.py · scripts/
  • bootstrap.py · scripts/
  • sync_to_agents.sh · scripts/

SKILL.md (first lines)

# Doctrine Keeper

The **memory bus** of the Vibe Coding Mastery skill suite.

Captures hard-won insights from any AI coding session into the user's personal `ai-doctrine.md` — a single file on their machine that is then symlinked into every AI coding tool's config so the same rules travel with the user no matter which tool they open next.

## Why This Skill Exists

Most developers' AI rules live in chat history. They get rediscovered, re-learned, and re-forgotten weekly.

This skill makes those rules *permanent and portable*:

- **Permanent** — every rule is timestamped, categorized, and never overwritten.
- **Portable** — one file, symlinked into Claude Code, Cursor, Copilot, Codex, Gemini CLI, and Windsurf via `scripts/sync_to_agents.sh`. Switch tools, keep memory.

It's the foundation under the PURE Loop (Prime → Understand → Refine → Execute). Every other skill in this suite writes to it.

## When to Use This Skill

Trigger automatically when the user:

- Says any variant of: "add to doctrine", "doctrine this", "save this rule", "capture this learning", "add this to my AI doctrine", "remember this for next time"
- Shares a prompt pattern that worked unusually well
- Discovers a failure mode worth avoiding
- Asks you to "record", "log", or "save" an insight
- Reflects on what they learned from the current conversation
- Completes a PURE Loop run and the orchestrator hands off for capture

## How It Works (4-Step Protocol)

### Step 1 — Locate the Doctrine File

1. Check `~/ai-doctrine.md` (the user's master doctrine).
2. If missing, check `./ai-doctrine.md` (project-scoped).
3. If neither exists, offer to bootstrap one using `scripts/bootstrap.py`.

### Step 2 — Extract Context From the Conversation

Examine the last 5–10 turns. Identify:

- **The trigger prompt** — what the user asked
- **The AI response** — what the AI did well or poorly
- **The hard-won learning** — the rule, pattern, or warning worth preserving
- **The category** — Prime / Understand / Refine / Execute / Trap (see `references/categories.md`)

### Step 3 — Format the Entry

Use the format in `references/entry-format.md`. Required fields:

```markdown
## [YYYY-MM-DD] — [Short Title]

**Category:** [Prime | Understand | Refine | Execute | Trap]
**Stack:** [tech mentioned]
**Severity:** [Low | Medium | High | Critical]

### The Rule
[One sentence. Specific. Reusable.]

### Why It Matters
### Triggering Prompt
### What Went Wrong / Right
### How To Apply Next Time
```

### Step 4 — Append, Update, Confirm

1. Call `scripts/append_entry.py` with the structured fields — it appends safely, increments the rule counter, and updates `Last updated`.
2. Confirm to the user with rule title, category, severity, and total rule count.
3. If this is the user's first entry, suggest they run `scripts/sync_to_agents.sh` once per project to wire the doctrine into every other AI tool.

## Files in This Skill

| File | Purpose |
| --- | --- |
| `SKILL.md` | This file — the instruction set |
| `references/entry-format.md` | Canonical entry format with annotated examples |
| `references/categories.md` | PURE + Trap taxonomy explained |
| `scripts/bootstrap.py` | Creates a fresh `~/ai-doctrine.md` with the standard header |
| `scripts/append_entry.py` | Appends a new entry safely, increments counters |
| `scripts/sync_to_agents.sh` | Symlinks the doctrine into Claude / Cursor / Copilot / Codex / Gemini / Windsurf configs |

## Operational Rules

1. **Never overwrite existing entries.** Always append. Entries are dated and immutable.
2. **One rule per entry.** If the user shares 3 lessons, create 3 entries.
3. **Be specific.** Reject vague rules like "use AI carefully." Push for "when X, always Y, because Z."
4. **Preserve the user's voice.** Don't paraphrase their insight into corporate-speak.
5. **Tag for retrieval.** Categories and stack tags exist so future searches like "show me all FastAPI Refine rules" work.
6. **Confirm before write.** Show the user the rendered entry, get a yes, then append.

## Cross-Tool Memory Architecture

This skill is the **write head**. The other six skills (prime, understand, refine, execute, organize-agents, pure-orchestrator) all route their save requests through `append_entry.py`. The result is a single linear stream of rules that any AI tool can read.

```
        ┌─────────────────────────────────────┐
        │   Any AI coding session (Claude,    │
        │   Cursor, Copilot, Codex, Gemini)   │
        └────────────────┬────────────────────┘
                         │
                "save this rule"
                         │
                         ▼
              ┌──────────────────────┐
              │   doctrine-keeper    │  ← this skill
              │   (write head)       │
              └──────────┬───────────┘
                         │ append_entry.py
                         ▼
                  ~/ai-doctrine.md   ← single source of truth
                         │
                         │ sync_to_agents.sh (symlinks)
            ┌────────────┼────────────┐
            ▼            ▼            ▼
       CLAUDE.md   .cursorrules  .github/copilot-instructions.md
       AGENTS.md   .windsurfrules
       (Codex /                 (and every other tool's
        Gemini)                  config file location)

From AQaddora/pure-skill-suite, MIT.

More from AQaddora/pure-skill-suite

Signals

Stars
3
Forks
0
Open issues
0
Last commit (this folder)
May 26, 2026 (5 months ago)
Last release
May 31, 2026 (5 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from AQaddora

Cite this page

doctrine-keeper skill. Agent Mart. https://agentmart.dev/skills/aqaddora-doctrine-keeper (last updated 2026-10-24)