compound-docs

compound-docs is a skill for Claude Code from oliver-kriska/claude-elixir-phoenix. It costs 38 tokens per session (561 once invoked), scanned A, original, MIT.

A searchable collection of documented solutions for Elixir, Phoenix, and Ecto problems, stored as structured files. It records what went wrong, how it was fixed, and how to prevent it happening again.

In plain words
What is it for?
Use it to look up earlier solutions before debugging runtime, database, LiveView, deployment, security, testing, or build issues in an Elixir/Phoenix project.
Why use it?
It avoids repeating investigations that the team has already completed. Searching past fixes gives debugging work a starting point and preserves knowledge between sessions.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the phx plugin — 50 skills, 26 agents, 10 hooks shipped together

Install

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.

agentmods
npx agentmods add skills/oliver-kriska/claude-elixir-phoenix/compound-docs
Any agent
npx skills add oliver-kriska/claude-elixir-phoenix --skill compound-docs
Clone the repo
git clone --depth 1 https://github.com/oliver-kriska/claude-elixir-phoenix

Made for: Claude Code.

Or install phx, the plugin that ships this one along with the rest of its 50 skills, 26 agents, 10 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for compound-docs

README.md
[![agentmods](https://agentmods.dev/badge/skills/oliver-kriska/claude-elixir-phoenix/compound-docs.svg)](https://agentmods.dev/skills/oliver-kriska/claude-elixir-phoenix/compound-docs)
Your own site
<a href="https://agentmods.dev/skills/oliver-kriska/claude-elixir-phoenix/compound-docs"><img src="https://agentmods.dev/badge/skills/oliver-kriska/claude-elixir-phoenix/compound-docs.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 561 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00038 $0.00561
Opus 5 $0.00019 $0.00280
Sonnet 5 $0.00008 $0.00112
Haiku 4.5 $0.00004 $0.00056

Measured 2d ago against content hash 749f247917a1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

compound-docs 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.

plugins/elixir-phoenix/skills/compound-docs/SKILL.md · 85 lines

What it actually says

Compound Docs — Institutional Knowledge Base

Searchable, categorized solution documentation that makes each debugging session easier than the last.

Directory Structure

.claude/solutions/
├── ecto-issues/
├── liveview-issues/
├── oban-issues/
├── otp-issues/
├── security-issues/
├── testing-issues/
├── phoenix-issues/
├── deployment-issues/
├── performance-issues/
└── build-issues/

Iron Laws

  1. ALWAYS search solutions before investigating — Check .claude/solutions/ for existing fixes before debugging
  2. YAML frontmatter is MANDATORY — Every solution needs validated metadata per ${CLAUDE_SKILL_DIR}/references/schema.md
  3. One problem per file — Never combine multiple solutions
  4. Include prevention — Every solution documents how to prevent recurrence

Solution File Format

---
module: "Accounts"
date: "2025-12-01"
problem_type: runtime_error
component: ecto_schema
symptoms:
  - "Ecto.Association.NotLoaded on user.posts"
root_cause: missing_preload
severity: medium
tags: [preload, association, n-plus-one]
---

# Association NotLoaded on User Posts

## Symptoms
Ecto.Association.NotLoaded raised when accessing user.posts
in UserListLive after filtering.

## Root Cause
Query in Accounts context missing preload for :posts.

## Solution
Added `Repo.preload(:posts)` to `list_users/1`.

## Prevention
Use n1-check skill before shipping list views.

Searching Solutions

Use Grep to search .claude/solutions/ by symptom (e.g., NotLoaded), by tag (e.g., tags:.*preload), or by component (e.g., component: ecto).

Integration

  • /phx:compound creates solution docs here
  • /phx:investigate searches here before debugging
  • /phx:plan consults for known risks
  • learn-from-fix feeds into this system

References

  • ${CLAUDE_SKILL_DIR}/references/schema.md — YAML frontmatter validation schema
  • ${CLAUDE_SKILL_DIR}/references/resolution-template.md — Full solution template
Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 2d ago First seen · 85 lines · 38 tokens per session scan A 749f247917a1

Subscribe to this mod's changes

compound-docs is a skill published in the GitHub repository oliver-kriska/claude-elixir-phoenix (538 stars, last pushed today), licensed MIT. It adds 38 tokens to every session and 561 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories

import

Import a self-contained NeatContext context bundle shared by another person, or reconcile a newer copy of a context already on this machine, leaving the source bundle unchanged. Use only when the user explicitly invokes this skill or asks to import a NeatContext bundle.

XTSoftwareLabs/neatcontext-plugins · 54 tokens

save

Save durable decisions, findings, plans, and implementation knowledge from the visible Codex conversation into a new or existing NeatContext context. Use only when the user explicitly invokes this skill or asks to preserve the current conversation as reusable context.

XTSoftwareLabs/neatcontext-plugins · 49 tokens

create

Create a fresh NeatContext context from a user-defined behavioral profile and an existing local knowledge folder. Use only when the user explicitly invokes this skill or asks to create a new context rather than save the current conversation.

XTSoftwareLabs/neatcontext-plugins · 45 tokens

delete

Preview and permanently delete a NeatContext context while preserving any externally linked knowledge folder. Use only when the user explicitly invokes this skill or clearly asks to delete a context.

XTSoftwareLabs/neatcontext-plugins · 36 tokens

export

Export a NeatContext context saved from a conversation into a self-contained bundle folder that can be shared or moved to another machine. Use only when the user explicitly invokes this skill or asks to export a NeatContext context.

XTSoftwareLabs/neatcontext-plugins · 47 tokens

use

Connect or switch Codex to a local NeatContext Context by name or list number. Use only when the user explicitly invokes this skill, names a context to connect, or agrees to a routing suggestion.

XTSoftwareLabs/neatcontext-plugins · 43 tokens