Skip to main content
ClaudeWave
Skill92 repo starsupdated today

agent-wiki-consult

Consult an agent-wiki for guidelines relevant to the task at hand. The wiki itself documents how to retrieve from it (AGENTS.md). Use this skill once you know what task or sub-task you're about to do — not at session start.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/AgentToolkit/altk-evolve /tmp/agent-wiki-consult && cp -r /tmp/agent-wiki-consult/explorations/agent-wiki/skills/agent-wiki-consult ~/.claude/skills/agent-wiki-consult
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Agent Wiki — Consult

## Overview

This skill is a thin wrapper around the wiki's own `AGENTS.md` document. The
wiki contains evidence-grounded guidelines distilled from agent
trajectories; `AGENTS.md` is its agent-readable contract for navigation
and retrieval. This skill tells you to:

1. Find the wiki root.
2. Read `<wiki-root>/AGENTS.md`.
3. Follow the recipe described there against the user's current task.

The retrieval logic lives in `AGENTS.md`, not in this skill. That separation
is intentional: when the wiki's structure or recall heuristics change, edit
`AGENTS.md` and not this skill.

## When to invoke

Call this skill **once you know the task or sub-task you're about to do**.
Concretely:

- After the user has stated their request and you have a plan for the next
  block of work.
- Before writing non-trivial code in a problem space the wiki may have
  documented.
- Mid-task when a new sub-task emerges with its own narrow scope (e.g.
  "now I need to handle browser auth resumption").

Do **not** invoke at session start (no task to filter against), and do
not invoke for trivial tasks (typo fix, single-line edit) where the wiki's
overhead exceeds the work.

## Workflow

### Step 1: Resolve the wiki root

If the user passed a path argument (e.g. `wiki-twobatch`,
`wiki-twobatch-skills`, or any other path), use it.

Otherwise auto-detect: walk up from the current working directory looking
for any sibling directory matching `wiki-*` that contains an `_config.yaml`
file. If multiple are found, prefer the one closest to cwd. If none are
found, ask the user which wiki to consult.

### Step 2: Read AGENTS.md

```
Read <wiki-root>/AGENTS.md
```

This is the contract document. It explains the wiki's structure, the
filename suffix convention, the `_index.jsonl` schema, and a recommended
retrieval recipe. Read it in full — it's typically 3–5 KB.

If the file does not exist, run:

```bash
uv run python explorations/agent-wiki/skills/scripts/build_agent_wiki.py \
  --wiki-root <wiki-root> catalog
```

Catalog's bootstrap phase will copy the bundled template into place.

### Step 3: Read the retrieval index

```
Read <wiki-root>/_index.jsonl
```

One row per guideline / cluster / task / subtask. Schema documented in
`AGENTS.md`. Rows are sorted clusters-first.

### Step 4: Apply the recipe from AGENTS.md

Per the recipe in `AGENTS.md` (which is advisory, not mandatory):

1. Identify topical tags + keywords from the task description.
2. Filter `_index.jsonl` rows by tag overlap or `trigger:` substring match.
3. Prefer cluster rows when a cluster and its members both match.
4. Read the top 2–5 matching pages in full.
5. State which guidelines apply (briefly) before acting on them.

Use your judgment for scoring. The wiki does not prescribe a fixed
algorithm; trust the heuristics in AGENTS.md and the row content.

### Step 5: Surface the matches

Report 2–5 candidate matches to the user (or to your own next-step
reasoning) with:

- Title
- One-line summary
- Relative path inside the wiki
- Tags
- Why this match scores high (one phrase)

## Args

This skill accepts:

- An optional path to the wiki root. Examples: `wiki-twobatch`,
  `wiki-twobatch-skills`, or an absolute path.
- An optional task description. If omitted, infer from the conversation
  context.

## Best practices

1. **Don't pre-load.** This skill is on-demand by design. Calling it at
   session start without a specific task wastes tokens and produces noise.
2. **Read AGENTS.md every time.** Wikis evolve; the contract may have
   changed. Caching the contract across invocations is fragile.
3. **Read clusters before atomics.** Cluster pages reference their members
   — you usually don't need to read the members directly.
4. **Cite when you act on a guideline.** Mention the guideline's title +
   link in your response so the user can audit the recommendation.
5. **Don't follow guidelines blindly.** If a guideline's `trigger:`
   doesn't quite match your situation, say so — note the close match and
   choose your own course.
agent-wiki-consolidate-guidelinesSkill

Read all atomic guidelines in wiki-twobatch/guidelines/ and propose themed clusters that group near-duplicates. Writes cluster pages and updates _config.yaml; originals are preserved with a `superseded_by:` backref.

agent-wiki-extract-guidelinesSkill

Read a normalized Claude Code trajectory JSON and extract reusable guidelines into wiki-twobatch/guidelines/. Use when mining saved trajectories for reusable lessons.

agent-wiki-ingestSkill

Ingest one or more agent trajectories (raw bob/claude traces or normalized JSON) into an agent-wiki end-to-end — convert, summarize, extract guidelines, synthesize skills, consolidate into clusters, and catalog. Use when you have a batch of traces to turn into a wiki in one pass.

agent-wiki-summarizeSkill

Read a normalized Claude Code trajectory JSON and write an episodic summary page to wiki-twobatch/summaries/. Use when summarizing one or more saved trajectories into the agent wiki.

agent-wiki-synthesize-skillSkill

Read a normalized Claude Code trajectory JSON and produce a wiki-resident SKILL.md page that future agents can invoke. Use when a trajectory captured a non-trivial successful workflow worth promoting from a free-text guideline to an executable, callable artifact.

agent-wiki-tasksSkill

Discover task families across summaries and write per-family comparison pages with findings narrative. Updates wiki-twobatch/_config.yaml task definitions and writes tasks/<slug>__task.md.

evolve-lite:learnSkill

Must be used near the end of any non-trivial turn that produced potentially reusable tools, guidance, errors, workarounds, or workflows, so those lessons are saved for future turns.

evolve-lite:provenanceSkill

Analyze saved trajectories and recall audit events offline to record whether recalled guidelines influenced completed sessions.