frontier-based-explore

frontier-based-explore is a skill for Claude Code from jimmc414/claude-code-plugin-marketplace. It costs 25 tokens per session (642 once invoked), scanned A, original, MIT.

A graph-search pattern that keeps discovered but unvisited nodes in a frontier, then chooses which one to process next. A graph is a set of connected items; changing the choice gives depth-first, breadth-first, or random exploration.

In plain words
What is it for?
Use it for graph and tree traversal, maze generation, coverage algorithms, or any search where you need to switch between depth-first, breadth-first, and random order.
Why use it?
It lets you change the search style without rewriting the traversal logic. This is useful when the order in which nodes are visited affects the result.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the norvig-patterns plugin — 54 skills 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/jimmc414/claude-code-plugin-marketplace/frontier-based-explore
Any agent
npx skills add jimmc414/claude-code-plugin-marketplace --skill frontier-based-explore
Clone the repo
git clone --depth 1 https://github.com/jimmc414/claude-code-plugin-marketplace

Made for: Claude Code.

Or install norvig-patterns, the plugin that ships this one along with the rest of its 54 skills.

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 frontier-based-explore

README.md
[![agentmods](https://agentmods.dev/badge/skills/jimmc414/claude-code-plugin-marketplace/frontier-based-explore.svg)](https://agentmods.dev/skills/jimmc414/claude-code-plugin-marketplace/frontier-based-explore)
Your own site
<a href="https://agentmods.dev/skills/jimmc414/claude-code-plugin-marketplace/frontier-based-explore"><img src="https://agentmods.dev/badge/skills/jimmc414/claude-code-plugin-marketplace/frontier-based-explore.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 642 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.00025 $0.00642
Opus 5 $0.00013 $0.00321
Sonnet 5 $0.00005 $0.00128
Haiku 4.5 $0.00003 $0.00064

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

Security

Grade A, and why

frontier-based-explore 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 6d 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/norvig-patterns/skills/frontier-based-explore/SKILL.md · 108 lines

How it starts

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

frontier-based-explore

When to Use

  • Graph/tree traversal
  • When traversal order matters
  • Want to switch between DFS/BFS easily
  • Maze generation
  • Coverage algorithms

When NOT to Use

  • Simple recursion suffices
  • Fixed traversal order
  • No exploration needed

The Pattern

Maintain a frontier collection; how you pop determines traversal order.

from collections import deque

def explore(start, neighbors, pop_strategy=deque.pop):
    """Explore graph with configurable traversal order.

    pop_strategy:
      deque.pop     -> DFS (depth-first, LIFO)
      deque.popleft -> BFS (breadth-first, FIFO)
      lambda d: d.pop(random.randrange(len(d))) -> Random
    """
    visited = set()
    frontier = deque([start])

    while frontier:
        current = pop_strategy(frontier)

        if current in visited:
            continue
        visited.add(current)

        yield current  # Process node

        for neighbor in neighbors(current):
            if neighbor not in visited:
                frontier.append(neighbor)

Example (from pytudes Maze.ipynb)

from collections import deque
import random

def random_tree(nodes, neighbors, pop=deque.pop):
    """Build spanning tree with configurable exploration.

    Different pop strategies create different tree shapes:
    - deque.pop (DFS): long winding paths
    - deque.popleft (BFS): short bushy branches
    - random pop: mixed/natural looking
    """
    tree = set()
    nodes = set(nodes)
    root = nodes.pop()
    frontier = deque([root])

    while nodes:
        current = pop(frontier)
        unvisited = [n for n in neighbors(current) if n in nodes]

        if unvisited:
            chosen = random.choice(unvisited)
            tree.add((current, chosen))
            nodes.remove(chosen)
            frontier.append(current)
            frontier.append(chosen)

    return tree

# Generate different maze styles
def dfs_maze(width, height):
    """Long, winding corridors."""
    return random_tree(all_cells(width, height), grid_neighbors, deque.pop)

def bfs_maze(width, height):
    """Short, branching paths."""
    return random_tree(all_cells(width, height), grid_neighbors, deque.popleft)

def random_maze(width, height):
    """Natural-looking structure."""
    def random_pop(d):
        i = random.randrange(len(d))
        d[i], d[-1] = d[-1], d[i]
        return d.pop()
    return random_tree(all_cells(width, height), grid_neighbors, random_pop)

Read the full file on GitHub · 108 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. 6d ago First seen · 108 lines · 25 tokens per session scan A 7085afc00075

Subscribe to this mod's changes

frontier-based-explore is a skill published in the GitHub repository jimmc414/claude-code-plugin-marketplace (4 stars, last pushed yesterday), licensed MIT. It adds 25 tokens to every session and 642 once invoked, about $0.0001 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.

Related

Other skills, from other repositories

batch-simplify

Batch-run simplification across changed files, or across an entire repository, grouped by ecosystem and dependency order. Use when: 'batch simplify', 'simplify recent changes', 'forgot to run simplify', 'catch up on simplify', sweeping a named scope such as a branch, a whole repository, or one directory, or after a…

melodic-software/claude-code-plugins · 153 tokens

extract-ssot

Deduplicate repeated markdown content, rule files, skill bodies, ADRs, docs, into a single named source of truth and migrate every call site to cite it by exact heading. Use when the same prose, literal, or concept appears (or is reworded) across files: 'DRY this prose', 'extract a shared rule', 'single source of…

melodic-software/claude-code-plugins · 130 tokens

audit-encapsulation

Audit and remediate skill-encapsulation violations. External citations reaching into private surfaces inside .claude/skills/ / or plugins/ /skills/ / (marketplace monorepos) beyond the slash invocation. Use when: 'audit encapsulation', 'find skill leaks', 'skill boundary violation', 'who is reaching into ', 'check…

melodic-software/claude-code-plugins · 92 tokens

audit-progressive-disclosure

Read-only progressive-disclosure audit for agent-facing instruction markdown. Grades every target against a three-tier load-cost model (always-loaded / invocation-loaded / on-demand) and classifies seven finding shapes in two lanes: split opportunities (oversize vs tier-calibrated Anthropic-prescribed caps…

melodic-software/claude-code-plugins · 259 tokens

quiz-me

Post-work comprehension check: after a change is complete, generate a self-contained HTML report of what was done (context, intuition, decisions) with a quiz at the bottom that you answer. Verifying the HUMAN absorbed the work, not the artifact. Non-gating by default; the quizpolicy userConfig tunes offer cadence.…

melodic-software/claude-code-plugins · 177 tokens

firecrawl

Scrape, search, crawl, map, parse, or interact with web pages via the firecrawl-cli binary, writing results to disk instead of streaming them into context. Actions: scrape, search, crawl, map, parse, interact, agent, monitor, search-feedback, credit-usage. Use when: 'scrape this page', 'crawl this site', 'search the…

melodic-software/claude-code-plugins · 155 tokens