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.
npx agentmods add commands/jwynia/context-networks/discoverygit clone --depth 1 https://github.com/jwynia/context-networksWrote 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.
[](https://agentmods.dev/commands/jwynia/context-networks/discovery)<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>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.
| Model | Per session | Once 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 |
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 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:
-
Complexity Triggers
- Multi-file understanding sequences
- Non-obvious component interactions
- Surprising implementation approaches
-
Navigation Triggers
- Finding key entry points
- Understanding component organization
- Discovering configuration patterns
-
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]
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.
- 4d ago First seen · 194 lines · 0 tokens per session scan B 7e7482613ff7
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.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.