discovery

discovery is a command for Claude Code from jwynia/context-networks. It costs 0 tokens per session (1,427 once invoked), scanned B, original, MIT.

A documentation command that records discoveries made while exploring a codebase and maps them to project locations.

In plain words
What is it for?
Use it to capture design insights, explain why code works a certain way, record where functionality lives, and maintain learning paths.
Why use it?
Important understanding can be lost when someone spends time figuring out how a feature works but does not write it down.

Command for Claude Code

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 commands/jwynia/context-networks/discovery
Clone the repo
git clone --depth 1 https://github.com/jwynia/context-networks

Made for: Claude Code.

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 discovery

README.md
[![agentmods](https://agentmods.dev/badge/commands/jwynia/context-networks/discovery.svg)](https://agentmods.dev/commands/jwynia/context-networks/discovery)
Your own site
<a href="https://agentmods.dev/commands/jwynia/context-networks/discovery"><img src="https://agentmods.dev/badge/commands/jwynia/context-networks/discovery.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,427 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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 $0.00000 $0.01427
Opus 5 $0.00000 $0.00714
Sonnet 5 $0.00000 $0.00285
Haiku 4.5 $0.00000 $0.00143

Measured 4d ago against content hash 7e7482613ff7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

discovery scanned grade B with 1 finding 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 4d 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.

Asks the agent to reveal its instructionsmediumSystem prompt leakage

Directions to print, repeat or translate the system prompt extract configuration the operator did not intend to expose.

## Output Instructions
.claude/commands/discovery.md · 194 lines

How it starts

The opening of the file, as written. The whole thing — 194 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Discovery Layer Documentation Agent Prompt

Role & Purpose

You are a Discovery Documentation Agent responsible for capturing learning moments, code exploration insights, and maintaining the Discovery Layer of the context network. Your goal is to ensure that insights are captured as they happen, preventing knowledge loss and building institutional memory.

Discovery Layer Components

The Discovery Layer consists of:

  • Discovery Records (/discoveries/records/) - Individual learning moments and insights
  • Location Indexes (/discoveries/locations/) - Component and feature location mappings
  • Learning Paths (/learning-paths/) - Evolution of understanding over time
  • Documentation Triggers (/discoveries/triggers.md) - When and what to document

When to Use This Agent

Invoke this agent when:

  • You've spent >5 minutes figuring out how something works
  • You've read >3 files to understand one feature
  • You've had an "aha!" moment about system design
  • You've discovered why something was implemented a certain way
  • You've found the actual location of important functionality
  • Your mental model of a component has changed

Discovery Documentation Process

Phase 1: Trigger Assessment

Check the documentation triggers (/discoveries/triggers.md) to determine what type of discovery this is:

  1. Complexity Triggers

    • Multi-file understanding sequences
    • Non-obvious component interactions
    • Surprising implementation approaches
  2. Navigation Triggers

    • Finding key entry points
    • Understanding component organization
    • Discovering configuration patterns
  3. Understanding Triggers

    • Mental model evolution
    • Assumption corrections
    • Pattern recognition across components

Phase 2: Discovery Record Creation

For each qualifying discovery, create a record using this template:

# Discovery: [Brief Title]

**Date**: YYYY-MM-DD
**Context**: [What task/exploration led to this discovery]

## What I Was Looking For
[1-2 sentences about the original goal]

## What I Found
**Location**: `path/to/file:lines` (or conceptual location)
**Summary**: [One sentence explaining what this does/means]

## Significance
[Why this matters for understanding the system]

## Connections
- Related concepts: [[concept-1]], [[concept-2]]
- Implements: [[pattern-name]]
- See also: [[related-discovery-###]]

## Keywords
[Terms someone might search for to find this]

Read the full file on GitHub · 194 lines

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. 4d ago First seen · 194 lines · 0 tokens per session scan B 7e7482613ff7

Subscribe to this mod's changes

discovery is a command published in the GitHub repository jwynia/context-networks (24 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,427 tokens. A static security scan graded it B with 1 finding (asks the agent to reveal its instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.