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 skills/paultyng/skill-issue/discover-patternsnpx skills add paultyng/skill-issue --skill discover-patternsgit clone --depth 1 https://github.com/paultyng/skill-issueWrote 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/skills/paultyng/skill-issue/discover-patterns)<a href="https://agentmods.dev/skills/paultyng/skill-issue/discover-patterns"><img src="https://agentmods.dev/badge/skills/paultyng/skill-issue/discover-patterns.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.00035 | $0.01304 |
| Opus 5 | $0.00017 | $0.00652 |
| Sonnet 5 | $0.00007 | $0.00261 |
| Haiku 4.5 | $0.00003 | $0.00130 |
Grade A, and why
discover-patterns 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Discover Patterns
Analyze a codebase to discover and document its implicit architectural and implementation patterns.
Workflow
1. Scope and explore
- Confirm scope with the user: full codebase (default), specific packages/directories, or specific concern.
- Explore the scoped code using parallel explore subagents. Read source files, test files, config files, and build files.
- Classify files by type:
has_go,has_proto,has_ts,has_infra, etc.
2. Identify candidate patterns (Opus)
Launch up to 4 concurrent subagents (subagent_type="generalPurpose", model: opus per subagent-model-routing — architecture-level pattern recognition requires deep reasoning across the codebase), each covering a group of pattern categories from the taxonomy. Each subagent reads all relevant files and identifies candidate patterns with a signature the counting stage can apply mechanically.
| Subagent | Categories | Requires |
|---|---|---|
| Structure & Layering | STRUCT | Any source files |
| Error Handling & Observability | ERR, OBS | Any source files |
| Config & DI | CFG, DI | Any source files |
| Testing | TEST | Any source + test files |
| Transport | XPORT | HTTP/gRPC code present |
Each subagent receives:
- The scoped file list for its relevant file types
- Reference: reference-pattern-taxonomy.md for what to look for
For each candidate pattern, record:
- Name: short descriptive name
- Description: what the pattern is and how it works
- Search signature: a concrete way to find further occurrences. A grep regex, file glob, AST predicate (e.g. "calls to
context.Background()outsidemain.go"), or symbol pattern. Must be specific enough that the counting stage applies it mechanically. - Seed exemplars: 1-2 file:line references the discovery subagent already saw
This stage does NOT compute confidence or gather exhaustive exemplars. Step 2.5 handles that.
2.5. Count occurrences per pattern (Haiku fan-out)
What ships with it
1 file 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.
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.
- 5d ago First seen · 132 lines · 35 tokens per session scan A 0d9fdae96fc4
discover-patterns is a skill published in the GitHub repository paultyng/skill-issue (9 stars, last pushed 24d ago), licensed MIT. It adds 35 tokens to every session and 1,304 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-08-31.
Other skills, from other repositories
verify
Fact-check claims encountered during reading — dates, names, events, citations. Use when encountering historical facts or disputed claims.
expert
Base expert skill.
alpha
Alpha skill.
assistant
Assistant — on any repo, scan README→docs→AGENTS→CONTRIBUTING→PR templates→task runners→devcontainer→CI→configs before code; cite sources; prefer AGENTS.md for agent behavior; portable across Cursor/Copilot/Claude; use agent-toolkit CLI when needed.
megalinter-check
Collect MegaLinter lint errors for the current repository. Use when the user wants to know if the code passes linting, why the MegaLinter CI job fails, or before/after fixing lint errors. Two modes - watch a CI job (GitHub Actions, GitLab CI, Azure Pipelines, Bitbucket Pipelines) and parse its logs, or run MegaLinter…
codeql
CodeQL operational workflow — discover/config, run/inspect, triage SARIF findings (rule/query ID, source→sink, evidence), remediate, re-validate. Distinguishes broad MegaLinter linting from semantic security analysis.